On Dec 11, 10:08 am, "ron.longo" <[EMAIL PROTECTED]> wrote: > Is there any way that I can find the path of the main .py file of my > application? > > For example, I have an application with some resources which are in a > subdirectory: > > myPythonApp.py > /resources > image1 > image2 > etc.
I just put the reference in my module. Don't hard code an absolute path, use the environment tools. app_path = os.getenv('HOME') + "/your_sub_dir" resources_path = os.getenv('HOME') + "/your_sub_dir/resources" If there's another way, someone else will jump in. rd -- http://mail.python.org/mailman/listinfo/python-list