Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83493
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <contropinion@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'else:': 0.03; 'subject:: [': 0.04; 'argument': 0.05; 'elif': 0.05; 'subject:file': 0.07; 'sys': 0.07; 'python': 0.11; 'address)': 0.16; 'port))': 0.16; 'subject: \n ': 0.16; 'supplied': 0.16; 'true:': 0.16; 'subject:python': 0.16; 'subject:] ': 0.20; 'command': 0.22; 'import': 0.22; '15,': 0.26; 'message-id:@mail.gmail.com': 0.30; 'file': 0.32; 'run': 0.32; '(most': 0.33; 'skip:# 10': 0.33; 'to:name:python-list': 0.33; 'test': 0.35; 'received:google.com': 0.35; 'data,': 0.36; 'server': 0.38; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'address': 0.63; 'invalid': 0.68; 'listening': 0.74; 'address,': 0.75; '1060': 0.84; 'failure:': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=3VdMR9bUS75WXMAxDGdfzCKIOBXtXbHvOLdfMTpZ0qY=; b=NmZaaWMFW0YjFwoWgb0X0kdS50301aR4LyqfkxIKzYxOw3IxP2U4X3YXKBsmimAdvV c4ZF1U8H0QSVxWzxWvryPiDnmJzpEaUf5uLxhcvCF7mOtORzVoXr7g0iK5Fml17GjbGP rRSG78YLSjYjNMWNBbJsHAV7A63z1ZCk66ChMUeZ4iQQsmS6aj+i1CW3vi42sT1KfO7V hedqXwsdfWIR95DA6QIg7EX7tCTxPDt7UFnPdqjn3PnC9N5nxdm93xgF6SPf9mdwTohY GS7DbFNA+MwjcSP70XE84NlnDntD5MxZhFTtgF2GqKL8nECUsck9orM5nXiHytohJPa9 g4gg== |
| MIME-Version | 1.0 |
| X-Received | by 10.194.77.38 with SMTP id p6mr38496095wjw.62.1420877556122; Sat, 10 Jan 2015 00:12:36 -0800 (PST) |
| Date | Sat, 10 Jan 2015 16:12:36 +0800 |
| Subject | OSError: [WinError 10022] An invalid argument was supplied in udp python file |
| From | contro opinion <contropinion@gmail.com> |
| To | python-list <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17556.1420877558.18130.python-list@python.org> (permalink) |
| Lines | 34 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1420877558 news.xs4all.nl 2945 [2001:888:2000:d::a6]:56156 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:83493 |
Show key headers only | View raw
When i test an udp.py file on server and client in python34.
#!/usr/bin/env python
import socket, sys
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
MAX = 65535
PORT = 1060
if sys.argv[1:] == ['server']:
s.bind(('127.0.0.1', PORT))
print('Listening at', s.getsockname())
while True:
data, address = s.recvfrom(MAX)
print('The client at', address, 'says', repr(data))
s.sendto('Your data was %d bytes' % len(data), address)
elif sys.argv[1:] == ['client']:
print('Address before sending:',s.getsockname())
s.sendto('This is my message',('127.0.0.1', PORT))
print('Address after sending',s.getsockname())
data, address = s.recvfrom(MAX)
print('The server', address, 'says', repr(data))
else:
print('usage: udp_local.py server|client')
The command `python udp.py server` get output:
Listening at ('127.0.0.1', 1060)
Why `python udp.py client` run failure:
Traceback (most recent call last):
File "d://udp.py", line 15, in <module>
print('Address before sending:', s.getsockname())
OSError: [WinError 10022] An invalid argument was supplied
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
OSError: [WinError 10022] An invalid argument was supplied in udp python file contro opinion <contropinion@gmail.com> - 2015-01-10 16:12 +0800
csiph-web