main.py 425 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env python3
  2. import callUSB;
  3. import connect;
  4. from time import sleep as wait;
  5. import os, sys;
  6. def main():
  7. while True:
  8. wait(5);
  9. if connect.check() == False:
  10. if callUSB.callUSB() != 0:
  11. wait(10);
  12. conf = callUSB.confFile();
  13. connect.connect(conf[0], conf[1]);
  14. # print("Connected.");
  15. wait(30);
  16. else:
  17. pass;
  18. else:
  19. # print("connected already.");
  20. if __name__ == '__main__':
  21. main();