Gregory P. Smith wrote:
>> I also tried to check if os.stat(__main__.__file__).st_uid ==
>> os.getuid() but the real __main__ is not available in site.py. It's
>> loaded and assigned much later.
> 
> Is sys.argv[0] available at that point?


No, it's not available, too. The 'site' module is imported by
Py_Initialize(). sys.argv and the real __main__ module are set much
later in Modules/main.c.

Christian
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to