On 05/09/14 23:11, Alan Gauld wrote:
Let's translate that to Python
count = 1
error = subprocess.Popen('command') # execute once
oops, that should be subprocess.call()
sorry.
while error and count < 3: # if error and less than 3
error = subprocess.call('command') # on success call() returns zero
count += 1
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor