473,698 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

from Tkinter import *,win = Tk() "from Tkinter import *"

from Tkinter import *
win = Tk()
If I type those two lines at the command prompt (in WindowsXP) I get a
new window on my screen. Yet if I copy those lines in a file called
test.py and then run "python test.py" at the command prompt I am
returned to the command prompt and nothing shows up on the screen. Is
this normal behavior or is it a bug?

Thanks to all who responded to my previous post, it was quite helpfull.
Aug 3 '08 #1
1 2729
Pierre Dagenais wrote:
from Tkinter import *
win = Tk()
If I type those two lines at the command prompt (in WindowsXP) I get a
new window on my screen. Yet if I copy those lines in a file called
test.py and then run "python test.py" at the command prompt I am
returned to the command prompt and nothing shows up on the screen. Is
this normal behavior or is it a bug?

Thanks to all who responded to my previous post, it was quite helpfull.
The window opens and closes so fast you can't see it. You will need to put
something in the window and start a message loop for it to stay up there.

-Larry
Aug 3 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5292
by: John Benson | last post by:
Hi, I'm using Tkinter and would like to know how to replace the red "Tk" logo in the left corner of the title bar of the root window with some other icon. Another question for curiosity's sake: I've often seen Tkinter referred to as the "standard" Python GUI. I assume that this is because it may be the oldest and perhaps the most cross-platform. Is that all that can be said for it? I've already heard about the Tkinter interpretive...
3
8597
by: Peter Saffrey | last post by:
I am writing a multi-threaded Tkinter application. It worked fine with Python 2.2 under Redhat 8.0, but I have recently moved across to Debian (testing/unstable) and Python 2.3. Now I get the above error message. I read on this group somewhere that this is caused by calling Tk functions from a different thread to where the interface is running. Unfortunately, I really need to do this and cannot have all my Tk calls within one thread. Is...
4
6360
by: Tim Jarman | last post by:
Apologies in advance for the long post - I wanted to be sure I included all the relevant details. The answer is probably very, very simple. I am doing something stupid here, but I don't know what it is. I'm writing an application with a Tkinter GUI (Python 2.4, Tcl/Tk 8.4.) and I want to put a custom icon on the main window. I've followed (so far as I understand it) the recipe in the eff-bot's splendid Introduction to Tkinter - see:...
6
2522
by: mortuno | last post by:
Hi My tkinter apps worked fine in debian linux (woody and sarge) I moved to ubuntu 5.10 I follow the 'hello world' test as seen in http://wiki.python.org/moin/TkInter import _tkinter # with underscore, and lowercase 't'
1
2229
by: John Chambers | last post by:
Sp my latest adventure is attempting to use python's Tkinter module on a few machines. On my PB (OSX 10.3.9), I got the following confusing results: /Users/jc: python Python 2.3 (#1, Sep 13 2003, 00:49:11) on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import Tkinter Traceback (most recent call last): File "<stdin>", line 1, in ?
1
2437
by: alivip | last post by:
I integrat program to be GUI using Tkinter I try browser direction as you can see # a look at the Tkinter Text widget # use ctrl+c to copy, ctrl+x to cut selected text, # ctrl+v to paste, and ctrl+/ to select all # count words in a text and show the first ten items
2
2696
by: alivip | last post by:
when I wont to inser (anyting I print) to the textbox it will not inser it just print then hanging # a look at the Tkinter Text widget # use ctrl+c to copy, ctrl+x to cut selected text, # ctrl+v to paste, and ctrl+/ to select all # count words in a text and show the first ten items # by decreasing frequency
0
1919
by: alivip | last post by:
I write code to get most frequent words in the file I won't to implement bigram probability by modifying the code to do the following: How can I get every Token (word) and PreviousToken(Previous word) and frequency and probability From text file and put each one in cell in table For example if the text file content is "Every man has a price. Every woman has a price." First Token(word) is "Every" PreviousToken(Previous...
3
4194
by: seanacais | last post by:
I'm trying to build an unknown number of repeating gui elements dynamically so I need to store the variables in a list of dictionaries. I understand that Scale "variable" name needs to be a StringVar but I cannot figure out how to initialize the dictionary. I've tried the following code ps = PowerSupply() # Instantiate a Power Supply VM Object numOPs = ps.getOnum() # Find the number of outputs OPValues = # Global list to...
0
9152
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9016
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8856
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4613
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2321
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.