Unix-head needs to Windows-ize his Python script (II)

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Oct 29 04:52:59 EDT 2010


gb345 wrote:

> I see how clicking directly on these files would obviate the need
> to specify the path of the interpreter, but it's still not clear
> to me how the interpreter would know where to look for the myscript.py
> module that both the GUI scripts require.

If it's in the same directory as the GUI script, or in some
known location relative to it, you should be able to locate
it based on the fact that sys.path[0] starts off containing
the pathname of the directory containing the running script.

-- 
Greg



More information about the Python-list mailing list