[Tutor] command counter
Dave Angel
davea at davea.name
Fri Sep 5 22:51:39 CEST 2014
Bo Morris <crushed26 at gmail.com> Wrote in message:
>
>
subprocess.Popen("command") && add 1 to count. If count equals n number, do something.
> I have tried count = 0 count += 1, but count does not seem to be incrementing.
It would be much better to post the code that "does not seem..."
There are many possible reasons that count might not seem to
change.
For example, are you incrementing inside a function and checking
it elsewhere? If so, look up the keyword global, or make count
part of the return value.
Please show your code.
--
DaveA
More information about the Tutor
mailing list