newbie needs help with GUI

T

ted

Hi,

I just installed Python 2.3 from python.org and installed it on Win2000.

When I double-click my gui script, a dos window appears behind the Tkinter
gui.

How do I stop the dos window from coming up when I launch the gui script?

BTW, here's the code to the gui.

from Tkinter import *
w = Button(text="Hello", command='exit')
w.pack()
w.mainloop()

Thanks,
Ted
 
S

Scott David Daniels

ted said:
Hi,

I just installed Python 2.3 from python.org and installed it on Win2000.

When I double-click my gui script, a dos window appears behind the Tkinter
gui.

How do I stop the dos window from coming up when I launch the gui script?

BTW, here's the code to the gui.

from Tkinter import *
w = Button(text="Hello", command='exit')
w.pack()
w.mainloop()

Thanks,
Ted
I suspect python.exe is associated with your.py file.
Reassociate with pythonw.exe from the same directory.

-Scott David Daniels
[email protected]
 
A

achrist

ted said:
Hi,

I just installed Python 2.3 from python.org and installed it on Win2000.

When I double-click my gui script, a dos window appears behind the Tkinter
gui.

How do I stop the dos window from coming up when I launch the gui script?

Not a bug, it's a feature. Really cool for debugging a gui app with
print statements.

I rename my *.py files to *.pyw if I'm done debugging and I want
the console to vanish. You don't even have to remove the print
statements. They won't crash the program even though there is no
console to print on. The messages might go to a secret place, IDK.
I can imagine that when this computer reaches its final reward,
the recycler will smash some component deep in the guts of this
machine and all of that previously unseen print output will splill
out all over the floor.


Al
 
C

Cliff Wells

The messages might go to a secret place, IDK.
I can imagine that when this computer reaches its final reward,
the recycler will smash some component deep in the guts of this
machine and all of that previously unseen print output will splill
out all over the floor.

That's just silly. Everyone knows computers recycle unused characters
for later use. Unix often stores them in /dev/null which is why so many
scripts send unwanted characters there. Windows, of course, leaks
characters, which is why all MS applications ship with something called
a "font pack" which is really just extra characters so it doesn't run
out.

Cliff
 
S

Scott Chapman

That's just silly. Everyone knows computers recycle unused characters
for later use. Unix often stores them in /dev/null which is why so many
scripts send unwanted characters there. Windows, of course, leaks
characters, which is why all MS applications ship with something called
a "font pack" which is really just extra characters so it doesn't run
out.

This has been a major problem at Microsoft that their engineers have been
wringing their hands over for a long time. When the computer temporarily
runs out of characters through this leakage, it makes a blue screen and gives
you a cryptic error message that doesn't mention character loss at all, while
it digs around through the font packs trying to find some unused ones. The
faster CPU systems currently available are seen as the fix for this issue,
combined with Microsoft's recent breakthrough -- they can use the wasted CPU
cycles on these machines to generate new characters within the system! This
is actually the main reason that the newer versions of Windows are somewhat
more stable than their predecessors, although it's a very CPU intensive
process. I find it ironic and very humerous that Linux has so many extra
characters that it can just send them to the recycle bin while Windows is so
wasteful of them that it causes operating system instability! Anybody that
doesn't know how much superior Linux is to Windows is just plain ignorant.

Scott
 
C

Cliff Wells

This has been a major problem at Microsoft that their engineers have been
wringing their hands over for a long time. When the computer temporarily
runs out of characters through this leakage, it makes a blue screen and gives
you a cryptic error message that doesn't mention character loss at all, while
it digs around through the font packs trying to find some unused ones.

Well, if you think about it, the cryptic error message is practically
self-explanatory. If it had more characters it wouldn't have to be so
cryptic.

Cliff
 
P

Patrick Useldinger

This has been a major problem at Microsoft that their engineers have been
wringing their hands over for a long time. When the computer temporarily
runs out of characters through this leakage, it makes a blue screen and gives
you a cryptic error message that doesn't mention character loss at all, while
it digs around through the font packs trying to find some unused ones. The

Is there any statistical analysis available if the probability of
running out of characters is more or less likely with a given (natural)
language? Or a given set of applications?

-pu
 
B

Ben Finney

You don't see a lot of Usenet postings from Poland or Hawai'i, do you?
That is why. Had the last WTO round not failed, trade in vowels and
consonants between Poland and Hawai'i would have solved the problem,
to the immense profit of both.

Rubbish. The WTO proposal for vowel-trading would have enriched the
first-world nations only, to the detriment of both.

The WIPO would have ensured that, within ten years, all nations would
need to license individual use of vowels, and the vowels would
self-destruct if pronounced in a non-approved manner.
 
G

Greg Krohn

Ben Finney said:
Rubbish. The WTO proposal for vowel-trading would have enriched the
first-world nations only, to the detriment of both.

The WIPO would have ensured that, within ten years, all nations would
need to license individual use of vowels, and the vowels would
self-destruct if pronounced in a non-approved manner.

--
\ "Anytime I see something screech across a room and latch onto |
`\ someone's neck, and the guy screams and tries to get it off, I |
_o__) have to laugh, because what is that thing?" -- Jack Handey |
Ben Finney <http://bignose.squidly.org/>

Sorry to intrude, but this thread reminded me of an old Onion article:

http://www.theonion.com/onion2816/vowels2816.html

greg
 
F

Frantisek Fuka

I just wanted to say that "Strc prst skrz krk" is perfectly valid Czech
sentence (meaning "Put your finger in your throat"). Thank you.
 
P

Patrick Useldinger

I just wanted to say that "Strc prst skrz krk" is perfectly valid Czech
sentence (meaning "Put your finger in your throat"). Thank you.

Nice. Otherwise, I might trade some letters (not only vowels), if you
are interested. Although we are a very small country, we do have some
natural resources (I am married to one).

-pu
 
A

Alan James Salmoni

Scott Chapman said:
This has been a major problem at Microsoft that their engineers have been
wringing their hands over for a long time. When the computer temporarily
runs out of characters through this leakage, it makes a blue screen and gives
you a cryptic error message that doesn't mention character loss at all, while
it digs around through the font packs trying to find some unused ones.
<SNIPPED!>

Ahhh! So that's what all that "gunk" on the blue screen of death was -
it was all the forgotten characters trying to get back out into the
world!!! They must be real lonely, poor things...

I heard a while ago that some of them form together into loose bands
and squirt themselves through the nearest network, multiplying
rapidly. Maybe that is where spam comes from???

Alan James Salmoni
SalStat Statist... etc
 

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,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top