Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73443

Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds?

From Terry Reedy <tjreedy@udel.edu>
Subject Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds?
Date 2014-06-19 22:33 -0400
References (1 earlier) <mailman.11114.1403087670.18130.python-list@python.org> <4d7c474a-b88e-4dea-b74c-ed34f4969310@googlegroups.com> <mailman.11128.1403134697.18130.python-list@python.org> <lnu2sb$r3d$1@dont-email.me> <CAPTjJmr+rcZKeYg8T5TEQ=+WmFhgXTPY86n6GaMK=g9B-MX5Mw@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.11159.1403231653.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 6/19/2014 3:42 AM, Chris Angelico wrote:
> On Thu, Jun 19, 2014 at 5:18 PM, Christian Gollwitzer <auriocus@gmx.de> wrote:

>> My advice:
>>
>> 1) First try parsing the command line. (Example: All Unix tools)
>>
>> 2) If you require more interaction and maybe state preservation, just write
>> a couple of functions and run it in IPython (Example: SciPy)
>>
>> 3) Use a real GUI framework
>>
>> It turns out, that 3) is actually not only easier to use, but often easier
>> to write than 1)
>
> I disagree. It may not be the *best* console UI, but it's not as bad
> as you think. Yes, what I wrote was a massive oversimplification, but
> compare this:
>
> https://github.com/Rosuav/runningtime/blob/master/runningtime.py#L44
>
> That's a simple, straight-forward UI. If you put the .py file onto
> your desktop and double-click it, you'll see a series of prompts, and
> this works on Windows, OS/2, probably Mac OS, and quite a few Linux
> desktops. (Although I didn't put a shebang on that file, so it might
> not work on your typical Linux.) How do you make something that
> provides command line arguments to a double-clicked-on icon? Different
> for every platform. (And seldom as easy as it is on OS/2.) If you run
> that in a terminal, you'll see a series of prompts, and it works on
> probably every Python implementation EVER. If you pull it up in IDLE,
> it'll probably work there too, although I haven't tried it.

Most any* console script runs fine** in Idle once you load it into the 
editor and press F5. Prompts and prints go the shell window (default 
blue on white) and input comes from the same (default black on white).

* I said most because there must be exceptions, but have no 
characterization.

** Better than the windows console in some respects.

I hope that by the end of the summer, the requirement to load in the 
editor will be gone. (Run F5 saves to a file anyway for actual 
execution.) There should also be an option to put output in a new window.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? crow <wentlv@gmail.com> - 2014-06-18 02:52 -0700
  Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? Marko Rauhamaa <marko@pacujo.net> - 2014-06-18 13:30 +0300
  Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? Chris Angelico <rosuav@gmail.com> - 2014-06-18 20:34 +1000
    Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? crow <wentlv@gmail.com> - 2014-06-18 08:24 -0700
      Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? Chris Angelico <rosuav@gmail.com> - 2014-06-19 09:38 +1000
        Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? crow <wentlv@gmail.com> - 2014-06-18 18:41 -0700
          Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? Chris Angelico <rosuav@gmail.com> - 2014-06-19 13:58 +1000
        Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? Christian Gollwitzer <auriocus@gmx.de> - 2014-06-19 09:18 +0200
          Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? Chris Angelico <rosuav@gmail.com> - 2014-06-19 17:42 +1000
            Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? Marko Rauhamaa <marko@pacujo.net> - 2014-06-19 12:20 +0300
            Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? Christian Gollwitzer <auriocus@gmx.de> - 2014-06-19 19:17 +0200
              Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? Chris Angelico <rosuav@gmail.com> - 2014-06-20 08:57 +1000
          Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? Terry Reedy <tjreedy@udel.edu> - 2014-06-19 22:33 -0400
          Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds? Chris Angelico <rosuav@gmail.com> - 2014-06-20 12:54 +1000

csiph-web