I've always had a bit of trouble figuring out how to get Python set up properly in Windows.

I've already set up path=%path%;C:\python27 , so I'm able to open .py files with python. I'm just having trouble figuring out how to change the save directory.

For instance, I save all of my custom scripts in the directory Documents/Python. It's Win7, so no My Documents. I would like to be able to type "HelloWorld.py" into IDLE and have it search this folder for any matching script names. I haven't been able to figure out how to add this directory to the default Python search path though.

Any ideas?

Here's one attempt.

>>> import sys 
>>> sys.path 
['C:\\Python27\\Lib\\idlelib', 'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages'] 
>>> sys.path.append('C:\Users\Jimmy\Documents\Python') 
>>> HelloWorld.py 
Traceback (most recent call last): File "<pyshell#5>", line 1, in <module> HelloWorld.py NameError: name 'HelloWorld' is not defined `
Edit
Report