This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
# ListIO

Read/write lists and maps (two dimensional lists) from/to files.

Lists are stored as plain text -- one value per line.

Maps (two dimensional lists) are stored as CSV.

When reading a list or map from a file, lines starting with a hash sign (`#`) are considered to be comments and ignored.

## Installation

Install using setuptools:

```
python setup.py install
```

## Usage

See [tests/test_listio.py](tests/test_listio.py) for a working example.

### Lists

#### Writing

```python
import listio

listio.write_list(
'mylist.txt',
['foo', 'bar', 'baz']
)
```

mylist.txt now contains:

```
foo
bar
baz
```

#### Reading

mylist.txt:

```
First item
second item
foo
# this is a comment
bar
```

```python
import listio

mylist = listio.read_list('mylist.txt')
```

Variable `mylist` now contains an iterator. If we print it:

```python
print(list(mylist))
```

the result is:

```python
['First item', 'second item', 'foo', 'bar']
```

### Maps

#### Writing

```python
import listio

listio.write_map(
'mymap.csv,
[['foo bar', 'baz', 'x'], [1, 2, 3]]
)
```

mymap.csv now contains:

```
foo bar;baz;x
1;2;3
```

### Reading

mymap.csv:

```csv
First column;"second column";3
# this is a comment
"next;item,";foo;bar
```

```python
import listio

mymap = listio.read_map('mymap.csv')
```

Variable `mymap` now contains an iterator. If we print it:

```python
print(list(mymap))
```

the result is:

```python
[['First column', 'second column', '3'], ['next;item,', 'foo', 'bar']]
```

## Contributing

See [NOTICE](./NOTICE) and [LICENSE](./LICENSE) for license information.
Release History

Release History

1.0.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
listio-1.0.0-py2.7.egg (3.1 kB) Copy SHA256 Checksum SHA256 2.7 Egg Apr 21, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting