cwisbg

TimeTracker

Aug 24th, 2014
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. # Time Tracker
  2. # cwisbg
  3. from pymel.core import *
  4. import time
  5. import os
  6. start = time.clock()
  7. theTime = time.localtime()
  8. hr = theTime[3]
  9. min = theTime[4]
  10. filePath = (os.path.expanduser("~/Desktop/productionFarm_projects/SwampCity/timeTracker.txt"))
  11. trackerFile = open(filePath,"a+")
  12. trackerRead = trackerFile.readlines()
  13. tracker = promptDialog(tx = "Whacha doin?", b = ["In","Out"])
  14. trackerTx = "\r\n" + promptDialog(query=True, text=True)+" "
  15. inOut = ""
  16. if tracker == "In":
  17. inOut = "\r\nIn "
  18. if tracker == "Out":
  19. inOut = "\r\nOut "
  20. writer = str(trackerTx)+ inOut+ str(hr)+ ":" + str(min)
  21. print writer
  22. trackerFile.write(str(writer))
  23. trackerFile.close()
Advertisement
Add Comment
Please, Sign In to add comment