You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
506 B

  1. from dateutil.parser import parse
  2. import sys
  3. import os
  4. PARENT = os.path.dirname(__file__)
  5. sys.path.insert(0,PARENT)
  6. from upload import upload
  7. import datetime
  8. import subprocess
  9. import time
  10. from upload import upload
  11. t = parse(input("Enter endtime: "))
  12. wait = int((t-datetime.datetime.today()).total_seconds())
  13. if wait > 0:
  14. subprocess.call(['timeout.exe','/nobreak',str(wait)])
  15. subprocess.call([os.path.join(PARENT,'done.bat')])
  16. upload()
  17. print("Deleting in")
  18. for i in range(10,0,-1):
  19. print(i)
  20. time.sleep(1)