homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, gvanrossum
Date 2010年10月26日.16:25:57
SpamBayes Score 2.3576293e-07
Marked as misclassified No
Message-id <AANLkTik=yZta+Kz_PDJpFco4K8fL1HLDPhRBg=retH8C@mail.gmail.com>
In-reply-to <1288108814.85.0.487929496399.issue10199@psf.upfronthosting.co.za>
Content
On Tue, Oct 26, 2010 at 12:00 PM, Guido van Rossum
<report@bugs.python.org> wrote:
..
> IMO converting turtle.py into a package, unless that's already planned anyway, is not a good project
> to undertake right now.
What are your reasons? I don't necessarily disagree, but want to
weight pros and cons. It does not seem like a hard thing to do:
rename turtle.py to turtle/__init__.py and add __main__.py. As I
said, I don't intend to anything more than that in the first step.
> (OTOH the demo itself already is a package, less an __init__.py file.)
Unfortunately it also relies on being run from directory containing
the main script, so converting it into a proper package is a bit more
involved than renaming the directory and adding an empty __init__.py
file. Still it is not that hard.
> Note that the turtle module already runs some demo when invoked as a script
> -- maybe this can be made to fire up the demo viewer instead?
Yes, I wanted to do that as well. Note that in this case, it would be
natural to move turtleDemo.py code into turtle/__main__.py. I would
also like to be able to run individual tdemo_* scripts without the
demo viewer or with an alternative viewer. Some naming decisions have
to be made for that as well:
$ python -m turtle.tdemo_chaos
$ python -m turtle.demo.chaos
$ python -m turtledemo.tdemo_chaos
...
History
Date User Action Args
2010年10月26日 16:25:59belopolskysetrecipients: + belopolsky, gvanrossum
2010年10月26日 16:25:58belopolskylinkissue10199 messages
2010年10月26日 16:25:57belopolskycreate

AltStyle によって変換されたページ (->オリジナル) /