New to Tkinter...

P

Peter G Carswell

Good Morning.

I am new to Tkinter. I have been testing the installation of Tkinter
through the python web site. The first two test steps give no errors,
'import _tkinter' and 'import Tkinter'. However, the third step,
'Tkinter._test', gives the error:
<function _test at 0xb7ec8df4>

Any suggestions?

pete

--
Peter G. Carswell
The Ohio Supercomputer Center
(e-mail address removed)
work: 614.292.1091
fax: 614.292.XXXX
"DOC NOTE, I DISSENT. A FAST NEVER PREVENTS A FATNESS. I DIET ON COD."
-Peter Hilton
 
E

Eric Brunel

Good Morning.

I am new to Tkinter. I have been testing the installation of Tkinter
through the python web site. The first two test steps give no errors,
'import _tkinter' and 'import Tkinter'. However, the third step,
'Tkinter._test', gives the error:
<function _test at 0xb7ec8df4>

This is not an error. It's just the value of the _test function in the Tkinter module. You don't give the URL where you found the installation/test instructions, but you probably want:

Tkinter._test()

which *calls* the function. Tkinter._test just returns its value (functions are first class objects in Python...)

HTH
 
P

Peter G Carswell

Eric said:
This is not an error. It's just the value of the _test function in the
Tkinter module. You don't give the URL where you found the
installation/test instructions, but you probably want:

Tkinter._test()

which *calls* the function. Tkinter._test just returns its value
(functions are first class objects in Python...)

HTH

Thanks, I realized my beginners' error just after I emailed the
newgroup. I am sure this won't be my last question.

pete


--
Peter G. Carswell
The Ohio Supercomputer Center
(e-mail address removed)
work: 614.292.1091
fax: 614.292.XXXX
"DOC NOTE, I DISSENT. A FAST NEVER PREVENTS A FATNESS. I DIET ON COD."
-Peter Hilton
 
P

Peter G Carswell

Eric said:
This is not an error. It's just the value of the _test function in the
Tkinter module. You don't give the URL where you found the
installation/test instructions, but you probably want:

Tkinter._test()

which *calls* the function. Tkinter._test just returns its value
(functions are first class objects in Python...)

I did get a positive result on my linux desktop. However, on my laptop
Fedora Core 1, the Tk window shell popped up with no buttons:

Python 2.2.3 (#1, Oct 15 2003, 23:33:35)
[GCC 3.3.1 20030930 (Red Hat Linux 3.3.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 3118, in _test
label = Label(root, text=text)
File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 2285, in __init__
Widget.__init__(self, master, 'label', cnf, kw)
File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 1780, in __init__
self.tk.call(
SystemError: Py_UNICODE and Tcl_UniChar differ in size
pete

--
Peter G. Carswell
The Ohio Supercomputer Center
(e-mail address removed)
work: 614.292.1091
fax: 614.292.XXXX
"DOC NOTE, I DISSENT. A FAST NEVER PREVENTS A FATNESS. I DIET ON COD."
-Peter Hilton
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top