Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

A nicer API around sockets.

Project Description

A friendlier interface to socket.

Emulates file-like objects.

import sockless


with sockless.open('irc.freenode.net:6665', mode='rw') as sock:
    # Writing.
    sock.write('NICK atestbot\r\n')
    sock.write('USER atestbot bot@aserver.com unused :atestbot\r\n')
    sock.write('JOIN #testbot\r\n')

    # Reading lines from a socket.
    for line in sock:
        if not line:
            break

        if 'End of /NAMES list' in line:
            print "Successfully connected & joined. Quitting."
            break

        print line.strip()

TODO

  • Tests
  • Docs
  • Python 3 support

Release history Release notifications

This version
History Node

0.9.1

History Node

0.9.0

History Node

0.8.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
sockless-0.9.1-py2.py3-none-any.whl (5.0 kB) Copy SHA256 hash SHA256 Wheel 2.7 Apr 11, 2015
sockless-0.9.1.tar.gz (4.2 kB) Copy SHA256 hash SHA256 Source None Apr 11, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page