En Tue, 04 Sep 2007 09:12:22 -0300, Sandipan Gangopadhyay <[EMAIL PROTECTED]> escribi�:
> I have recently installed Python 2.5.1 and Pythonwin (without any > errors) on > Windows Vista Ultimate. > > Now, the programs run fine within Pythonwin IDE when current directory is > set to the program's directory. > > But, when I double click them from Windows Explorer, the program is not > run. First, fix your source code (either removing the non-ascii character or adding an encoding line at the top, see <http://www.python.org/peps/pep-0263.html>) (PEP0263 is enforced from Python 2.5 and up; you got a warning on earlier versions). os.getcwd() returns the current directory. os.chdir() changes the current directory. A shortcut on the desktop may use the desktop itself as the initial directory. If you want to run your script from within the same directory as it resides, try this: os.chdir(os.path.dirname(__file__)) -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list