[Skencil-devel] Revitalising Skencil

Bernhard Herzog bh at intevation.de
Sun Nov 7 21:01:26 CET 2010


On 02.11.2010, Bernhard Herzog wrote:
> On 02.11.2010, Igor Novikov wrote:
> > Actually it's almost the same
> >    Skencil 0.6.17 structure. Take a look on following illustration:
> >
> > http://saveimg.ru/pictures/02-11-10/6facaf814684b114a74fb3b84a9e94f2.png
> >
> >    Only startup script is replaced by __init__.py
>
> There's a crucial difference.  You introduced a new Pythong package above
> the existing Sketch package and do some sys.path manipulation during import
> that makes it possible to import the Skencil modules under their 'old'
> names.

I should have read the sources more carefully.  The path manipulation does not 
happen during import.  It only happens when the skencil_run function is 
executed.  This doesn't make much of a difference, though.  The problem that 
there are two absolute names for all Sketch modules is not affected.

I originally thought that now it would be possible to easily import Skencil 
from a program that wanted to use it as a library.  It turns out that that 
is, in fact, not possible, because the path manipulation is necessary and 
only done in skencil_run which also starts the application. So, given the 
current implementation, there does seem to be no reason at all for the code 
to be installed in Python's site-packages directory.

  Bernhard


More information about the Skencil-devel mailing list