importing a package
Benedict Verheyen
linux4bene at telenet.be
Wed Jun 22 19:52:49 EDT 2005
Damjan wrote:
>>Indeed, when i do this, then it works
>>import sys
>>sys.path.append('package')
>>
>>However, why is it that package isn't added automatically to the pad?
>
>
> When you execute a python program the directory where the program is is
> automatically added to sys.path. No other directory is added to the default
> builtin sys.path.
>
> In you case (the second case), you can import package.dir2.file2.
OK, thanks for the info
Regards,
Benedict
--
Benedict Verheyen Debian User
http://www.heimdallit.be Public Key 0x712CBB8D
More information about the Python-list
mailing list