forcing everything python3, might end up with bugs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys,os
|
||||
sys.path.append(os.path.realpath(os.path.join(os.path.dirname(__file__),
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
import curses
|
||||
import os,sys
|
||||
import time,datetime
|
||||
import math
|
||||
import signal
|
||||
from optparse import OptionParser
|
||||
from optparse import OptionParser
|
||||
|
||||
|
||||
def termsize():
|
||||
@@ -20,7 +20,7 @@ def saddstr(win,y,x,s):
|
||||
win.addstr(y,x,s)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
def drawcircle(win,cy,cx,r):
|
||||
precision=360
|
||||
for a in range(precision):
|
||||
@@ -37,9 +37,9 @@ def drawline(win,cy,cx,a,s,r,char):
|
||||
ly=int(round(cy-float(l)*math.cos(a)/prec))
|
||||
lx=int(round(cx+2.0*float(l)*math.sin(a)/prec))
|
||||
saddstr(win,ly,lx,char)
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
def drawdigit(win,y,x,d):
|
||||
s=' '
|
||||
if d=='0':
|
||||
@@ -98,7 +98,7 @@ def readinput(win):
|
||||
return ""
|
||||
|
||||
class timer_struct:
|
||||
""" Class for storing timer. """
|
||||
""" Class for storing timer. """
|
||||
def __init__(self,h,m,s):
|
||||
self.tm_hour=int(h)
|
||||
self.tm_min=int(m)
|
||||
@@ -149,7 +149,7 @@ def main():
|
||||
stdscr.keypad(0)
|
||||
curses.endwin()
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
except KeyboardInterrupt:
|
||||
curses.nocbreak()
|
||||
stdscr.keypad(0)
|
||||
@@ -159,7 +159,7 @@ def main():
|
||||
|
||||
usage='''Usage: %prog [options]
|
||||
|
||||
Display a clockface
|
||||
Display a clockface
|
||||
'''
|
||||
parser=OptionParser(usage=usage)
|
||||
parser.add_option("-s",action="store_true",dest="seconds",default=False,
|
||||
|
||||
Reference in New Issue
Block a user