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. Advertisements

  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. Advertisements

  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. Advertisements

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. Joe
    Replies:
    8
    Views:
    576
  2. gaurav kashyap
    Replies:
    3
    Views:
    7,138
    Paul Boddie
    Oct 31, 2008
  3. Steve
    Replies:
    2
    Views:
    1,114
    edicionsdigitals.com edicions digitals xarxa socia
    Dec 7, 2010
  4. Ruwan Budha
    Replies:
    0
    Views:
    237
    Ruwan Budha
    Apr 12, 2010
  5. Marc Weber
    Replies:
    0
    Views:
    191
    Marc Weber
    Feb 17, 2011
  6. Dib Urim
    Replies:
    4
    Views:
    358
    Ben Liddicott
    Nov 23, 2003
  7. Dib Urim
    Replies:
    4
    Views:
    339
    Michele Dondi
    Dec 3, 2003
  8. Stephen

    perl command line and file handle.

    Stephen, Jan 14, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    236
    Walter Roberson
    Jan 14, 2004
Loading...