Gabriel Genellina
2/18/2008 8:03:00 PM
En Mon, 18 Feb 2008 16:23:28 -0200, Josh English
<joshua.r.english@gmail.com> escribi�:
> When testing the package in idle, this results in
> C:\Python25\Lib\idlelib
> instead of the file.
> The Data folder is created in this folder now.
Works for me:
main.py:
from testpkg import a
testpkg directory (a subdirectory somewhere in sys.path):
testpkg\__init__.py:
(empty file)
testpkg\a.py:
import os
print __name__, __file__, os.path.abspath(os.path.dirname(__file__))
In IDLE: File -> Open, main.py. F5 (Run Module). Output:
testpkg.a C:\APPS\PYTHON25\lib\site-packages\testpkg\a.pyc
C:\APPS\PYTHON25\lib\site-packages\testpkg
--
Gabriel Genellina