# HG changeset patch # User Ioannis # Date 1522152785 -10800 # Node ID a99ae250e086f008f4c06644387b91912dd1c675 # Parent c61651ad1137ac4d056d573b1fc8eb886374ab2d Change for reading new lines for both Windows and Linux diff -r c61651ad1137 -r a99ae250e086 atmospheric_lidar/licel.py --- a/atmospheric_lidar/licel.py Fri Mar 23 16:09:49 2018 +0200 +++ b/atmospheric_lidar/licel.py Tue Mar 27 15:13:05 2018 +0300 @@ -186,7 +186,7 @@ channels = {} photodiodes = {} - with open(self.filename, 'rb') as f: + with open(self.filename, 'rbU') as f: self.read_header(f) @@ -200,7 +200,7 @@ b = np.fromfile(f, 'b', 1) if (a[0] != 13) | (b[0] != 10): - logging.warning("No end of line found after record. File could be corrupt: %s" % file_path) + logging.warning("No end of line found after record. File could be corrupt: %s" % self.filename) channel = self.channel_data_class(current_channel_info, raw_data, self.duration(), use_id_as_name=self.use_id_as_name) @@ -326,7 +326,7 @@ def import_header_only(self): """ Import only the header lines, withouth reading the acutal data.""" - with open(self.filename, 'rb') as f: + with open(self.filename, 'rbU') as f: self.read_header(f) @staticmethod