Activating `-i' from inside a script?
François Pinard
pinard at iro.umontreal.ca
Fri Jun 27 07:49:59 EDT 2003
[Troy Melhase]
> if __name__ == '__main__':
> discrepancy = True
> if discrepancy:
> os.environ['PYTHONINSPECT'] = "why yes, i'd like that"
> A quick read of Modules/main.c shows that the environment variable is
> checked at program start, not at end. Maybe this is a bug?
It would be nice if the Python crew was willing to see this as a bug. A
program might also delete PYTHONINSPECT if it feels shy to get naked. :-)
--
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list
mailing list