two silly questions

Miki Tebeka miki.tebeka at zoran.com
Thu Jun 3 11:32:33 CEST 2004


Hello Bill,

> 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!
Do you mean it sometime hang? IMO it point to a bug in your code.
Try adding a lot of "print 'I am here'" in your code and reduce the
sleep time to 0.1 and run. See where you get stuck.

> 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.  
The standard Python installer associates .py with python so when you
click on a .py file (or call it from the command line) it runs the
Python interpreter on it.

If you don't want to see the "black window" rename the extension to
.pyw, this way pythonw.exe will run the script and won't produce any
console. OTOH it means you won't see any printing what so ever so make
sure you log *everything*.

HTH.
Bye.
--
-------------------------------------------------------------------------
Miki Tebeka <miki.tebeka at zoran.com>
The only difference between children and adults is the price of the toys.




More information about the Python-list mailing list