How do you make Python reliable???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aubrey Hutchison

    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



  • Francis Avila

    #2
    Re: How do you make Python reliable???

    "Aubrey Hutchison" <abhjrpe@comcas t.net> wrote in message
    news:DZGdnfzNJ7 uTBD2iRVn-vQ@comcast.com. ..[color=blue]
    > 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[/color]
    but[color=blue]
    > 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[/color]
    goes[color=blue]
    > away.[/color]

    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

    Comment

    • Bengt Richter

      #3
      Re: How do you make Python reliable???

      On Wed, 29 Oct 2003 23:52:29 -0500, "Aubrey Hutchison" <abhjrpe@comcas t.net> wrote:
      [color=blue]
      >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
      >[/color]
      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:
      [color=blue][color=green][color=darkred]
      >>> sys.version[/color][/color][/color]
      '2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)]'[color=blue][color=green][color=darkred]
      >>> sys.version_inf o[/color][/color][/color]
      (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

      Comment

      • Dave

        #4
        Re: How do you make Python reliable???

        "Aubrey Hutchison" <abhjrpe@comcas t.net> wrote in message
        news:DZGdnfzNJ7 uTBD2iRVn-vQ@comcast.com. ..[color=blue]
        > 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[/color]
        but[color=blue]
        > 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[/color]
        goes[color=blue]
        > 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[/color]
        the[color=blue]
        > 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[/color]
        should.[color=blue]
        >
        > 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.[/color]

        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[color=blue][color=green][color=darkred]
        >>> import sys
        >>> sys.version[/color][/color][/color]
        '2.3.1 (#47, Sep 23 2003, 23:47:32) [MSC v.1200 32 bit (Intel)]'[color=blue][color=green][color=darkred]
        >>> for i in range(100): print i,[/color][/color][/color]
        .... 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


        Comment

        • Bengt Richter

          #5
          Re: How do you make Python reliable???

          On Thu, 30 Oct 2003 04:43:55 -0700, "Dave" <shuvit@127.0.0 .1> wrote:
          [color=blue]
          >"Aubrey Hutchison" <abhjrpe@comcas t.net> wrote in message
          >news:DZGdnfzNJ 7uTBD2iRVn-vQ@comcast.com. ..[color=green]
          >> 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[/color]
          >but[color=green]
          >> 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[/color]
          >goes[color=green]
          >> 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[/color]
          >the[color=green]
          >> 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[/color]
          >should.[color=green]
          >>
          >> 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.[/color]
          >
          >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.
          >[/color]
          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?
          [color=blue]
          >Python 2.3.1 (#47, Sep 23 2003, 23:47:32) [MSC v.1200 32 bit (Intel)] on
          >win32
          >[...]
          >IDLE 1.0[color=green][color=darkred]
          >>>> import sys
          >>>> sys.version[/color][/color]
          >'2.3.1 (#47, Sep 23 2003, 23:47:32) [MSC v.1200 32 bit (Intel)]'[color=green][color=darkred]
          >>>> for i in range(100): print i,[/color][/color]
          >... prints 100 numbers in less than a second.[/color]
          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.[color=blue][color=green][color=darkred]
          >>> import time
          >>> if 1:[/color][/color][/color]
          ... 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[color=blue][color=green][color=darkred]
          >>>[/color][/color][/color]

          ====< idle >============
          IDLE 1.0[color=blue][color=green][color=darkred]
          >>> import time
          >>> if 1:[/color][/color][/color]
          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[color=blue][color=green][color=darkred]
          >>>[/color][/color][/color]

          ====< back to my trusty console ;-/ >============[color=blue][color=green][color=darkred]
          >>> 2.83793419612/0.0138101312289[/color][/color][/color]
          205.49654084250 483

          That's a pretty big ratio.
          [color=blue]
          >
          >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.
          >[/color]
          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

          Comment

          • Aubrey Hutchison

            #6
            Re: How do you make Python reliable???

            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


            Comment

            • Richard

              #7
              Re: How do you make Python reliable???

              "Aubrey Hutchison" <abhjrpe@comcas t.net> wrote in message news:<DZGdnfzNJ 7uTBD2iRVn-vQ@comcast.com> ...[color=blue]
              > 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[/color]

              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

              Comment

              Working...