mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
parent
ecfeb7f095
commit
70a6b49821
246 changed files with 926 additions and 962 deletions
|
@ -91,7 +91,7 @@ def sendportcmd(s, f, port):
|
|||
hostname = gethostname()
|
||||
hostaddr = gethostbyname(hostname)
|
||||
hbytes = string.splitfields(hostaddr, '.')
|
||||
pbytes = [`port/256`, `port%256`]
|
||||
pbytes = [repr(port/256), repr(port%256)]
|
||||
bytes = hbytes + pbytes
|
||||
cmd = 'PORT ' + string.joinfields(bytes, ',')
|
||||
s.send(cmd + '\r\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue