Python's import: why doesn't it work?
jhorneman at pobox.com
Sun Sep 29 17:26:53 EDT 2002
"Gerhard Häring" <gerhard.haering at gmx.de> wrote in message
news:mailman.1033319977.7828.python-list at python.org...
> * Mahesh Padmanabhan <news at nospam.eml.cc> [2002-09-29 16:55 +0000]:
> > You need to create an empty file called __init__.py inside the
> > template directory and call the blah.py script as follows:
> > import template.blah
> It's also highly recommended to start Python with "python -vv", then
> trying to import the module in question. This will show you where Python
> tries to find the module.
Actually, I just tried this in a DOS shell under Windows 98:
python -v script.py >output.txt
It lists the verbose output straight to the DOS shell, not to output.txt.
The output is useless, I can't scroll back.
python -h >output.txt
correctly sends the output to output.txt.
Does anybody know if this is a bug, and how I can work around it?
More information about the Python-list