PySpice
PySpice copied to clipboard
Hardcoded line termination character in SpiceParser (Windows issues)
Environment (OS, Python version, PySpice version, simulator)
Windows 10 21H1 / Python 3.9.6 / PySpice 1.5
Expected Behaviour
SpiceParser.__init__() should correctly detect newline characters in the input string supplied via source and/or provide way for user to specify separator character(s).
Actual Behaviour
SpiceParser.__init__() always uses os.linesep (see Parser.py:829) as newline separator, which creates problems with parsing Unix-terminated netlist strings on Windows.
Steps to reproduce the behaviour
Attempt to parse Unix-terminated SPICE netlist via supplying SpiceParser with source option while running Windows.