~pythonregexp2.7/python/issue2636-11

« back to all changes in this revision

Viewing changes to Demo/sockets/ftp.py

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-21 13:47:31 UTC
  • mfrom: (39021.1.404 Regexp-2.7)
  • mto: This revision was merged to the branch mainline in revision 39030.
  • Revision ID: darklord@timehorse.com-20080921134731-rudomuzeh1b2tz1y
Merged in changes from the latest python source snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
    hostname = gethostname()
92
92
    hostaddr = gethostbyname(hostname)
93
93
    hbytes = string.splitfields(hostaddr, '.')
94
 
    pbytes = [repr(port/256), repr(port%256)]
 
94
    pbytes = [repr(port//256), repr(port%256)]
95
95
    bytes = hbytes + pbytes
96
96
    cmd = 'PORT ' + string.joinfields(bytes, ',')
97
97
    s.send(cmd + '\r\n')