By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,364 Members | 1,536 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,364 IT Pros & Developers. It's quick & easy.

New to Tkinter...

P: n/a
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
pe**@osc.edu
work: 614.292.1091
fax: 614.292.XXXX
"DOC NOTE, I DISSENT. A FAST NEVER PREVENTS A FATNESS. I DIET ON COD."
-Peter Hilton

Jul 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Tue, 19 Apr 2005 09:35:03 -0400, Peter G Carswell <pe**@osc.edu> wrote:
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
--
python -c 'print "".join([chr(154 - ord(c)) for c in "U(17zX(%,5.z^5(17l8(%,5.Z*(93-965$l7+-"])'
Jul 19 '05 #2

P: n/a
Eric Brunel wrote:
On Tue, 19 Apr 2005 09:35:03 -0400, Peter G Carswell <pe**@osc.edu>
wrote:
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


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
pe**@osc.edu
work: 614.292.1091
fax: 614.292.XXXX
"DOC NOTE, I DISSENT. A FAST NEVER PREVENTS A FATNESS. I DIET ON COD."
-Peter Hilton

Jul 19 '05 #3

P: n/a
Eric Brunel wrote:
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.
import _tkinter
import Tkinter
Tkinter._test() 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
pe**@osc.edu
work: 614.292.1091
fax: 614.292.XXXX
"DOC NOTE, I DISSENT. A FAST NEVER PREVENTS A FATNESS. I DIET ON COD."
-Peter Hilton

Jul 19 '05 #4

P: n/a
hue
Hello

Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.