Python implementation of "include"
lloyd at paisite.com
lloyd at paisite.com
Thu Dec 13 17:53:49 EST 2007
Hi Tim,
Thanks for the response.
As I understand it, import myFile and include "myFile.py" are not quite the same.
--
for import to work myFile.py must be in the same directory as the code
that calls it accessible through PYTHONPATH, whereas include
"../somedirectory/myFile.py" works in Karrigell, even though it is not
accessible through PYTHONPATH.
-- if imported, the print
statement myFile.py would only run the first time through unless
reload(myFile) is executed in the proper place.
Please correct me if I'm mistaken.
All the best,
Lloyd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071213/0dd8d20b/attachment.html>
More information about the Python-list
mailing list