]>
git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/rpython.py
3 # Remote python client.
4 # Execute Python commands remotely and send output back.
15 print "usage: rpython host command"
19 i
= string
.find(host
, ':')
21 port
= string
.atoi(port
[i
+1:])
23 command
= string
.join(sys
.argv
[2:])
24 s
= socket(AF_INET
, SOCK_STREAM
)
25 s
.connect((host
, port
))
30 data
= s
.recv(BUFSIZE
)