[issue9387] Make python -m tkinter run tkinter demo

Alexander Belopolsky report at bugs.python.org
Tue Jul 27 17:10:56 CEST 2010

Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

On Tue, Jul 27, 2010 at 10:44 AM, Éric Araujo <report at bugs.python.org> wrote:
> Éric Araujo <merwok at netwok.org> added the comment:
> BTW, why is the sys.argv hackery necessary?
> Does import or runpy or something force us to jump through hoops?

I guess we need to ask benjamin.peterson or michael.foord.  I just
copied the hack from unittest/__main__.py.   I believe this is done in
order to convince optparse to print "python -m modname" rather than
"modname.py" in the python -m modname -h output.  Of course, tkinter
does not support -h (yet?), but I thought it would be better to
maintain consistency in how __main__.py is written.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list