Thomas Heller wrote:
> There are also other ways. You could extend __path__ of foo, and the
> pkgutil module might also be useful.
The __path__ trick worked nicely, thanks. Here is the code in case anyone is
interested
# Allow veusz to be run even if not installed into PYTHONPATH
try:
impor
Alex Martelli wrote:
> Jeremy Sanders <[EMAIL PROTECTED]> wrote:
>
>> Hi - Is it possible to override the import process so that if in my program
>> I do
>>
>> import foo.bar
>>
>> Python will look for bar in a directory which isn't called foo?
>>
>> I want my module/program to be able to be ru
Jeremy Sanders <[EMAIL PROTECTED]> wrote:
> Hi - Is it possible to override the import process so that if in my program
> I do
>
> import foo.bar
>
> Python will look for bar in a directory which isn't called foo?
>
> I want my module/program to be able to be run without being installed in
> si
Jeremy Sanders wrote:
> Hi - Is it possible to override the import process so that if in my program
> I do
(...)
>
> Any ideas?
Why not handle the foo.bar/version string separately and just append
the resulting path to sys.path?
--
http://mail.python.org/mailman/listinfo/python-list
Kartic wrote:
Hi Torsten,
If you want to use other methods to import (other than good ole file
system), yes, you can create an importer class and register it as an
importer module, that import will use to search and import.
For example, it is possible to use zip imports (this functionality is
alrea
Hi Torsten,
If you want to use other methods to import (other than good ole file
system), yes, you can create an importer class and register it as an
importer module, that import will use to search and import.
For example, it is possible to use zip imports (this functionality is
already builtin)