from Tkinter import *

Rainer Deyke root at rainerdeyke.com
Thu Mar 8 22:58:37 EST 2001


"Aahz Maruch" <aahz at panix.com> wrote in message
news:989dot$t6t$1 at panix3.panix.com...
> Actually, I disagree with the effbot.  I used to think it was okay to
> special-case "from Tkinter import *", but I've come to the conclusion
> that "import *" is _always_ a Bad Idea in any sort of production code.
> Sure it takes more work to write
>
> from Tkinter import Tk, Frame, Button, Entry, Canvas, Text
>
> but I think the payoff in clarity is worth it.

I have used 'from ... import *' to group several imports:

includes.py:
import a, b, c, d, e, f, g # This line is the entire content of includes.py

somethingelse.py:
from includes import * # Imports a, b, c, d, e, f, g
...


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list