Inyeol Lee <[EMAIL PROTECTED]> writes: > On Fri, Dec 02, 2005 at 07:33:20PM -0500, Mike Meyer wrote: >> > The problem is that myscript.py and some modules that myscript.py >> > imports are not in the current directory, but in another place in the >> > filesystem, say, /path/to/stuff. If this was a tcsh script, I would >> > just do: >> > >> > setenv PYTHONPATH /path/to/stuff >> > python myscript.py > How about using python -m? > Assuming Make uses Bourne shell, > > %.abc: %.def > PYTHONPATH=/path/to/stuff:/path/to/another python -m myscript
That will break __name__ (at least with 2.4.2). Whether or not it matters will depend on the script. <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list