Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:

On Tue, Oct 26, 2010 at 12:00 PM, Guido van Rossum
<rep...@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
...

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10199>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to