#include equivalent

deadmeat root at [127.0.0.1]
Mon Apr 2 18:51:16 EDT 2001


> Yes, but you shouldn't use it for that --- instead, use import.

Doesn't import only work for modules that live in sys.path/pythonpath?
execfile allows one to specify exactly what file to use, which is good for
keeping projects and the libraries they use separate (a lot of scripting
languages seem to have this thing for dumping everything into the system
library paths...)

Perhaps adding ./include to pythonpath, then importing, would be a suitable
compromise (see section 6.1
http://www.python.org/doc/current/tut/node8.html)

ICBW, YMMV, etc.






More information about the Python-list mailing list