473,544 Members | 1,594 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do you make Python reliable???

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

Jul 18 '05 #1
6 2236
"Aubrey Hutchison" <ab*****@comcas t.net> wrote in message
news:DZ******** ************@co mcast.com...
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*!).
--
Francis Avila

Jul 18 '05 #2
On Wed, 29 Oct 2003 23:52:29 -0500, "Aubrey Hutchison" <ab*****@comcas t.net> wrote:
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_inf o

(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
Jul 18 '05 #3
"Aubrey Hutchison" <ab*****@comcas t.net> wrote in message
news:DZ******** ************@co mcast.com...
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
Jul 18 '05 #4
On Thu, 30 Oct 2003 04:43:55 -0700, "Dave" <sh****@127.0.0 .1> wrote:
"Aubrey Hutchison" <ab*****@comcas t.net> wrote in message
news:DZ******* *************@c omcast.com...
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 classesbut
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.

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.
import time
if 1: ... 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
====< idle >============
IDLE 1.0 import time
if 1: 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
====< back to my trusty console ;-/ >============ 2.83793419612/0.0138101312289

205.49654084250 483

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
automaticall y 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
Jul 18 '05 #5
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
Jul 18 '05 #6
"Aubrey Hutchison" <ab*****@comcas t.net> wrote in message news:<DZ******* *************@c omcast.com>...
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
Jul 18 '05 #7

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

Similar topics

1
5820
by: Gernot Hillier | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! I'm the developer of a Linux ISDN application which uses embedded Python for controlling the communication. It starts several threads (i.e. one for each incoming call and for outgoing faxes) which run Python scripts in embedded Python interpreters which in turn do the real...
34
6366
by: Ville Voipio | last post by:
I would need to make some high-reliability software running on Linux in an embedded system. Performance (or lack of it) is not an issue, reliability is. The piece of software is rather simple, probably a few hundred lines of code in Python. There is a need to interact with network using the socket module, and then probably a need to do...
0
1091
by: Peter Otten | last post by:
QOTW: "Anything with 'Python' in its name can't market Python well." - Iain Bicking "Who really cares whether NASA uses Python? One thing I learned from having to sit through too many software marketing presentations is that organizations like NASA are to software what the Library of Congress is to books." - Steven Lumos on comp.lang.ruby...
29
3946
by: John Salerno | last post by:
I understand the difference, but I'm just curious if anyone has any strong feelings toward using one over the other? I was reading that a disadvantage to the more general usage (i.e. env) is that it finds the first python on the path, and that might not be the proper one to use. I don't know if that's a real issue most of the time, but it's at...
41
2068
by: Carl J. Van Arsdall | last post by:
Hey everyone, I have a question about python threads. Before anyone goes further, this is not a debate about threads vs. processes, just a question. With that, are python threads reliable? Or rather, are they safe? I've had some strange errors in the past, I use threading.lock for my critical sections, but I wonder if that is really good...
0
2713
by: eliss | last post by:
Hi everyone, I'm trying to write a python script to whois a few domains twice a day so I get notified when they become available. I did it 2 ways, but neither way is very reliable, so I'm asking here. 1) I tried just calling "whois %s" using popen, but I found that once every few weeks, I get errors like: connect: No route to host OR...
9
1367
by: Steve Holden | last post by:
Banibrata Dutta wrote: The Python world isn't particularly paranoid about obfuscation. It's quite easy to publish compiled code only (.pyc and/or .pyo files), and that offers enough protection for most. The sad fact is that there seems to be an almost direct inverse correlation between the worth of the code and the authors' desire to...
0
7424
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7365
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7772
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...
0
5909
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4918
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3415
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...
0
3409
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1841
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
1
988
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.