"module pointer files" for import (now and py2.5) ?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

"module pointer files" for import (now and py2.5) ?

From: robert <no-spam@no-spam-no-spam.com>
Date: Thu Mar 30 2006 - 18:30:17 CEST

I want to occasionally do a "redirected" import of a python module which
is located offside of the legacy sys.path (Windows) - for example a tool
is maintained within "cgi-bin" web stuff (while I do not want to add
that whole folder's stuff to the sys.path)

.pth adds only directories to the python path.

is there a convenient/short method to create a python "module pointer"
(file) to such module - maybe just create such pointer file somewhere on
the python path (in my "sitetools") ?

If no clean method, what is the best ad-hoc trick?

( In addition to what mere UNIX links would do, it should be consistent
pythonic: such module can import neighbor modules (relatively), create
the .pyc's next to the code... )

Is such stuff more easy and consistent with py2.5's relative imports?
Are such module pointers maybe supported somehow in py2.5?

robert
Received on Sun Apr 30 21:41:31 2006