11 lines
321 B
Python
Executable File
11 lines
321 B
Python
Executable File
#!/usr/bin/env python3
|
|
# Sends one command to the QEMU monitor: monitor.py SOCKET 'command'
|
|
# (screendump FILE, sendkey KEY, device_add ..., quit, ...)
|
|
import socket, sys, time
|
|
s = socket.socket(socket.AF_UNIX)
|
|
s.connect(sys.argv[1])
|
|
time.sleep(0.3)
|
|
s.recv(65536)
|
|
s.sendall((sys.argv[2] + "\n").encode())
|
|
time.sleep(0.5)
|