Re: Altering sys.argv on startup in Python 2

2016-06-13 Thread Adam Bartoš
Thank you very much, the hook gets invoked at the right place. Adam Bartoš -- https://mail.python.org/mailman/listinfo/python-list

Re: Altering sys.argv on startup in Python 2

2016-06-12 Thread Random832
On Sun, Jun 12, 2016, at 13:51, Random832 wrote: > if edit_done: > return this should of course be raise ImportError - an artifact of some refactoring I did on the example. -- https://mail.python.org/mailman/listinfo/python-list

Re: Altering sys.argv on startup in Python 2

2016-06-12 Thread Random832
On Sun, Jun 12, 2016, at 13:51, Random832 wrote: > if edit_done: > return this should of course be raise ImportError - an artifact of some refactoring I did on the example. -- https://mail.python.org/mailman/listinfo/python-list

Re: Altering sys.argv on startup in Python 2

2016-06-12 Thread Random832
On Sun, Jun 12, 2016, at 08:56, Adam Bartoš wrote: > Hello, > > I'm trying to employ code like > https://code.activestate.com/recipes/572200/ > at Python 2 startup. The problem is that sys.argv isn't polulated yet > when > sitecustomize is executed. Is there any way around? I was thinking about >

Altering sys.argv on startup in Python 2

2016-06-12 Thread Adam Bartoš
Hello, I'm trying to employ code like https://code.activestate.com/recipes/572200/ at Python 2 startup. The problem is that sys.argv isn't polulated yet when sitecustomize is executed. Is there any way around? I was thinking about something like temporarily chaning sys.modules['sys'] or sys.__dict