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.
On 2/18/08, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Sun, 17 Feb 2008 22:34:27 -0200, Josh English > <[EMAIL PROTECTED]> escribi�: > > > Here's what I think is happening: IMS/__init__.py uses os.getcwd() to > > establish the path to the data folder and the files inside of it. When > > I run StoryCreator, os.getcwd() returns the story folder. > > If I'm right, how can I get the IMS/__init__.py module to use relative > > paths to its own module, and not the current working directory the os > > module provides? > > Use the module's own __file__ attribute: > my_path = os.path.abspath(os.path.dirname(__file__)) > > -- > Gabriel Genellina > > -- > http://mail.python.org/mailman/listinfo/python-list -- Josh English [EMAIL PROTECTED] http://joshenglish.livejournal.com -- http://mail.python.org/mailman/listinfo/python-list