Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SimStadt
simstadtpy
Commits
0cfb05ec
Commit
0cfb05ec
authored
May 18, 2026
by
Eric Duminil
Browse files
Use latest Simstadt version if multiple are available
parent
d225e3ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/simstadt/runner.py
View file @
0cfb05ec
...
@@ -38,17 +38,18 @@ log = logging.getLogger(__name__)
...
@@ -38,17 +38,18 @@ log = logging.getLogger(__name__)
def
find_simstadt
(
parent_folder
:
Path
,
simstadt_glob
:
str
=
SIMSTADT2_GLOB
)
->
Path
:
def
find_simstadt
(
parent_folder
:
Path
,
simstadt_glob
:
str
=
SIMSTADT2_GLOB
)
->
Path
:
try
:
simstadts
=
sorted
(
parent_folder
.
glob
(
simstadt_glob
))
found
=
next
(
parent_folder
.
glob
(
simstadt_glob
))
if
len
(
simstadts
)
>
0
:
found
=
simstadts
[
-
1
]
log
.
info
(
"# SimStadt found in %s
\n
"
,
found
)
log
.
info
(
"# SimStadt found in %s
\n
"
,
found
)
return
found
return
found
e
xcept
StopIteration
as
e
:
e
ls
e
:
raise
ValueError
(
raise
ValueError
(
f
"SimStadt not found in
{
parent_folder
}
/
{
simstadt_glob
}
.
\n
"
f
"SimStadt not found in
{
parent_folder
}
/
{
simstadt_glob
}
.
\n
"
"Please Set the SIMSTADT_FOLDER environment variable, "
"Please Set the SIMSTADT_FOLDER environment variable, "
"or install SimStadt on the Desktop.
\n\n
"
"or install SimStadt on the Desktop.
\n\n
"
"See https://simstadt.hft-stuttgart.de/getting-started/install-software/"
"See https://simstadt.hft-stuttgart.de/getting-started/install-software/"
)
from
e
)
def
get_simstadt_folder
()
->
Path
:
def
get_simstadt_folder
()
->
Path
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment