From e8623c61ab61abec73f0c2055bc72914d3aba5c3 Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 6 May 2016 12:56:13 +0300 Subject: [PATCH] Update Platine.py to create directory to store if it is not exists --- src/PythonAPI/examples/Platine.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/PythonAPI/examples/Platine.py b/src/PythonAPI/examples/Platine.py index e5b3cb50d..9ff45cca5 100644 --- a/src/PythonAPI/examples/Platine.py +++ b/src/PythonAPI/examples/Platine.py @@ -4,7 +4,12 @@ import geom import model + +# START DEBUG PURPOSES +# Should be removed +import os import ModelAPI +# END DEBUG PURPOSES # Initialisation model.begin() @@ -202,8 +207,12 @@ model.do() # START DEBUG PURPOSES # prepare a study without last operation to trap floating problem with degenerated line +aPathToStore = os.path.join(os.getcwd(), "Data") +print aPathToStore +if not os.path.exists(aPathToStore): + os.mkdir(aPathToStore) results = ModelAPI.StringList() -ModelAPI.ModelAPI_Session.get().save("Data", results) +ModelAPI.ModelAPI_Session.get().save(aPathToStore, results) # END DEBUG PURPOSES b4 = body_4() -- 2.39.2