Created
April 12, 2014 19:08
-
-
Save rat/10551518 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
serials = {"COM1": "idle", "COM2": "idle"} | |
class Teste(object): | |
def getIdle(self): | |
for port in serials: | |
if serials[port] == 'idle': | |
serials[port] = 'busy' | |
return port | |
else: | |
time.sleep(5) | |
self.getIdle() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment