Update Params in Python During Infinite Loop
Posted
by python Dude
on Stack Overflow
See other posts from Stack Overflow
or by python Dude
Published on 2010-05-15T15:59:27Z
Indexed on
2010/05/15
16:04 UTC
Read the original article
Hit count: 201
Hello,
I was hoping to get some help on a question. I have an infinite loop that I need run and I need to update a set of variables (x in this case) at random times from the command-line. Is there any way to do this?
For example:
x = 0
while True:
x = x + 1
if x < 30:
do something
and I need to update x's value from the command-line periodically
© Stack Overflow or respective owner