[Tutor] sys.path..... - PATH, one more time...

Andrei Kulakov ak@silmarill.org
Thu, 06 Dec 2001 12:05:49 -0500


On Thu, Dec 06, 2001 at 08:38:23AM -0800, Frank Peavy wrote:
> I have seen reference to sys.path and have looked at the Library Reference 
> but I am unsure how it works.
> 
> If I have the statement:
> 
> sys.path.append(variableName)
> 
> does this append variableName to my PATH?
> If my path for my py scripts is:
> 
> C:\Python 2.1\pys
> 
> Does this statement result in:
> 
> C:\Python 2.1\pys\variableName
> 
> ?? Please advise. Thanks.

No, more like:

my_path = "C:\\Python 2.1\\pys"
sys.path.append(my_path)

It may be that you need backslash right before the space, too, but I'm
not sure. I don't have a windows system here. Try both ways.

> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor

-- 
Cymbaline: intelligent learning mp3 player - python, linux, console.
get it at: cy.silmarill.org