Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #96875
| Path | csiph.com!goblin3!goblin2!goblin.stu.neva.ru!newsfeed1.swip.net!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'api.': 0.04; 'socket': 0.07; 'wrapper': 0.07; 'added.': 0.09; 'bsd': 0.09; 'high-level': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sockets': 0.09; 'thread': 0.10; 'python': 0.10; 'python.': 0.11; 'applies': 0.15; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'socket.': 0.16; 'threading': 0.16; 'bytes': 0.18; 'helper': 0.18; ';-)': 0.18; 'library': 0.20; 'preferred': 0.20; 'simpler': 0.22; 'trying': 0.22; 'bit': 0.23; 'module': 0.25; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'fine': 0.28; 'initial': 0.28; 'convenience': 0.29; 'guarantees': 0.29; 'idea,': 0.29; 'so-called': 0.29; 'sure,': 0.29; 'handled': 0.29; 'normally': 0.30; 'extend': 0.31; 'guess': 0.31; 'url:python': 0.33; 'qualify': 0.33; 'message-id:@gmail.com': 0.34; 'handle': 0.34; 'list': 0.34; 'trouble': 0.35; 'something': 0.35; 'but': 0.36; 'should': 0.36; 'instead': 0.36; 'needed': 0.36; 'there': 0.36; 'url:org': 0.36; '(and': 0.36; 'basic': 0.36; 'framework': 0.36; 'modules': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'detail': 0.38; 'guys': 0.38; 'anything': 0.38; 'end': 0.39; 'does': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'some': 0.40; 'save': 0.60; 'your': 0.60; 'back': 0.62; 'here.': 0.62; 'more': 0.63; 'transferred': 0.72; 'received:89': 0.80; 'extra.': 0.84; 'is)': 0.84; 'streams': 0.84; 'improvement': 0.93 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Akira Li <4kir4.1i@gmail.com> |
| Subject | Re: Lightwight socket IO wrapper |
| Date | Sun, 20 Sep 2015 16:15:07 +0300 |
| References | <mtm18o$9fm$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| X-Gmane-NNTP-Posting-Host | 89.169.229.68 |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
| Cancel-Lock | sha1:ybybjaBxWg3tdR2B1WyACewntsI= |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| 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.37.1442754893.21674.python-list@python.org> (permalink) |
| Lines | 41 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1442754893 news.xs4all.nl 23798 [2001:888:2000:d::a6]:40068 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:96875 |
Show key headers only | View raw
"James Harris" <james.harris.1@gmail.com> writes: > I guess there have been many attempts to make socket IO easier to > handle and a good number of those have been in Python. > > The trouble with trying to improve something which is already well > designed (and conciously left as is) is that the so-called improvement > can become much more complex and overly elaborate. That can apply to > the initial idea, for sure, but when writing helper or convenience > functions perhaps it applies more to the temptation to keep adding > just a little bit extra. The end result can be overly elaborate such > as a framework which is fine where such is needed but is overkill for > simpler requirements. > > Do you guys have any recommendations of some *lightweight* additions > to Python socket IO before I write any more of my own? Something built > in to Python would be much preferred over any modules which have to be > added. I had in the back of my mind that there was a high-level > socket-IO library - much as threading was added as a wrapper to the > basic thread module - but I cannot find anything above socket. Is > there any? Does ØMQ qualify as lightweight? > A current specific to illustrate where basic socket IO is limited: it > normally provides no guarantees over how many bytes are transferred at > a time (AFAICS that's true for both streams and datagrams) so the > delimiting of messages/records needs to be handled by the sender and > receiver. I do already handle some of this myself but I wondered if > there was a prebuilt solution that I should be using instead - to save > me adding just a little bit extra. ;-) There are already convenience functions in stdlib such as sock.sendall(), sock.sendfile(), socket.create_connection() in addition to BSD Sockets API. If you want to extend this list and have specific suggestions; see https://docs.python.org/devguide/stdlibchanges.html Or just describe your current specific issue in more detail here.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Lightwight socket IO wrapper "James Harris" <james.harris.1@gmail.com> - 2015-09-20 11:22 +0100
Re: Lightwight socket IO wrapper Akira Li <4kir4.1i@gmail.com> - 2015-09-20 16:15 +0300
Re: Lightwight socket IO wrapper "James Harris" <james.harris.1@gmail.com> - 2015-09-20 23:36 +0100
Re: Lightwight socket IO wrapper Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-09-20 20:19 -0400
Re: Lightwight socket IO wrapper Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-09-21 17:46 +1200
Re: Lightwight socket IO wrapper Jorgen Grahn <grahn+nntp@snipabacken.se> - 2015-09-21 11:25 +0000
Re: Lightwight socket IO wrapper "James Harris" <james.harris.1@gmail.com> - 2015-09-22 20:45 +0100
Re: Lightwight socket IO wrapper Random832 <random832@fastmail.com> - 2015-09-22 19:52 -0400
Re: Lightwight socket IO wrapper Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-09-23 12:47 +1200
Re: Lightwight socket IO wrapper Chris Angelico <rosuav@gmail.com> - 2015-09-21 10:34 +1000
Re: Lightwight socket IO wrapper Akira Li <4kir4.1i@gmail.com> - 2015-09-21 06:07 +0300
Re: Lightwight socket IO wrapper "James Harris" <james.harris.1@gmail.com> - 2015-09-22 21:05 +0100
Re: Lightwight socket IO wrapper Marko Rauhamaa <marko@pacujo.net> - 2015-09-23 00:00 +0300
Re: Lightwight socket IO wrapper "James Harris" <james.harris.1@gmail.com> - 2015-09-22 22:28 +0100
csiph-web