[sugar] Python coding conventions
Dan Williams
dcbw
Thu Sep 28 08:03:55 EDT 2006
On Thu, 2006-09-28 at 10:20 +0200, Marco Pesenti Gritti wrote:
> Ian Bicking wrote:
<snip>
> > I guess the only other issue might be with the file layout, a little
> > related to distutils. For instance, why is there
> > source/sugar/services/presence and source/sugar/sugar/presence ?
> >
>
> source/sugar/services/presence is the dbus service. It's supposed to be
> private API and it's installed in the datadir rather than in
> site-packages. source/sugar/sugar/presence is the public API, installed
> in site-packages.
Slight correction here:
sugar/services/presence is the D-Bus service, which could be written in
C, C++, Mono, haskel, python, etc. It provides a _public_ D-Bus API,
and should not go in a python-specific directory because stuff other
than python uses it. If you write a C activity, you'll use it, just
like you would use the Shell (which should also not go in
python-specific directories). None of this could can or should be used
directly by a python program, as the only _public_ interface for it is
the D-Bus API.
sugar/sugar/presence is the Python _binding_ for the D-Bus service.
These _are_ python specific and should go under site-packages so that
all python programs can use them transparently.
Dan
> Marco
> _______________________________________________
> Sugar mailing list
> Sugar at laptop.org
> http://mailman.laptop.org/mailman/listinfo/sugar
More information about the Sugar-devel
mailing list