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


Groups > comp.lang.python > #73390

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

References <713f4189-5ffe-492d-9c7d-447bb4b4928a@googlegroups.com> <mailman.11114.1403087670.18130.python-list@python.org> <4d7c474a-b88e-4dea-b74c-ed34f4969310@googlegroups.com> <mailman.11128.1403134697.18130.python-list@python.org> <9d959182-ab76-4164-aeee-78fa0a38c7cd@googlegroups.com>
Date 2014-06-19 13:58 +1000
Subject Re: Under what kind of situation, time.sleep(n) would sleep much longer than n seconds?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.11129.1403150338.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, Jun 19, 2014 at 11:41 AM, crow <wentlv@gmail.com> wrote:
> Thanks for the suggestion.
> For my script, I want to download a picture from internet & show it in a window, that's why I use wxPython.
>
> Well, I think I may can avoid sleep in wxPython in 2 ways:
> 1. Use web.py, let python do backend work, let browser show me everything. As you suggested.

I've done this one a few times, although on Linux I tend to just use
gnome-open or xdg-open and let the file be displayed with whatever's
configured - there's usually some sort of image viewer available on
the systems I use.

> 2. Write 2 scripts, one script do network related works, sleep at will; the other one show GUI. Use pipe or socket for process communication.

3. Write one script. First do the network stuff, sleep at will; then,
when it's finished downloading, show the window.

That might be easier!

ChrisA

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