how to handle command line output(not terminal handle)

Discussion in 'Python' started by Leon, Nov 4, 2004.

  1. Leon

    Leon Guest

    such as :
    c:\>python test.py
    ##Interval 1 seconds the "name" change next
    friend : name

    don't have to run clear,the "name" dynamic change content
    and "friend" is stable
    Leon, Nov 4, 2004
    #1
    1. Advertising

  2. On 2004-11-04, Leon <> wrote:
    > such as :
    > c:\>python test.py
    > ##Interval 1 seconds the "name" change next
    > friend : name
    >
    > don't have to run clear,the "name" dynamic change content
    > and "friend" is stable


    I'm not sure what you're asking. I'm not even sure if you are
    asking a question.

    On the off chance I have have guessed what you're trying to do,
    try running this:

    import sys,time
    while True:
    time.sleep(1)
    sys.stdout.write("\rTime: %f" % time.time())
    sys.stdout.flush()



    --
    Grant Edwards grante Yow! In Newark the
    at laundromats are open 24
    visi.com hours a day!
    Grant Edwards, Nov 4, 2004
    #2
    1. Advertising

  3. Leon

    Leon Guest

    thank you......
    it is answer I want
    sorry , my English isn't good enough
    "Grant Edwards" <> ¼¶¼g©ó¶l¥ó·s»D:4189a5eb$0$86464$...
    > On 2004-11-04, Leon <> wrote:
    >> such as :
    >> c:\>python test.py
    >> ##Interval 1 seconds the "name" change next
    >> friend : name
    >>
    >> don't have to run clear,the "name" dynamic change content
    >> and "friend" is stable

    >
    > I'm not sure what you're asking. I'm not even sure if you are
    > asking a question.
    >
    > On the off chance I have have guessed what you're trying to do,
    > try running this:
    >
    > import sys,time
    > while True:
    > time.sleep(1)
    > sys.stdout.write("\rTime: %f" % time.time())
    > sys.stdout.flush()
    >
    >
    >
    > --
    > Grant Edwards grante Yow! In Newark the
    > at laundromats are open 24
    > visi.com hours a day!
    Leon, Nov 4, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gaurav kashyap
    Replies:
    3
    Views:
    6,617
    Paul Boddie
    Oct 31, 2008
  2. Steve
    Replies:
    2
    Views:
    917
    edicionsdigitals.com edicions digitals xarxa socia
    Dec 7, 2010
  3. Marc Weber
    Replies:
    0
    Views:
    111
    Marc Weber
    Feb 17, 2011
  4. Dib Urim
    Replies:
    4
    Views:
    176
    Ben Liddicott
    Nov 23, 2003
  5. Dib Urim
    Replies:
    4
    Views:
    184
    Michele Dondi
    Dec 3, 2003
Loading...

Share This Page