skip to navigation
skip to content

Not Logged In

xmodem 0.2.4

XMODEM protocol implementation.

Package Documentation

Latest Version: 0.3.2

Documentation available at http://packages.python.org/xmodem/

Usage

Create a function to get and put character data (to a serial line for example):

>>> from xmodem import XMODEM
>>> def getc(size, timeout=1):
...     return data or None
...
>>> def putc(data, timeout=1):
...     return size or None
...
>>> modem = XMODEM(getc, putc)

Now, to upload a file, use the send method:

>>> stream = open('/etc/fstab', 'rb')
>>> modem.send(stream)

To download a file, use the recv method:

>>> stream = open('output', 'wb')
>>> modem.recv(stream)

For more information, take a look at the documentation.

 
File Type Py Version Uploaded on Size
xmodem-0.2.4-py2.6.egg (md5) Python Egg 2.6 2011-06-02 10KB
xmodem-0.2.4.tar.gz (md5) Source 2011-06-02 5KB
  • Downloads (All Versions):
  • 46 downloads in the last day
  • 276 downloads in the last week
  • 1210 downloads in the last month