Changeset 2462


Ignore:
Timestamp:
Sep 8, 2016 10:08:47 AM (5 years ago)
Author:
toby
Message:

allow semicolon for .csv

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/imports/G2pwd_csv.py

    r2133 r2462  
    2626    def __init__(self):
    2727        super(self.__class__,self).__init__( # fancy way to self-reference
    28             extensionlist=('.csv',),
     28            extensionlist=('.csv','.xy','.XY',),
    2929            strictExtension=True,
    30             formatName = 'comma/tab separated (.csv)',
     30            formatName = 'comma/tab/semicolon separated',
    3131            longFormatName = 'Worksheet-type .csv powder data file'
    3232            )
     
    4444            begin = True
    4545            for i,S in enumerate(filepointer):
    46                 vals = S.replace(',',' ').split()
     46                vals = S.replace(',',' ').replace(';',' ').split()
    4747                if len(vals) < 2 and i > 0:
    4848                    print 'Line '+str(i+1)+' cannot be read:\n\t'+S
Note: See TracChangeset for help on using the changeset viewer.