two silly questions

bill ramsay bill.ramsay at clear.net.nz
Thu Jun 3 07:15:18 EDT 2004


On Thu, 3 Jun 2004 09:25:20 +0100, Tim Golden
<tim.golden at viacom-outdoor.co.uk> wrote:

>| I have written a program that polls an email account, then pulls down
>| the email
>|
>| I am using win2k.  
>| 
>| the two questions are:
>| 
>| 1.  when i want the program to run in a loop,  ie. poll the pop3
>| account every 60 seconds,  it runs the first time, then it goes into
>| 'not responding mode' thereafter,  sometimes.    Any thoughts?  I was
>| using sleep(60) but it just hangs,  as i said before,  it does not
>| always do that either!
>
>We really could do with a code fragment here. For example,
>the following (entirely artificial) example runs fine in
>the Python interpreter on my win2k machine. (I don't use
>the PythonWin or any other Python shell):
>
><code>
>import time
>while 1:
>  print "Still waiting..."
>  time.sleep (10)
></code>

thanks for getting back to me

I had two versions of python on my machine,  it would seem that this
was causing the difficulty a la running in a windows frame, if that is
what you call it.  remove the earlier version and it is ok.

likewise the issue with the sleep problem

kind regards

bill


>
>I realise that your program is more complex than this, but
>I wanted to illustrate that (a) time.sleep works as expected
>on Win2K and that (b) some code examples could help.
>
>| 2.  I wish to use this program at work,  I took in an earlier version
>| yesterday that just wrote the data to a text file,  I wanted to make
>| sure the polling thing worked. on microsoft exchange [i know that it
>| should,  but you never know!!]  and it does .  When i was there, i
>| managed to get the code to run just by double clicking on the code
>| ICON,  seem to remember doing something with 'open with' can't seem to
>| do it here at home.  
>| 
>| Both systems run win2k.  did i do something sublimilally without
>| realising it?  what did i do i cannot remember,  i have tried opening
>| with etc.  when i do this all get is a burst of the 'black windows
>| box' just in the same way as putting in 'cmd' on the run thing,
>
>Have a look at the Python FAQ for Windows:
>
>http://www.mirror.ac.uk/sites/ftp.python.org/pub/www.python.org/doc/faq/wind
>ows.html
>
>which I think answers your question. If not, then post again and see if
>someone
>can't help you out.
>
>TJG
>
>
>________________________________________________________________________
>This e-mail has been scanned for all viruses by Star Internet. The
>service is powered by MessageLabs. For more information on a proactive
>anti-virus service working around the clock, around the globe, visit:
>http://www.star.net.uk
>________________________________________________________________________




More information about the Python-list mailing list