Skip to content

Commit

Permalink
Added common.tsv
Browse files Browse the repository at this point in the history
  • Loading branch information
turian committed Apr 21, 2009
1 parent aae952f commit 0357613
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tsv.py
@@ -0,0 +1,16 @@
"""
Tab-separated values.
Code from Shannon -jj Behrens: http://markmail.org/message/qeo4tyuqxsoziael
"""

import csv

DEFAULT_KARGS = dict(dialect='excel-tab', lineterminator='\n')

def create_default_reader(iterable):
"""Return a csv.reader with our default options."""
return csv.reader(iterable, **DEFAULT_KARGS)

def create_default_writer(iterable):
"""Return a csv.writer with our default options."""
return csv.writer(iterable, **DEFAULT_KARGS)

0 comments on commit 0357613

Please sign in to comment.