[Tutor] Re: Three questions about Python (and bundled software) in general

Andrei project5 at redrival.net
Sun Jan 25 05:31:19 EST 2004


Tadey from SLO wrote on Sun, 25 Jan 2004 10:31:32 +0100:

> Hello ...
> 
> 
> What is Tkinter, and what is Tcl/Tk  ??

TCL is a programming language. Tk is a toolkit for creating GUI's (windows
with buttons and the likes), written for TCL I believe. Tkinter is the
Python wrapper for Tk. I don't use Tkinter, but if I'm not mistaken the
Python distro comes with a TCL interpreter which is used to talk to Tk.

> - For Tcl/Tk I imagine, from what I read in Alan tutorial, that Tcl/Tk is 
> some sort of "foundation", kind of basis for "translating" to machine/binary 
> code, for Python coding being possible at all ...

I don't think you understood it properly, since what you're talking about
would be a compiler. You don't need Tkinter in order to write Python
programs - programs can work just fine from the command line, not all need
a GUI; you don't even need it to write GUI programs, you can use other GUI
libraries like wxPython (which is the Python wrapper for the wxWindows
toolkit).

> - And for Thinkter, it says it is Python's GUI programming system. But what 
> this actually means, how to interprete it to myself  ??

Basic Python only allows you to write programs with command line interface
(that's that black DOS screen in Windows or e.g. Bash in Linux). They're
not particularly user-friendly. You need an additional toolkit to write
modern apps with windows and controls on them. As I said above, Tkinter is
what ships with Python, but there are others.

> As far as I know, IDLE is GUI for Python, so this must be something else, 
> some kind of root for GUI being able, or GUI in meaning some "programming 
> system" for GUI programming (to program some GUI, and not "console/command 
> line" program)

No, IDLE is not a GUI, but it does have a GUI. GUI means Graphical User
Interface. IDLE is a programming editor or IDE. IDLE is written in Python
though and it does use Tkinter for its GUI. Again, you don't need IDLE to
program in Python and you also don't need it for GUI programming. In fact,
I write both GUI and non-GUI programs without ever touching IDLE. I use
SciTE, wxGlade and Spe.

> - Second, I have question, if anyone knows what could "corrupt" my Python 
> (to be more precise - IDLE) installation. After double-clicking on "idle.pyw", 
> I get message that "tcl84.dll" is missing, and re-installing product will help, 
> but I am certain, I didn't delete this dll, nor in Python directory, nor in 
> %SystemRoot%\system32 directory ..

Perhaps you didn't install the full Python, you left out TCL. Things
usually don't get corrupted on their own. Just do a full reinstallation and
all should be solved. I see you're on Windows. I recommend you to get the
ActiveState Python distro
(http://www.activestate.com/Products/ActivePython/ and click on the
Download link in the upper left corner). It includes PythonWin, which is a
better editor than IDLE (at least IMO). It doesn't use Tkinter btw.

-- 
Yours,

Andrei

=====
Mail address in header catches spam. Real contact info (decode with rot13):
cebwrpg5 at jnanqbb.ay. Fcnz-serr! Cyrnfr qb abg hfr va choyvp cbfgf. V ernq
gur yvfg, fb gurer'f ab arrq gb PP.




More information about the Tutor mailing list