Changeset 43 for python


Ignore:
Timestamp:
11/15/07 16:12:36 (12 years ago)
Author:
sgk
Message:

見た目

Location:
python/stackless
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/stackless/udp_client.py

    r42 r43  
    1111  while True: 
    1212    sock.sendto(str(i), DST) 
    13     print time.time(), 'sent %d' % i 
    14     print time.time(), sock.recvfrom(100) 
     13    print '%.6f sent %d' % (time.time(), i) 
     14    print '%.6f %r' % (time.time(), sock.recvfrom(100)) 
    1515    time.sleep(1) 
    1616    i += 1 
  • python/stackless/udp_server.py

    r42 r43  
    1515def udp_handler(sock, data, address): 
    1616  import time 
    17   print time.time(), '%r' % data 
     17  print '%.6f %r %r' % (time.time(), data, address) 
    1818  sock.sendto(data, address)    # エコーバック 
    1919  #XXX 時間がかかる処理を行う場合は、適宜の次の行をはさむ。 
Note: See TracChangeset for help on using the changeset viewer.