Help with setting up Tkinter

E

Eclipse

G'day All

I was following the instructions (listed at bottom of post) from the
PythonInfo Wiki which says to run three tests.

I ran the tests and test 1 and 2 worked

Test 3 gave me an error - <function _test at 0x0265D430>

can anyone help ???

Tks in advance

Pete
_________________________________________________________________________

Checking your Tkinter support

A good way to systematically check whether your Tkinter support is
working is the following.

Enter an interactive Python interpreter in a shell on an X console.

Step 1 - can _tkinter be imported?

Try the following command at the Python prompt:

* If it works, go to step 2.
* If it fails with "No module named _tkinter", your Python
configuration needs to be modified to include this module (which is an
extension module implemented in C). Do **not** edit Modules/Setup (it
is out of date). You may have to install Tcl and Tk (when using RPM,
install the -devel RPMs as well) and/or edit the setup.py script to
point to the right locations where Tcl/Tk is installed. If you install
Tcl/Tk in the default locations, simply rerunning "make" should build
the _tkinter extension.
* If it fails with an error from the dynamic linker, see above
(for Unix, check for a header/library file mismatch; for Windows,
check that the TCL/TK DLLs can be found).

Step 2 - can Tkinter be imported?

Try the following command at the Python prompt:

* If it works, go to step 3.
* If it fails with "No module named Tkinter", your Python
configuration need to be changed to include the directory that
contains Tkinter.py in its default module search path. You have
probably forgotten to define TKPATH in the Modules/Setup file. A
temporary workaround would be to find that directory and add it to
your PYTHONPATH environment variable. It is the subdirectory named
"lib-tk" of the Python library directory (when using Python 1.4 or
before, it is named "tkinter").

Step 3 - does Tkinter work?

Try the following command at the Python prompt:

* This should pop up a small window with two buttons. Clicking the
"Quit" button makes it go away and the command return. If this works,
you're all set. (When running this test on Windows, from Python run in
a MS-DOS console, the new window somehow often pops up *under* the
console window. Move it aside or locate the Tk window in the Taskbar.)
*

If this doesn't work, study the error message you get; if you
can't see how to fix the problem, ask for help.
 
K

koranthala

G'day All

I was following the instructions (listed at bottom of post) from the
PythonInfo Wiki which says to run three tests.

I ran the tests and test 1 and 2 worked

Test 3 gave me an error - <function _test at 0x0265D430>

can anyone help ???

Tks in advance

Pete


<function _test at 0x0265D430>

_________________________________________________________________________

Checking your Tkinter support

A good way to systematically check whether your Tkinter support is
working is the following.

Enter an interactive Python interpreter in a shell on an X console.

Step 1 - can _tkinter be imported?

Try the following command at the Python prompt:


    * If it works, go to step 2.
    * If it fails with "No module named _tkinter", your Python
configuration needs to be modified to include this module (which is an
extension module implemented in C). Do **not** edit Modules/Setup (it
is out of date). You may have to install Tcl and Tk (when using RPM,
install the -devel RPMs as well) and/or edit the setup.py script to
point to the right locations where Tcl/Tk is installed. If you install
Tcl/Tk in the default locations, simply rerunning "make" should build
the _tkinter extension.
    * If it fails with an error from the dynamic linker, see above
(for Unix, check for a header/library file mismatch; for Windows,
check that the TCL/TK DLLs can be found).

Step 2 - can Tkinter be imported?

Try the following command at the Python prompt:


    * If it works, go to step 3.
    * If it fails with "No module named Tkinter", your Python
configuration need to be changed to include the directory that
contains Tkinter.py in its default module search path. You have
probably forgotten to define TKPATH in the Modules/Setup file. A
temporary workaround would be to find that directory and add it to
your PYTHONPATH environment variable. It is the subdirectory named
"lib-tk" of the Python library directory (when using Python 1.4 or
before, it is named "tkinter").

Step 3 - does Tkinter work?

Try the following command at the Python prompt:


    * This should pop up a small window with two buttons. Clicking the
"Quit" button makes it go away and the command return. If this works,
you're all set. (When running this test on Windows, from Python run in
a MS-DOS console, the new window somehow often pops up *under* the
console window. Move it aside or locate the Tk window in the Taskbar.)
    *

      If this doesn't work, study the error message you get; if you
can't see how to fix the problem, ask for help.

Can you try Tkinter._test() instead of Tkinter._test
Just Tkinter._test will go and hit its __repr__ code - i.e.
representation I guess - which displays the function data instead of
running actual function.
 

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,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top