>> listed in the variable sys.path. sys.path gets populated when >> Python starts up and includes some standard locations plus >> any you define in your PYTHONPATH environment variable. >> > I checked my PYTHONPATH environment variable
> My questions are: > 1. since the desktop directory is not listed in the PYTHONPATH , > why there is no error report when I import a module which is in the > desktop? > 2. why there is no directory such as c:\python24 where I install the > python? Notice i said it ioncluded some "standard locations" as well as Python Path. The standard library, sitepackages and current directory are all included. If you want to see the full set of locations python is loking in you need to print sys.path >>> import sys >>> print sys.path For example I get: Alan [EMAIL PROTECTED] ~ $ printenv PYTHONPATH /cygdrive/d/Development/PROJECTS/Python And in Python >>> sys.path ['', '/cygdrive/d/Development/PROJECTS/Python', '/usr/lib/python24.zip', '/usr/l ib/python2.4', '/usr/lib/python2.4/plat-cygwin', '/usr/lib/python2.4/lib-tk', '/ usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages'] >>> So I have quite a lot more defined than what is in PYTHONPATH HTH, Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor