[Tutor] A simple question
lumbricus@gmx.net
lumbricus@gmx.net
Tue, 13 Aug 2002 09:33:53 +0200 (MEST)
Hi!
> this is the way i do it:
>
> -----<SNIP>------
> #!/usr/bin/python
>
> #above line needed in unix like environs only!
>
> import sys
>
> sys.path[0] = '/home/thomi/custom_python_modules/'
>
> #set the above path to the dir where all my custom modules are
>
> import thomimodule1
>
> ------<SNIP>-----
>
> this does work, ive tried it myself before... sys.path[0] is free, and
Yes:
>>> sys.path[0]
''
>>>
But _why_?
Has anybody an explanation?
> can be used safely, otherwise you'd have to go:
>
> sys.path.append('/home/thomi/custom_python_modules')
>
> hope that helps..
[ TOFU snipped ]
puzzled greetings,
J"o!
--
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net