
While I would rather have a tk package (heck, I would be fine with ditching Tkinter entirely, but I really don't see that happening), but the Tkinter name is so wide-spread I don't think that is reasonable. So here is my current thinking:
Tkinter -> tkinter.__init__ Tix -> tkinter.tix turtle -> tkinter.turtle tkSimpleDialog -> tkinter.simpledialog tkMessageBox -> tkinter.messagebox tkFont -> tkinter.font tkFileDialog -> tkinter.filedialog Tkdnd -> tkinter.dnd Tkconstants -> tkinter.constants tkCommonDialog -> tkinter.commondialog tkColorChooser -> tkinter.colorchooser SimpleDialog -> tkinter.simpledialog ScrolledText ->tkinter.scrolledtext FixTk -> tkinter._fix FileDialog -> tkinter.filedialog Dialog -> tkinter.dialog Canvas -> tkinter.canvas
I know Guido has said he doesn't like stuffing a bunch of stuff into the __init__ of a package, but considering none of the other modules are worth anything without the main Tkinter module anyway I don't see any issues here.
-Brett

On 2008-02-20 11:05, Brett Cannon wrote:
While I would rather have a tk package (heck, I would be fine with ditching Tkinter entirely, but I really don't see that happening), but the Tkinter name is so wide-spread I don't think that is reasonable.
Hey, it's Py3k...
So here is my current thinking:
Tkinter -> tkinter.__init__ Tix -> tkinter.tix turtle -> tkinter.turtle tkSimpleDialog -> tkinter.simpledialog tkMessageBox -> tkinter.messagebox tkFont -> tkinter.font tkFileDialog -> tkinter.filedialog Tkdnd -> tkinter.dnd Tkconstants -> tkinter.constants tkCommonDialog -> tkinter.commondialog tkColorChooser -> tkinter.colorchooser SimpleDialog -> tkinter.simpledialog ScrolledText ->tkinter.scrolledtext FixTk -> tkinter._fix FileDialog -> tkinter.filedialog Dialog -> tkinter.dialog Canvas -> tkinter.canvas
I know Guido has said he doesn't like stuffing a bunch of stuff into the __init__ of a package, but considering none of the other modules are worth anything without the main Tkinter module anyway I don't see any issues here.
I usually put all the package top-level code into a separate module with the same name as the package.
__init__.py then imports all the necessary symbols from that module.
These are problems I've had with putting code into __init__.py:
* if there's a bug in __init__.py it's impossible to load sub-modules/packages; if you import the code from another module, you can wrap that into try-except and still get access to the sub-modules
* a user will typically not look into __init__.py to find code
If you name the package "tk" you could name the main module "inter" and then end up with "tk.inter" which again resembles the widespread Tkinter name.
I'd much rather see Tkinter and all the other bits be split from the core and placed into a separate distribution, but the IDLE fans would probably not like that.

On Feb 20, 2008 2:27 AM, M.-A. Lemburg mal@egenix.com wrote:
On 2008-02-20 11:05, Brett Cannon wrote:
While I would rather have a tk package (heck, I would be fine with ditching Tkinter entirely, but I really don't see that happening), but the Tkinter name is so wide-spread I don't think that is reasonable.
Hey, it's Py3k...
So here is my current thinking:
Tkinter -> tkinter.__init__ Tix -> tkinter.tix turtle -> tkinter.turtle tkSimpleDialog -> tkinter.simpledialog tkMessageBox -> tkinter.messagebox tkFont -> tkinter.font tkFileDialog -> tkinter.filedialog Tkdnd -> tkinter.dnd Tkconstants -> tkinter.constants tkCommonDialog -> tkinter.commondialog tkColorChooser -> tkinter.colorchooser SimpleDialog -> tkinter.simpledialog ScrolledText ->tkinter.scrolledtext FixTk -> tkinter._fix FileDialog -> tkinter.filedialog Dialog -> tkinter.dialog Canvas -> tkinter.canvas
I know Guido has said he doesn't like stuffing a bunch of stuff into the __init__ of a package, but considering none of the other modules are worth anything without the main Tkinter module anyway I don't see any issues here.
I usually put all the package top-level code into a separate module with the same name as the package.
__init__.py then imports all the necessary symbols from that module.
Right. tkinter.__init__ would just import * from _tkinter anyway.
These are problems I've had with putting code into __init__.py:
if there's a bug in __init__.py it's impossible to load sub-modules/packages; if you import the code from another module, you can wrap that into try-except and still get access to the sub-modules
a user will typically not look into __init__.py to find code
If you name the package "tk" you could name the main module "inter" and then end up with "tk.inter" which again resembles the widespread Tkinter name.
FIne by me. What do other people think?
I'd much rather see Tkinter and all the other bits be split from the core and placed into a separate distribution, but the IDLE fans would probably not like that.
Perhaps its time to move IDLE out of the core and into its own project. idlefork seemed to do fine when it was a separate project on SF. I know it has been cute to have an IDE included with Python, but we can also just make it an easy download as well to continue to have a simple IDE available for new programmers to use.
-Brett

M.-A. Lemburg wrote:
On 2008-02-20 11:05, Brett Cannon wrote:
While I would rather have a tk package (heck, I would be fine with ditching Tkinter entirely, but I really don't see that happening), but the Tkinter name is so wide-spread I don't think that is reasonable.
Hey, it's Py3k...
+ 1
So here is my current thinking:
Tkinter -> tkinter.__init__
Possibly
Tkinter -> tk.tkinter
and have tk.__init__ import it with "from tk.tkinter import *"?

On Feb 20, 2008 5:14 AM, Ron Adam rrr@ronadam.com wrote:
M.-A. Lemburg wrote:
On 2008-02-20 11:05, Brett Cannon wrote:
While I would rather have a tk package (heck, I would be fine with ditching Tkinter entirely, but I really don't see that happening), but the Tkinter name is so wide-spread I don't think that is reasonable.
Hey, it's Py3k...
- 1
Is that for the removal or the package name of tk? Question applies to MAL as well as I forgot to ask that of him when he made the Py3K comment.
So here is my current thinking:
Tkinter -> tkinter.__init__
Possibly
Tkinter -> tk.tkinter
and have tk.__init__ import it with "from tk.tkinter import *"?
I would rather do tk.inter than that amount of repetition in the package/module name.
-Brett

On 2008-02-20 21:16, Brett Cannon wrote:
On Feb 20, 2008 5:14 AM, Ron Adam rrr@ronadam.com wrote:
M.-A. Lemburg wrote:
On 2008-02-20 11:05, Brett Cannon wrote:
While I would rather have a tk package (heck, I would be fine with ditching Tkinter entirely, but I really don't see that happening), but the Tkinter name is so wide-spread I don't think that is reasonable.
Hey, it's Py3k...
- 1
My reply was meant to say: it's P3k, so we're allowed to make changes even if a module name is in wide-spread use. Besides, we're not breaking the code itself.
Is that for the removal or the package name of tk? Question applies to MAL as well as I forgot to ask that of him when he made the Py3K comment.
So here is my current thinking:
Tkinter -> tkinter.__init__
Possibly
Tkinter -> tk.tkinter
and have tk.__init__ import it with "from tk.tkinter import *"?
I would rather do tk.inter than that amount of repetition in the package/module name.

Brett Cannon wrote:
On Feb 20, 2008 5:14 AM, Ron Adam rrr@ronadam.com wrote:
M.-A. Lemburg wrote:
On 2008-02-20 11:05, Brett Cannon wrote:
While I would rather have a tk package (heck, I would be fine with ditching Tkinter entirely, but I really don't see that happening), but the Tkinter name is so wide-spread I don't think that is reasonable.
Hey, it's Py3k...
- 1
Is that for the removal or the package name of tk? Question applies to MAL as well as I forgot to ask that of him when he made the Py3K comment.
+1 on a tk package vs tkinter package. It's much shorter and most of the modules are still spelled nearly the same.
TkMessageBox -> tk.messagebox TkFileDialog -> tk.filedialog
So here is my current thinking:
Tkinter -> tkinter.__init__
Possibly
Tkinter -> tk.tkinter
and have tk.__init__ import it with "from tk.tkinter import *"?
I would rather do tk.inter than that amount of repetition in the package/module name.
Maybe it should be tk.interface?
Ron

On Wed, Feb 20, 2008 at 1:42 PM, Ron Adam rrr@ronadam.com wrote:
Brett Cannon wrote:
On Feb 20, 2008 5:14 AM, Ron Adam rrr@ronadam.com wrote:
M.-A. Lemburg wrote:
On 2008-02-20 11:05, Brett Cannon wrote:
While I would rather have a tk package (heck, I would be fine with ditching Tkinter entirely, but I really don't see that happening), but the Tkinter name is so wide-spread I don't think that is reasonable.
Hey, it's Py3k...
- 1
Is that for the removal or the package name of tk? Question applies to MAL as well as I forgot to ask that of him when he made the Py3K comment.
+1 on a tk package vs tkinter package. It's much shorter and most of the modules are still spelled nearly the same.
TkMessageBox -> tk.messagebox TkFileDialog -> tk.filedialog
So here is my current thinking:
Tkinter -> tkinter.__init__
Possibly
Tkinter -> tk.tkinter
and have tk.__init__ import it with "from tk.tkinter import *"?
I would rather do tk.inter than that amount of repetition in the package/module name.
Maybe it should be tk.interface?
Yeah, but tk.inter has the perk of being so close to Tkinter that all of the name references out there will still (roughly) work. I would really like to prevent from killing Tkinter's name recognition if possible.
-Brett
participants (3)
-
Brett Cannon
-
M.-A. Lemburg
-
Ron Adam