Skip to content

Commit 84c9454

Browse files
os.path -> Path
1 parent 0144bd6 commit 84c9454

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

PySpice/Spice/Netlist.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def __init__(self, **kwargs):
7878
####################################################################################################
7979

8080
from collections import OrderedDict
81+
from pathlib import Path
8182
import keyword
8283
import logging
8384
import os
@@ -1236,10 +1237,10 @@ def _str_includes(self, simulator=None):
12361237
# ngspice don't like // in path, thus ensure we write real paths
12371238
real_paths = []
12381239
for path in self._includes:
1239-
path = os.path.realpath(str(path))
1240+
path = Path(str(path)).resolve()
12401241
if simulator:
1241-
path_flavour = path + '@' + simulator
1242-
if os.path.exists(path_flavour):
1242+
path_flavour = Path(str(path) + '@' + simulator)
1243+
if path_flavour.exists():
12431244
path = path_flavour
12441245
real_paths.append(path)
12451246

0 commit comments

Comments
 (0)