summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Naik2013-12-11 01:49:21 +0530
committerAditya Naik2013-12-11 01:49:21 +0530
commit892279be93ca03a1f0f3476c49cdcced4a0f990c (patch)
treeda1a9a3828b9eb26c0f02778d379d7596c4710e3
parent94ce7cff75936903bdf7138b345047bd844df7ba (diff)
build 2.1b: removed dufunct version
-rw-r--r--asltool.py63
1 files changed, 0 insertions, 63 deletions
diff --git a/asltool.py b/asltool.py
deleted file mode 100644
index 9616d17..0000000
--- a/asltool.py
+++ /dev/null
@@ -1,63 +0,0 @@
-import sys
-import os
-import msvcrt
-from timeit import timeit as time
-from time import clock as clock
-shotcount=0
-pauseinterval=[]
-shotlist=[]
-def metadata():
- global name
- name=input("\nenter movie name:\n")
- print("press enter to start")
- keystroke=str(msvcrt.getch())[-2]
- if keystroke=="r":
- print("counter begins")
- key()
-def key():
- clock()
- global shotlist
- global shotcount
- global keystroke
- global pauseinterval
- keystroke=str(msvcrt.getch())[-2]
- if keystroke=="s":
- timestamp=clock()
- shotcount=shotcount+1
- shotlist.append((shotcount,timestamp))
- key()
- elif keystroke=="p": pause()
- elif keystroke=="e" : reset()
-def pause():
- print("paused")
- global pauseinterval
- startpause=clock()
- startagain=str(msvcrt.getch())[-2]
- if startagain=="p":
- endpause=clock()
- print("restarted")
- pauseinterval.append(endpause-startpause)
- key()
- elif startagain=="e": reset()
- else: pass
-def reset():
- global totaltime
- global ASL
- totaltime=clock()
- for pausetime in pauseinterval: totaltime=totaltime-pausetime
- print(totaltime)
- try:
- totaltime/shotcount
- except ZeroDivisionError:
- sys.exit("no shots recorded")
- ASL=totaltime/shotcount
- print("number of shots=%d"%shotcount)
- print("ASL =%fseconds"%ASL)
- reportgenerator()
-def reportgenerator():
- fileopen=open(r"%s.ASLreport"%name,mode="w")
- fileopen.write(
- "ASL report for %s \n\n Record Time=%f\n Recorded Shots=%d\n ASL=%f\nShot Timestamps:\n%s"%(name,totaltime,shotcount,ASL,(str(shotdata) for shotdata in shotlist)))
-
-if __name__=="__main__":
- metadata() \ No newline at end of file