Q: newbie win95 - python path navigation assignment strategies needed

Terry Reedy tjreedy at udel.edu
Thu Apr 8 22:59:32 EDT 1999


In article <7eibtm$igb$1 at news1.cableinet.co.uk>, jasonic at nomadicsltd.com 
says...

>I do not understand the relationships between modules, namespace, path and
>the Python shell. When I am in the python shell at the prompt I can

The main differences between batch and interactive mode are that the latter:
1. echoe the value of expressions;
2. requires a blank line to terminate blocks (if, while, for, def, class).

A module, once imported, is (or becomes) a namespace.  Path is where to fine 
the text for modules.

>But how and when do I need to change the working directory?
>I cannot seem to find a setcwd() command or similar.. Am I missing
>something?

Yes.  For 'how', check contents of ntpath.  For when, when you want to import 
modules not on explicit paths in sys.pyth (so that they are in '.') or when 
you want to open files for reading and writing by simple name without a path.

I'm not sure about some of other questions.  Hope this helps.  I also work on 
Win95 and have few problems.

Terry J. Reedy





More information about the Python-list mailing list