-
Notifications
You must be signed in to change notification settings - Fork 32
/
setup.py
51 lines (38 loc) · 1.22 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from setuptools import setup, find_packages
setup(
name = 'xmodem',
version = '0.2.4',
author = 'Wijnand Modderman',
author_email = 'maze@pyth0n.org',
description = ('XMODEM protocol implementation.'),
long_description = '''
================================
XMODEM protocol implementation
================================
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_.
.. _documentation: http://packages.python.org/xmodem/xmodem.html
''',
license = 'MIT',
keywords = 'xmodem protocol',
packages = ['xmodem'],
package_data = {'': ['doc/*.TXT']},
)