On Sat, Jul 30, 2011 at 6:23 PM, Ethan Furman <et...@stoneleaf.us> wrote:
> 8<-- sitecustomize.py ---------------------------------
> class SetTitle(object):
>    def __del__(self):
>        command = ' '.join(sys.argv)
>
> sys.argv = SetTitle()

I'm afraid I don't understand this. Why create an object and do the
work in the destructor? When will the destructor be called? Will you
subsequently be overwriting sys.argv with the actual arguments?

This code snippet makes excellent sense if and only if it's executed
before sys.argv gets set to something meaningful. I'm just not
following how you organize for this to be the case. Is
sitecustomize.py executed before sys.argv is set, and is this affected
by the fact that it actually imports sys?

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to