summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-01-10 08:47:07 +0200
committerLars Wirzenius <liw@liw.fi>2020-01-10 08:47:07 +0200
commit35ead314dac37fabdb50f986767d0045ad0dae12 (patch)
tree8d53b83fef22b2ab5fbb2ad65bebbe158eb78240 /templates
parent26fbc95cb3433851cbb451f67e5c9c11dd5f8a7c (diff)
downloadsubplot-35ead314dac37fabdb50f986767d0045ad0dae12.tar.gz
Change: generated Python program creates temp dir for each sceanio
Diffstat (limited to 'templates')
-rw-r--r--templates/python.py2
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 }}''')