On Mon, 01 Aug 2011 10:38 -0700, "happykid" <psyking...@gmail.com> wrote: > I want to use this function to get the directory path of the running > script, but it always returns empty string. Can anyone help me solve > this? Thank you. > -- > http://mail.python.org/mailman/listinfo/python-list
I think this is what you are after: import os.path path = os.path.abspath(os.path.dirname(__file__)) argv[0] returns the name of the current file (string), but no path information if I recall correct. Thijs -- http://mail.python.org/mailman/listinfo/python-list