[Tutor] Idle
alan.gauld@bt.com
alan.gauld@bt.com
Mon, 14 Jan 2002 17:23:40 -0000
> >> (I have looked at the documentation for import and it talks about
> sys.path, so maybe I could add directories to sys.path in Idle?
>
> Yes, you could indeed. Just do this:
>
> ###
> import sys
> sys.path.append("C:\\source\\python\\")
> ###
Or set the PYTHONPATH environment variable.
>
> And you should now be able to import dvtest.py.
But note that you do so by writing:
import dvtest
ie you don't include the file extension '.py'
Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld