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
068569a2
Commit
068569a2
authored
Mar 12, 2026
by
Eric Duminil
Browse files
Adding SimStadt info
parent
8c5f5805
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/simstadt/__init__.py
View file @
068569a2
...
@@ -28,5 +28,24 @@ __all__ = [
...
@@ -28,5 +28,24 @@ __all__ = [
def
main
()
->
None
:
def
main
()
->
None
:
import
re
from
.runner
import
get_simstadt_folder
,
get_simstadt_output
print
(
"simstadt - Python library for SimStadt workflows."
)
print
(
"simstadt - Python library for SimStadt workflows."
)
print
(
"See https://simstadt.hft-stuttgart.de/ for SimStadt documentation."
)
print
(
"See https://simstadt.hft-stuttgart.de/ for SimStadt documentation."
)
print
()
try
:
folder
=
get_simstadt_folder
()
print
(
f
"SimStadt folder :
{
folder
}
"
)
except
ValueError
as
e
:
print
(
f
"SimStadt folder : NOT FOUND (
{
e
}
)"
)
return
output
=
get_simstadt_output
(
folder
)
m
=
re
.
search
(
r
"Launching SimStadt (\S+) \((\w+), rev\. (\w+), (\d+)\)"
,
output
)
if
m
:
version
,
branch
,
commit
,
date
=
m
.
groups
()
print
(
f
"SimStadt version:
{
version
}
(branch:
{
branch
}
, rev:
{
commit
}
, date:
{
date
}
)"
)
else
:
print
(
"SimStadt version: unknown (could not parse version string)"
)
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