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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4