Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Time Tracker
- # cwisbg
- from pymel.core import *
- import time
- import os
- start = time.clock()
- theTime = time.localtime()
- hr = theTime[3]
- min = theTime[4]
- filePath = (os.path.expanduser("~/Desktop/productionFarm_projects/SwampCity/timeTracker.txt"))
- trackerFile = open(filePath,"a+")
- trackerRead = trackerFile.readlines()
- tracker = promptDialog(tx = "Whacha doin?", b = ["In","Out"])
- trackerTx = "\r\n" + promptDialog(query=True, text=True)+" "
- inOut = ""
- if tracker == "In":
- inOut = "\r\nIn "
- if tracker == "Out":
- inOut = "\r\nOut "
- writer = str(trackerTx)+ inOut+ str(hr)+ ":" + str(min)
- print writer
- trackerFile.write(str(writer))
- trackerFile.close()
Advertisement
Add Comment
Please, Sign In to add comment