import directory error
Ola Natvig
ola.natvig at infosense.no
Mon Jan 31 10:16:19 EST 2005
Olivier Noblanc ATOUSOFT wrote:
> Hello,
>
>
> When i want to import a .py fire from another subdirectory i make
>
> import inc/setupxml
>
>
> but that make me an error message.
>
> A man tell me to put a dot but that doesn't work.
>
> Can you help me ?
>
> Thanks.
>
>
>
You should write
import inc.setupxml
this imports the module located at inc/setupxml.py
It's said that it imports the setupxml *module* from the inc *package*
All packages should include a __init__.py file. The import may not work
unless. You will get the __init__.py file if you type
import inc
--
--------------------------------------
Ola Natvig <ola.natvig at infosense.no>
infoSense AS / development
More information about the Python-list
mailing list