Skip to content

Commit f7156fd

Browse files
fixed issue #132
1 parent 74d14bc commit f7156fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

PySpice/Spice/Xyce/RawFile.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ def _read_header(self, output):
127127

128128
""" Parse the header """
129129

130-
binary_line = b'Binary:' + os.linesep.encode('ascii')
130+
# see https://github.com/FabriceSalvaire/PySpice/issues/132
131+
# Xyce open the file in binary mode and print using: os << "Binary:" << std::endl;
132+
# endl is thus \n
133+
binary_line = b'Binary:\n'
131134
binary_location = output.find(binary_line)
132135
if binary_location < 0:
133136
raise NameError('Cannot locate binary data')

0 commit comments

Comments
 (0)