How to insert my own module in front of site eggs?

Hans Mulder hansmu at xs4all.nl
Fri Nov 18 05:52:54 EST 2011


On 18/11/11 03:58:46, alex23 wrote:
> On Nov 18, 11:36 am, Roy Smith<r... at panix.com>  wrote:
>> What if the first import of a module is happening inside some code you
>> don't have access to?

> No import will happen until you import something.

That would be the case if you use the '-S' command line option.

Otherwise, site.py is imported before you get a chance to alter
sys.path, and by default site.py imports other modules.

-- HansM




More information about the Python-list mailing list