mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-20 17:07:35 +08:00
34c9408530
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4512 7fd9a85b-ad96-42d3-883c-3090e2eb8679
20 lines
294 B
Python
20 lines
294 B
Python
#!/usr/bin/python
|
|
from socket import *
|
|
import time
|
|
|
|
SOCKET_NAME = '/tmp/osmocom_loader'
|
|
|
|
s = socket(AF_UNIX, SOCK_STREAM)
|
|
s.connect(SOCKET_NAME)
|
|
|
|
while 1:
|
|
try:
|
|
x = raw_input(">")
|
|
y = len(x) + 1
|
|
s.send(chr(y>>8) + chr(y&255) + x + "\n")
|
|
except:
|
|
print ''
|
|
break
|
|
|
|
s.close()
|