C
Charles Krug
List:
I'm trying to use the example files from Programming Python, 2nd Ed.
I've copied them into c:\Python24\Examples\PP2E.
Launching any of the examples programs by themselves seems to work
spiffily.
Using regedit, I appended "c:\Python24\Examples\PP2E" to Pythonpath
from the immediate window, executing the line:
from PP2E.launchmodes import PortableLauncher
Raises the exception:
Import Error: no module named PP2E.launchmodes
However if I copy launchmodes.py into my work directory, it imports
successfully.
Both "Examples" above and "Examples\PP2E" contain the __init__.py file.
Obviously, I'm missing a setup step here.
What magic do I need to perform to get Python to find modules in the
Examples heirarchy?
Is there any way to check from the immediate window where Python will
search for modules? Pythonpath appears to be correct, but the file
isn't importing unless I copy it to the current directory.
Thanx
Charles
I'm trying to use the example files from Programming Python, 2nd Ed.
I've copied them into c:\Python24\Examples\PP2E.
Launching any of the examples programs by themselves seems to work
spiffily.
Using regedit, I appended "c:\Python24\Examples\PP2E" to Pythonpath
from the immediate window, executing the line:
from PP2E.launchmodes import PortableLauncher
Raises the exception:
Import Error: no module named PP2E.launchmodes
However if I copy launchmodes.py into my work directory, it imports
successfully.
Both "Examples" above and "Examples\PP2E" contain the __init__.py file.
Obviously, I'm missing a setup step here.
What magic do I need to perform to get Python to find modules in the
Examples heirarchy?
Is there any way to check from the immediate window where Python will
search for modules? Pythonpath appears to be correct, but the file
isn't importing unless I copy it to the current directory.
Thanx
Charles