test for flush()

This commit is contained in:
qiurui 2024-04-10 17:38:22 +08:00
parent c39e6e2606
commit f7d0bcd4ff
1 changed files with 5 additions and 2 deletions

View File

@ -5,8 +5,11 @@ from socket import *
NULL_CHAR = chr(0)
def write_report(report):
with open('/dev/hidg0','rb+') as fd:
fd.write(report)
#fd = open('/dev/hidg0','rb+')
fd = open('/home/qiurui/Documents/project/keyboard-hook/test/test.txt','rb+')
fd.write(report)
fd.flush()
fd.close()
#''代表服务器为 localhost
myHost = ''