On Sun, Nov 24, 2013 at 09:04:59AM +1100, Chris Angelico wrote:It sounds like you're describing an import hook, although such things
> Just a really crazy idea... Does Python let you go "one level outside"
> and tinker with the code that imports __main__? I haven't looked into
> all that mechanism, but I know quite a bit of it is now implemented in
> Python, so it's theoretically possible... could you, in effect, add a
> line of code *after* that import that effectively calls
> __main__.__main__(sys.argv) ? That would do most of what you want.
are completely opaque to me. I know they exist, but I've got no idea how
they work or what they can do.
--
Steven
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas