Activating `-i' from inside a script?
pinard at iro.umontreal.ca
Fri Jun 27 13:49:59 CEST 2003
> 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