diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-01-10 08:47:07 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-01-10 08:47:07 +0200 |
commit | 35ead314dac37fabdb50f986767d0045ad0dae12 (patch) | |
tree | 8d53b83fef22b2ab5fbb2ad65bebbe158eb78240 /templates | |
parent | 26fbc95cb3433851cbb451f67e5c9c11dd5f8a7c (diff) | |
download | subplot-35ead314dac37fabdb50f986767d0045ad0dae12.tar.gz |
Change: generated Python program creates temp dir for each sceanio
Diffstat (limited to 'templates')
-rw-r--r-- | templates/python.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/python.py b/templates/python.py index 067e316..d8905f1 100644 --- a/templates/python.py +++ b/templates/python.py @@ -65,6 +65,8 @@ os.chdir(_datadir) {% for scenario in scenarios %} ###################################### print('''scenario: {{ scenario.title }}''') +_scendir = tempfile.mkdtemp(dir=_datadir) +os.chdir(_scendir) ctx = Context() {% for step in scenario.steps %} print(''' step: {{ step.kind | lower }} {{ step.text }}''') |