Skip to content

Instantly share code, notes, and snippets.

@rat
Created April 12, 2014 19:08
Show Gist options
  • Save rat/10551518 to your computer and use it in GitHub Desktop.
Save rat/10551518 to your computer and use it in GitHub Desktop.
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