Labeled Tab-separated Values parser
Project description
Parser implementation in Python
- LTSV:
- Labeled Tab-separated Values
Installation
pip install ltsv
Usage
parsing
csv like interface:
>>> import sys
>>> if sys.version_info[0] == 3:
... from io import StringIO
... else:
... from cStringIO import StringIO
...
>>> import ltsv
>>> reader = ltsv.reader(StringIO("ip:127.0.0.1\thost:localhost"))
>>> next(reader)
[['ip', '127.0.0.1'], ['host', 'localhost']]
writing
dic = {u'ip': u'127.0.0.1', u'host': u'localhost'}
string = ltsv.writer(dic)
print(string)
# ip:127.0.0.1 host:localhost
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ltsv-0.0.5.tar.gz
(2.1 kB
view details)
File details
Details for the file ltsv-0.0.5.tar.gz.
File metadata
- Download URL: ltsv-0.0.5.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bebd1051ddec9b52237e252473a91b5f4eeea04a4ef0353e2ef354ec92984b0
|
|
| MD5 |
8d041ecdeaa90b341ff27bdeb6b1906d
|
|
| BLAKE2b-256 |
eb088398ac4672b3f357396feb345691781506570f41397d5ca42ea4298c7bd5
|