Originally Posted by ghostdog74
# mv /path/to/python/script /path/to/python/lib/myscript.py
Type "help", "copyright", "credits" or "license" for more information.
>>> import myscript
or just simply move myscript to the python lib directory without renaming. It will still work.
Thanks for the suggestion, but I don't own the file or directory, don't have write permissions where it lives, can't change the name because I'm not the only one/thing who uses it, and don't have write access to python's libdir.
I could copy it somewhere, yes. I could put a symbolic link somewhere, yes. Solutions like that, however, clutter up the file system with copies of files that could be used otherwise.
ntubski: thanks for execfile. that looks a little cleaner.