tk = Tk() opens no window in Ubuntu12.4.4 & IDLE3 unlike IDLE in windows 7 Starter IDLE

Asked by Randy

Code that runs with IDLE in Python 3.3.2 under Windows 7 starter does nothing in Ubuntu 12.4.4. Simple case:
import tkinter
from tkinter import *
tk = Tk()
 No error message just another prompt.

I don't know if this is a bug or unique to my system. Any hints on troubleshooting will be much appreciated.

Question information

English Edit question
Ubuntu python3-defaults Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
Randy (coifed48641) said :

----> Steps taken:
1>The HD was reinitialized and Ubuntu 12.4.4 was reinstalled and updated. Update manager claims the system is up to date. Python 2.7.3 (default, Feb 27 2014, 20:00:17) [GCC 4.6.3] on linux2 came installed by default.
2>Idle3 was installed with apt-get.
3>The suggested packages were also installed (blt-demo python3-doc tix python3-tk-dbg python3.2-doc binfmt-support tclreadline)
4>idle3 was intered at the terminal
5> the following was entered at the Python Shell:
>>> import tkinter
>>> from tkinter import *
>>> tk = Tk()
6> No window was opened on the desktop.
7> help (Tk) produced (Help on class Tk in module tkinter: ...)
8> A script using turtle graphics was opened in a new window and run resulting in:
----> Other observed behavior:
Python Turtle graphics scripts create a window and the script completes then hangs. The Python Turtle Graphics window moves but will not dismiss. Neither will the Python Shell window nor the Python script window. Kill -9 pid in the terminal window of the GUI desktop will dismiss the three windows.
I hope I am not posting in the wrong topic. When I reinstalled ubuntu I lost my bookmark and discovered search on "tk = Tk()" resulted in "not found in ubuntu python3".

Revision history for this message
Randy (coifed48641) said :

Works as expected when invoked by clicking idle3 icon in dash (circle at top of task bar). I had been starting by typing idle3 in a terminal. I notice the icon cannot be locked to the task bar. Sorry if I am using a windows name for the left column containing icons. Will happily stand corrected.

Revision history for this message
Randy (coifed48641) said :

For more info on using the command line and Python 2 vs 3 compatibility, plus testing, check out: