Project

General

Profile

« Previous | Next » 

Revision 1493

cat_csv: Added support for using - to cat stdin

View differences:

bin/cat_csv
16 16
    first_path = None
17 17
    first_info = None
18 18
    for path in paths:
19
        stream = open(path, 'rb')
19
        if path == '-': stream = sys.stdin
20
        else: stream = open(path, 'rb')
20 21
        
21 22
        # Get dialect and process first line
22 23
        info = csvs.stream_info(stream)

Also available in: Unified diff