How do you make Python reliable???

A

Aubrey Hutchison

Using Python 2,3,2 with idle for developing programs
about 200 lines long. - Problem is not common to any specific program.
Program are rather simple with no trick programming. Usually no classes but
a few functions using math module with long integers.

Usually for the first few tryout everything works fine and
then idle locks "out" windows xp pro.. I can run other programs, but
clicking on idle icon gets me an hour glass for a few moments and then goes
away.

Acts like I filled up memory but with 1 gig that should not
be a problem.

Word, Acad, quickbasic, and anyother program will work when python starts
doing this lock out. But python will not work. Killing the computer is the
usual way out of the problem.

Shuting down just get me a dialog window telling me to click to shut down
windowmenu. Which only gets me the
same dialog a few moment later.

Full power off is usually the only way, and at time upon reboot -the same
will continue.

When this happens I can load a game, Acad or word which work as they should.

When this starts I get an indication the idle is not responding and I kill
it with the status panel.Some times this happens only once but usually it
ends up as a lock out.

Computer is clean- no virus.

Thanks for any help

Aubrey
 
F

Francis Avila

Aubrey Hutchison said:
Using Python 2,3,2 with idle for developing programs
about 200 lines long. - Problem is not common to any specific program.
Program are rather simple with no trick programming. Usually no classes but
a few functions using math module with long integers.

Usually for the first few tryout everything works fine and
then idle locks "out" windows xp pro.. I can run other programs, but
clicking on idle icon gets me an hour glass for a few moments and then goes
away.

I can't comment on your problems, but I will gently remind you that Idle !=
Python....

If you don't like Idle, use something else to edit, and run Python directly.
If this is too tedious, use an editor designed for programming, like Emacs
(or TextPad if that's too much).

That said, I use the Idle packaged with Python 2.2 on Win98SE (when I can't
get to a *nix box with a recent Python), and the only time it locks is when
I do some ridiculously expensive operation or get into a tight infinite
loop. Even then, I'm always able to kill it without fanfare and start up a
new one (and with Win98, that's saying *a lot*!).
 
B

Bengt Richter

Using Python 2,3,2 with idle for developing programs
about 200 lines long. - Problem is not common to any specific program.
Program are rather simple with no trick programming. Usually no classes but
a few functions using math module with long integers.

Usually for the first few tryout everything works fine and
then idle locks "out" windows xp pro.. I can run other programs, but
clicking on idle icon gets me an hour glass for a few moments and then goes
away.

Acts like I filled up memory but with 1 gig that should not
be a problem.

Word, Acad, quickbasic, and anyother program will work when python starts
doing this lock out. But python will not work. Killing the computer is the
usual way out of the problem.

Shuting down just get me a dialog window telling me to click to shut down
windowmenu. Which only gets me the
same dialog a few moment later.

Full power off is usually the only way, and at time upon reboot -the same
will continue.

When this happens I can load a game, Acad or word which work as they should.

When this starts I get an indication the idle is not responding and I kill
it with the status panel.Some times this happens only once but usually it
ends up as a lock out.

Computer is clean- no virus.

Thanks for any help
The best way would be to provide a minimal recipe for duplicating your problem.
Otherwise we'll be playing 20 questions until someone gets an inspiration.

Meanwhile, when stuck, will Ctrl-C have any effect? If not, how about Ctrl-D
or Ctrl-Break?

I hardly ever run idle, but I just did, and I seem to have experienced a bit
of the same problem ;-(

I dimissed it with Ctrl-D after a Ctrl-C, and then when I tried to start it again
from the start menu (

I am on NT4 with python 2.3 something:
>>> sys.version '2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)]'
>>> sys.version_info
(2, 3, 0, 'final', 0)

) and it did not come up. Ctrl-Alt-Del gave me the security dialog that lets me run the
task manager, which I tried, and _it_ did not pop up. Normally it displaces almost anything.
This makes me wonder if idle is using something that runs at super high priority and forgets
to let go or lower its priority if it gets blocked. Eventually applications started to respond to
Alt-F4 (I had quite a few instances of vim and netstcape and a few console windows going plus
agent and eudora, so it's hard to say what was happening, but I didn't like the feel. I have
320 MB ram, so normally I can keep a lot of stuff open simultaneously. I don't think it was
a memory problem. IIRC I read/heard that idle runs as separate communicating processes now.
I could see someone being tempted to boost priority somewhere to keep the user experience
tolerably snappy on an older machine. Output like "for i in range(400): print i," is really
slow on mine, compared to the console version.

Not being an idle user (;-) I can't say much more at this point. But given that all I did
was start it up, print a series of numbers and kill it with Ctrl-C and Ctrl-D, perhaps you
don't need to work up much of a recipe for duplicating the problem. After the aforementioned,
just trying to start it again brought it on.

As for your subject question, I find the console version quite reliable, and would recommend
using that, along with vim or another editor that suits you. Sorry if this idle UI
bog-down was your first exposure to Python (though it is not Python per se, only a UI).

Regards,
Bengt Richter
 
D

Dave

Aubrey Hutchison said:
Using Python 2,3,2 with idle for developing programs
about 200 lines long. - Problem is not common to any specific program.
Program are rather simple with no trick programming. Usually no classes but
a few functions using math module with long integers.

Usually for the first few tryout everything works fine and
then idle locks "out" windows xp pro.. I can run other programs, but
clicking on idle icon gets me an hour glass for a few moments and then goes
away.

Acts like I filled up memory but with 1 gig that should not
be a problem.

Word, Acad, quickbasic, and anyother program will work when python starts
doing this lock out. But python will not work. Killing the computer is the
usual way out of the problem.

Shuting down just get me a dialog window telling me to click to shut down
windowmenu. Which only gets me the
same dialog a few moment later.

Full power off is usually the only way, and at time upon reboot -the same
will continue.

When this happens I can load a game, Acad or word which work as they should.

When this starts I get an indication the idle is not responding and I kill
it with the status panel.Some times this happens only once but usually it
ends up as a lock out.

Try a fresh install of Python and keep notes on everything. This seems like
some of the problems I had after installing an earlier development version
of IDLE. The release merged into 2.3 has been flawless, however, on both my
Windows XP and Redhat LInux 8 machines.

My Windows setup seems similar to yours. Windows XP Pro with the latest
MIcrosoft updates. Norton Anti Virus. Python-2.3.1.exe downloaded from
www.python.org on 9/30/03 and installed without a snag. At this moment, I
am runnng Eudora, Windows Explorer, Internet Explorer, Outlook Newsreader,
and Microsoft Word, and I just started IDLE from the Start menu item that
was installed by the Python-2.3.1.exe file.

Python 2.3.1 (#47, Sep 23 2003, 23:47:32) [MSC v.1200 32 bit (Intel)] on
win32
[...]
IDLE 1.0
import sys
sys.version '2.3.1 (#47, Sep 23 2003, 23:47:32) [MSC v.1200 32 bit (Intel)]'
for i in range(100): print i,
.... prints 100 numbers in less than a second.

The interaction between the shell and an editing window opened from the
shell's File - Open menu is very smooth. The path of the selected file is
automatically pre-pended to sys.path, so we no longer have the tedious
process of adding this by hand.

I've been searching long and hard for the right cross-platform IDE, and IDLE
has more than met my expectations. Hang in there, it is worth the effort.

-- Dave
 
B

Bengt Richter

Try a fresh install of Python and keep notes on everything. This seems like
some of the problems I had after installing an earlier development version
of IDLE. The release merged into 2.3 has been flawless, however, on both my
Windows XP and Redhat LInux 8 machines.

My Windows setup seems similar to yours. Windows XP Pro with the latest
MIcrosoft updates. Norton Anti Virus. Python-2.3.1.exe downloaded from
www.python.org on 9/30/03 and installed without a snag. At this moment, I
am runnng Eudora, Windows Explorer, Internet Explorer, Outlook Newsreader,
and Microsoft Word, and I just started IDLE from the Start menu item that
was installed by the Python-2.3.1.exe file.
Aha. Maybe there was a bugfix between Python-2_3.exe and Python-2.3.1.exe.
.... hm, couldn't find any on sourceforge ;-(

BTW, I noticed several pythonw.exe processes hanging around when I tried to shut down
my NT session. I had to kill them manually from the task manager, as there was nothing
anywhere to click. Is exiting from idle via Ctrl-D (on windows!) the cause?
Python 2.3.1 (#47, Sep 23 2003, 23:47:32) [MSC v.1200 32 bit (Intel)] on
win32
[...]
IDLE 1.0
import sys
sys.version '2.3.1 (#47, Sep 23 2003, 23:47:32) [MSC v.1200 32 bit (Intel)]'
for i in range(100): print i,
... prints 100 numbers in less than a second.
How much less??

===< console >=========
Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information. ... t1 = time.clock()
... for i in xrange(100): print i,
... t2 = time.clock()
... print
... print t2-t1
...
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 3
5 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 6
7 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 9
9
0.0138101312289 t1 = time.clock()
for i in xrange(100): print i,
t2 = time.clock()
print
print t2-t1


0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
2.83793419612 205.49654084250483

That's a pretty big ratio.
The interaction between the shell and an editing window opened from the
shell's File - Open menu is very smooth. The path of the selected file is
automatically pre-pended to sys.path, so we no longer have the tedious
process of adding this by hand.

I've been searching long and hard for the right cross-platform IDE, and IDLE
has more than met my expectations. Hang in there, it is worth the effort.
I guess I'll upgrade to 2.3.2 and hope for the best. I'd like to use idle.
BTW, how do I set it to do 4-space tabbing? (haven't R'd That FM yet, guess I
shouldn't be asking).

Regards,
Bengt Richter
 
A

Aubrey Hutchison

First thanks all for the comments:

Last night I had to kill the MS menuwindow about 16 times before the
computer would restart.....

After restart idle started the same crap....So I gave up for a while.

1) totally shut down the computer and started fresh to day.

2) so far it is working ok as if the computer needed a rest, but the
computer shows no problems with any other functions or programs.

3) this is similar to earlier experiences idle will work for a while and
them start crapping out...

Thus far to day it has worked..

I really think I have found problem with idle but what it is I do not
know....

Will continue

Thanks All

Aubrey Hutchison
 
R

Richard

Aubrey Hutchison said:
Using Python 2,3,2 with idle for developing programs
about 200 lines long. - Problem is not common to any specific program.
Program are rather simple with no trick programming. Usually no classes but
a few functions using math module with long integers.

Usually for the first few tryout everything works fine and
then idle locks "out" windows xp pro.. I can run other programs, but
clicking on idle icon gets me an hour glass for a few moments and then goes
away.

Acts like I filled up memory but with 1 gig that should not
be a problem.

Word, Acad, quickbasic, and anyother program will work when python starts
doing this lock out. But python will not work. Killing the computer is the
usual way out of the problem.

Shuting down just get me a dialog window telling me to click to shut down
windowmenu. Which only gets me the
same dialog a few moment later.

Full power off is usually the only way, and at time upon reboot -the same
will continue.

When this happens I can load a game, Acad or word which work as they should.

When this starts I get an indication the idle is not responding and I kill
it with the status panel.Some times this happens only once but usually it
ends up as a lock out.

Computer is clean- no virus.

Thanks for any help

Aubrey

Install win23all (linked from python.org's python download page). It
has PythonWin which is much better and appears to run your code in a
seperate python instance.

Richard
 

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

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,919
Members
47,459
Latest member
Vida00R129

Latest Threads

Top