python search path on the command prompt in windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Salerno

    #1

    python search path on the command prompt in windows

    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.
Working...