currently I am getting errors in python but I cannot seem to find them
def dictionaryObjectParsed():
a = []
b = []
a, b = zip(*(map(lambda x: x.rstrip('\n\r').split('\t'), open('/Users/settingj/Desktop/NOxMultiplier.csv').readlines())))
for x in range(0,len(a)):
print a[x]
print b[x]
def timer(f):
threading.Timer(1, timer, f).start()
print time.strftime('%I:%M:%S %p %Z')
timer(dictionaryObjectParsed)
Heres the error I'm getting
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 756, in run
self.function(*self.args, **self.kwargs)
TypeError: timer() argument after * must be a sequence, not function
I was able to do this earlier but I think I did something to create this error, what the heck :(
I clearly am passing arguments to the timer function ... right?
EDIT
I also tried timer(dictionaryObjectParsed) but nothing...
Also, sorry for the noobie question this is just my second day in python... :P
dictionaryObjectParsed()actually returnsNone, so one argument is being passed totimer.threading.Timer(1,timer).start()? Are you trying to do a time-delayed recursion of some kind?