Index: sodar/trunk/sodar/scintec/maindata.py =================================================================== --- sodar/trunk/sodar/scintec/maindata.py (revision 296) +++ sodar/trunk/sodar/scintec/maindata.py (revision 300) @@ -152,8 +152,15 @@ # Divide the data into blocks # across boundaries separated by blank lines. - blocks = [block.strip() - for block - in mnd.split('\n\n') - if block.strip()] + EOL = '\r\n' # Windows file binary copied to Unix + def divide(mnd,eol): + blocks = [block.strip() + for block + in mnd.split(eol*2) + if block.strip()] + if len(blocks) < 2: + eol = '\n' # Windows to Windows or Unix to Unix + blocks, eol = divide(mnd,eol) + return (blocks,eol) + blocks,EOL = divide(mnd,EOL) # The first block is the specification of the format header. @@ -161,5 +168,5 @@ format_header_spec = [line.strip() for line - in blocks[0].split('\n') + in blocks[0].split(EOL) if line.strip()] @@ -190,5 +197,5 @@ file_header_body = [line.strip() for line - in blocks[1].split('\n') + in blocks[1].split(EOL) if not line.strip().startswith('#')] self.comments = dict([(name.strip(),value.strip()) @@ -219,5 +226,5 @@ self.extend([Profile([line.strip() for line - in block.split('\n') + in block.split(EOL) if line.strip()]) for block