while True:
time.sleep(10)
print('hello python!')
HTH,
KM
On Thu, Nov 25, 2010 at 8:35 PM, Steve Holden wrote:
> On 11/25/2010 6:38 AM, Santiago Caracol wrote
>> Hello,
>>
>> how can I do something (e.g. check if new files are in the working
>> directory) every n seconds in Python?
>>
> Loo
On 11/25/2010 6:38 AM, Santiago Caracol wrote:
> Hello,
>
> how can I do something (e.g. check if new files are in the working
> directory) every n seconds in Python?
>
Look at the sched library, which was written to take care of
requirements like this. Use time.sleep() as your delay function and
On Thu, 2010-11-25 at 04:38 -0800, Santiago Caracol wrote:
> how can I do something (e.g. check if new files are in the working
> directory) every n seconds in Python?
Use the Python Advanced Scheduler in your application - it is a great
little module. Then you've solved every 'scheduler' issue
Windows or UNIX ?
Am Do, 25.11.2010, 13:38 schrieb Santiago Caracol:
> Hello,
>
> how can I do something (e.g. check if new files are in the working
> directory) every n seconds in Python?
>
> Santiago
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
--
MfG,
Stefan Sonnenberg-Car
Santiago Caracol writes:
> how can I do something (e.g. check if new files are in the working
> directory) every n seconds in Python?
Don't do it that way if you can help it. Use inotify or the equivalent
instead.
--
http://mail.python.org/mailman/listinfo/python-list
how can I do something (e.g. check if new files are in the working
directory) every n seconds in Python?
The simplest method is executing time.sleep(n) within an infinite while
loop. There are more elegant solutions: using coroutine frameworks,
threaded task schedulers, etc.
— Alice