im calling pyhook related script from python windows service its not getting execute but for normal execution and debug its working fine.
Code:
import pythoncom,pyHook , sys
import datetime
import win32api
import ctypes
last_event = ''
def info(idle_time) :
  try :
	fo = open("testschd.txt", "a+")
  except :
	fo = open("testschd.txt", "wb")
  fo.write(str(idle_time))
...