os.system call problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • questions?

    #1

    os.system call problem

    I use os.system to call a display program, e.g.

    os.system(displ ayblah blah) to call display. the program starts and
    display things I wanted. When I kill display, somehow the python
    program don't understand I want to move on, keep calling
    os.system(displ ayblah blah) again and again.
    I have to kill terminal to quit them all.

    How can I migrate back to my python program after I kill the display
    program?

    Thanks a lot

  • Fredrik Lundh

    #2
    Re: os.system call problem

    "questions? " <universal_used @hotmail.com> wrote:
    [color=blue]
    > I use os.system to call a display program, e.g.
    >
    > os.system(displ ayblah blah) to call display. the program starts and
    > display things I wanted. When I kill display, somehow the python
    > program don't understand I want to move on, keep calling
    > os.system(displ ayblah blah) again and again.
    > I have to kill terminal to quit them all.
    >
    > How can I migrate back to my python program after I kill the display
    > program?[/color]

    Python doesn't run os.system() over and over again by itself, so
    there's probably something wrong with your code.

    how about posting the relevant code, so we don't have to guess ?

    (if you have some time to spare, reading



    won't hurt either)

    </F>



    Comment

    • questions?

      #3
      Re: os.system call problem


      Fredrik Lundh wrote:[color=blue]
      > "questions? " <universal_used @hotmail.com> wrote:
      >[color=green]
      > > I use os.system to call a display program, e.g.
      > >
      > > os.system(displ ayblah blah) to call display. the program starts and
      > > display things I wanted. When I kill display, somehow the python
      > > program don't understand I want to move on, keep calling
      > > os.system(displ ayblah blah) again and again.
      > > I have to kill terminal to quit them all.
      > >
      > > How can I migrate back to my python program after I kill the display
      > > program?[/color]
      >
      > Python doesn't run os.system() over and over again by itself, so
      > there's probably something wrong with your code.
      >
      > how about posting the relevant code, so we don't have to guess ?
      >
      > (if you have some time to spare, reading
      >
      > http://www.catb.org/~esr/faqs/smart-questions.html
      >
      > won't hurt either)
      >
      > </F>[/color]

      you are exactly right.
      I did a while loop and forgot to update the condition.

      Thanks for the suggestions!

      Comment

      Working...