Strange Behavior on Python 3 Windows Command Line

W

waylan

When I try running any Python Script on the command line with Python
3.2 I get this weird behavior. The cursor dances around the command
line window and nothing ever happens. Pressing Ctr+C does nothing.
When I close the window (mouse click on X in top right corner), an
error dialog appears asking me to "force" it to close.

See a short (26 sec) video of it here:

Also, the printer suddenly starts printing multiple copies of the
contents of the command line window - which has wasted much paper.

Strangely it was working fine the other day. Then while debugging a
script it suddenly started do this and now does this for every script
I've run in Python 3.2. Multiple system reboots had no effect.
I also have Python 2.5 & 2.7 installed and they work fine.

Even the most basic script results in this behavior:

if __name__ == "__main__":
print("Hello, World!")

In an attempt to check the exact version of Python, even this causes
the strange behavior:

c:\Python32\python.exe -V

I'm on Windows XP if that matters. IDLE (which works fine) tells me
I'm on Python 3.2.2

Any suggestions?
 
A

Arnaud Delobelle

When I try running any Python Script on the command line with Python
3.2 I get this weird behavior. The cursor dances around the command
line window and nothing ever happens. Pressing Ctr+C does nothing.
When I close the window (mouse click on X in top right corner), an
error dialog appears asking me to "force" it to close.

I'm not a Windows user, so I can't be of assistance but it may help
others if you explained how you installed Python 3.2 on your computer.
Also have you tried reinstalling it?
Strangely it was working fine the other day. Then while debugging a
script it suddenly started do this and now does this for every script

How were you debugging?
 
W

Waylan Limberg

How were you debugging?

I think I may have been attempting to use pipes to redirect stdin
and/or stdout when the problem first presented itself. Unfortunately,
once I closed the window, I lost whatever pipe combination I had
tried.

It just occurred to me that I was unsure if I had been doing that pipe
correctly, and that maybe I overwrote python.exe. Sure enough, the
modify date on that file indicated I overwrote it. A re-install has
resolved the problem.

It's just a little embarrassing that I didn't think of that until now,
but the fact that everything else seems to work was throwing me off.
Of course, everything else was running `pythonw.exe` not `python.exe`.

Anyway, thanks for the pointer Arnaud.
 

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,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top