Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VAPython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Institute of Technical Acoustics (ITA)
VAPython
Merge requests
!15
Feature/pre release changes
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Feature/pre release changes
feature/pre-release-changes
into
feature/pure-python
Overview
12
Commits
10
Pipelines
0
Changes
5
All threads resolved!
Show all comments
Merged
Pascal Palenda
requested to merge
feature/pre-release-changes
into
feature/pure-python
9 months ago
Overview
12
Commits
10
Pipelines
0
Changes
5
All threads resolved!
Show all comments
This MR collects a few minor changes before the release. These include:
example runner
improvements to the release package
README rework
0
0
Merge request reports
Compare
feature/pure-python
version 3
ecc62c8a
9 months ago
version 2
a9732153
9 months ago
version 1
729475e3
9 months ago
feature/pure-python (base)
and
latest version
latest version
91fcc452
10 commits,
9 months ago
version 3
ecc62c8a
9 commits,
9 months ago
version 2
a9732153
8 commits,
9 months ago
version 1
729475e3
6 commits,
9 months ago
5 files
+
126
−
43
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
src/vapython/examples/__main__.py
0 → 100644
+
40
−
0
View file @ 91fcc452
Edit in single-file editor
Open in Web IDE
Show comments on this file
import
importlib
import
sys
from
pathlib
import
Path
def
main
():
current_path
=
Path
(
__file__
).
parent
example_files
=
list
(
current_path
.
glob
(
"
*example*.py
"
))
if
len
(
sys
.
argv
)
==
1
:
for
i
,
example_file
in
enumerate
(
example_files
):
print
(
f
"
{
i
}
:
{
example_file
.
stem
}
"
)
print
(
f
"
{
len
(
example_files
)
}
: Exit
"
)
example_index
=
int
(
input
(
"
Enter the index of the example you want to run:
"
))
else
:
example_index
=
int
(
sys
.
argv
[
1
])
if
example_index
==
len
(
example_files
):
return
if
example_index
<
0
or
example_index
>=
len
(
example_files
):
print
(
"
Invalid index
"
)
return
example_file
=
example_files
[
example_index
]
module_name
=
f
"
pigeon.examples.
{
example_file
.
stem
}
"
module
=
importlib
.
import_module
(
module_name
)
example_main
=
getattr
(
module
,
"
main
"
,
None
)
if
example_main
is
not
None
:
example_main
()
else
:
print
(
f
"
Could not find
'
main
'
function in module
'
{
module_name
}
'"
)
if
__name__
==
"
__main__
"
:
main
()
Loading