python search path on the command prompt in windows

John Salerno johnjsal at NOSPAMgmail.com
Sat Mar 11 00:51:31 EST 2006


Is there a way for me to somehow specify that I want Python to search 
all subdirectories of a particular directory when I'm running or testing 
files from the command prompt?

For example, I have a folder in my C:\Python24 folder called myscripts\. 
At first I saved my scripts in there, since there weren't many, and any 
work I did from the command prompt I did from this directory (with the 
directory added to my PYTHONPATH variable). But after using py2exe and 
seeing how many extra files and directories it created, I started to 
realize that it would be silly to keep all my files in just one folder.

So I made two folders in my myscripts\ folder, one called mytimer\ and 
the other called switches\. Now, if I'm still working in the myscripts\ 
directory at the command prompt, is there a way for Python to 
automatically check into these directories for any files I might be 
trying to run?

If not, is there a better way to do this?

Thanks.



More information about the Python-list mailing list