[Tutor] automatically extending PYTHONPATH?

Liam Clarke cyresse at gmail.com
Mon Mar 21 23:00:01 CET 2005


No automatic method, afaik, but why not just do an os.walk() in
conjunction with sys.append()?

Regards, 

Liam Clarke


On Mon, 21 Mar 2005 16:33:20 -0500, Marcus Goldfish
<magoldfish at gmail.com> wrote:
> I am using Python 2.4/IDLE on WinXP.  I organize my sourcefiles in a
> directory tree, similar to the convention used in Java.  When I create
> a new subdirectory, though, I have to either (i) manually edit my
> PYTHONPATH environment variable, or (ii) do a sys.append() in IDLE for
> the new scripts to be visible.  Is there a workaround for this?  For
> example, is there a setting in IDLE of Python to specify a root source
> directory and have all subdirectories added automatically?
> 
> Hope this makes sense, and that a brilliant mind has a quick solution!
> 
> Thanks,
> Marcus
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
> 


-- 
'There is only one basic human right, and that is to do as you damn well please.
And with it comes the only basic human duty, to take the consequences.


More information about the Tutor mailing list