Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PyLTSpice/editor/spice_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(self, netlist_file: str | Path, encoding='autodetect', create_blank
if netlist_file.suffix == ".asc":
LTspice.create_netlist(netlist_file)
netlist_file = netlist_file.with_suffix(".net")
super().__init__(netlist_file, encoding, create_blank)
super().__init__(netlist_file, encoding, create_blank=create_blank)

def run(self, wait_resource: bool = True, callback: Callable[[str, str], Any] = None, timeout: float = 600,
run_filename: str = None, simulator=None):
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# README #

_Current Version 5.5.1_
_Current Version 6.0.1_

PyLTSpice is a toolchain of python utilities design to interact with LTSpice Electronic Simulator.
It is mostly based on the spicelib package, being the main difference to it is
Expand Down Expand Up @@ -559,7 +559,9 @@ _Make sure to initialize the root logger before importing the library to be able
For support and improvement requests please open an Issue in [GitHub spicelib issues](https://github.com/nunobrum/spicelib/issues)

## History ##
Version 5.5.1 (spicelib 1.5.1)
* Version 6.0.1 (spicelib 1.6.1)
* Fixing Issue #159 - Incompatibilities with spicelib 1.6.0 (PR: SAY-5:fix-spiceeditor-create-blank)
* Version 5.5.1 (spicelib 1.5.1)
* Solving problems with unittests using LTspice 26.
* Removing type annotations from docstrings to avoid problems with the new Sphinx version.
* Fixes on the documentation to align with spicelib 1.5.1
Expand Down
6 changes: 3 additions & 3 deletions examples/testfiles/AC - STEP_1.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LTspice 26.0.1 for Windows
LTspice 26.0.2 for Windows
Circuit: C:\sandbox\PyLTSpice\examples\testfiles\AC - STEP_1.net
Start Time: Sun Mar 22 16:18:17 2026
Start Time: Fri Jun 19 21:13:54 2026

.step r1=1000
solver = Normal
Expand All @@ -16,7 +16,7 @@ Compress2ndOrder = true
.step r1=10000
.OP point found by inspection.
.OP point found by inspection.
Total elapsed time: 0.027 seconds.
Total elapsed time: 0.020 seconds.

Files loaded:
C:\sandbox\PyLTSpice\examples\testfiles\AC - STEP_1.net
Expand Down
Binary file modified examples/testfiles/AC - STEP_1.raw
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/testfiles/AC_1.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LTspice 26.0.1 for Windows
LTspice 26.0.2 for Windows
Circuit: C:\sandbox\PyLTSpice\examples\testfiles\AC_1.net
Start Time: Sun Mar 22 16:18:14 2026
Start Time: Fri Jun 19 21:13:52 2026
solver = Normal
Maximum thread count: 16
tnom = 27
Expand All @@ -10,7 +10,7 @@ Compress1stOrder = true
Compress2ndOrder = true
.OP point found by inspection.
.OP point found by inspection.
Total elapsed time: 0.031 seconds.
Total elapsed time: 0.013 seconds.

Files loaded:
C:\sandbox\PyLTSpice\examples\testfiles\AC_1.net
Expand Down
Binary file modified examples/testfiles/AC_1.raw
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/testfiles/Batch_Test_1.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LTspice 26.0.1 for Windows
LTspice 26.0.2 for Windows
Circuit: C:\sandbox\PyLTSpice\examples\testfiles\Batch_Test_1.net
Start Time: Sun Mar 22 16:18:27 2026
Start Time: Fri Jun 19 21:14:02 2026
solver = Normal
Maximum thread count: 16
tnom = 27
Expand All @@ -9,7 +9,7 @@ method = modified trap
Compress1stOrder = true
Compress2ndOrder = true
Direct Newton iteration succeeded in finding operating point.
Total elapsed time: 0.087 seconds.
Total elapsed time: 0.060 seconds.

Files loaded:
C:\sandbox\PyLTSpice\examples\testfiles\Batch_Test_1.net
Expand Down
Binary file modified examples/testfiles/Batch_Test_1.raw
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/testfiles/DC op point - STEP_1.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LTspice 26.0.1 for Windows
LTspice 26.0.2 for Windows
Circuit: C:\sandbox\PyLTSpice\examples\testfiles\DC op point - STEP_1.net
Start Time: Sun Mar 22 16:18:32 2026
Start Time: Fri Jun 19 21:14:06 2026
solver = Normal
Maximum thread count: 16
tnom = 27
Expand All @@ -18,7 +18,7 @@ Direct Newton iteration succeeded in finding operating point.
Direct Newton iteration succeeded in finding operating point.
Direct Newton iteration succeeded in finding operating point.
Direct Newton iteration succeeded in finding operating point.
Total elapsed time: 0.079 seconds.
Total elapsed time: 0.084 seconds.

Files loaded:
C:\sandbox\PyLTSpice\examples\testfiles\DC op point - STEP_1.net
Expand Down
Binary file modified examples/testfiles/DC op point - STEP_1.raw
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/testfiles/DC op point_1.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LTspice 26.0.1 for Windows
LTspice 26.0.2 for Windows
Circuit: C:\sandbox\PyLTSpice\examples\testfiles\DC op point_1.net
Start Time: Sun Mar 22 16:18:30 2026
Start Time: Fri Jun 19 21:14:04 2026
solver = Normal
Maximum thread count: 16
tnom = 27
Expand All @@ -9,7 +9,7 @@ method = modified trap
Compress1stOrder = true
Compress2ndOrder = true
Direct Newton iteration succeeded in finding operating point.
Total elapsed time: 0.014 seconds.
Total elapsed time: 0.018 seconds.

Files loaded:
C:\sandbox\PyLTSpice\examples\testfiles\DC op point_1.net
Expand Down
Binary file modified examples/testfiles/DC op point_1.raw
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/testfiles/TRAN - STEP_1.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LTspice 26.0.1 for Windows
LTspice 26.0.2 for Windows
Circuit: C:\sandbox\PyLTSpice\examples\testfiles\TRAN - STEP_1.net
Start Time: Sun Mar 22 16:18:49 2026
Start Time: Fri Jun 19 21:14:19 2026

.step vin=1 r1=1000
solver = Normal
Expand All @@ -24,7 +24,7 @@ Compress2ndOrder = true
.step vin=10 r1=10000
.OP point found by inspection.
.OP point found by inspection.
Total elapsed time: 0.070 seconds.
Total elapsed time: 0.057 seconds.

Files loaded:
C:\sandbox\PyLTSpice\examples\testfiles\TRAN - STEP_1.net
Expand Down
Binary file modified examples/testfiles/TRAN - STEP_1.raw
Binary file not shown.
6 changes: 3 additions & 3 deletions examples/testfiles/TRAN_1.log
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LTspice 26.0.1 for Windows
LTspice 26.0.2 for Windows
Circuit: C:\sandbox\PyLTSpice\examples\testfiles\TRAN_1.net
Start Time: Sun Mar 22 16:18:46 2026
Start Time: Fri Jun 19 21:14:16 2026
solver = Normal
Maximum thread count: 16
tnom = 27
Expand All @@ -10,7 +10,7 @@ Compress1stOrder = true
Compress2ndOrder = true
.OP point found by inspection.
.OP point found by inspection.
Total elapsed time: 0.032 seconds.
Total elapsed time: 0.020 seconds.

Files loaded:
C:\sandbox\PyLTSpice\examples\testfiles\TRAN_1.net
Expand Down
Binary file modified examples/testfiles/TRAN_1.raw
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/testfiles/testfile.net
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
* C:\sandbox\PyLTSpice\examples\testfiles\testfile.asc
* Generated by LTspice 26.0.1 for Windows.
* Generated by LTspice 26.0.2 for Windows.
V1 in 0 PULSE(-1 1 1u 1n 1n 2m 1m 1)
R1 out in {res}
C1 out 0 {cap}
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
build-backend = "setuptools.build_meta"
[project]
name = "PyLTSpice"
version = "5.5.1"
version = "6.0.1"
authors = [
{ name="Nuno Brum", email="me@nunobrum.com" },
]
Expand All @@ -15,7 +15,7 @@ readme = "README.md"
license = "GPL-3.0"
requires-python = ">=3.10"
dependencies = [
"spicelib>=1.5.1",
"spicelib>=1.6.0",
]
classifiers=[
"Programming Language :: Python :: 3",
Expand Down
7 changes: 6 additions & 1 deletion unittests/test_pyltspice.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,12 @@ def test_ac_analysis_steps(self):
self.assertAlmostEqual(angle(vout), angle(h), 5,
f"Difference between theoretical value ans simulation at point {point}")

#
def test_create_blank(self):
"""SpiceEditor forwards create_blank to the base class without raising"""
editor = SpiceEditor("blank.net", create_blank=True)
self.assertIsInstance(editor, SpiceEditor)

#
# def test_pathlib(self):
# """pathlib support"""
# import pathlib
Expand Down
Loading