]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Update Platine.py to create directory to store if it is not exists
authorazv <azv@opencascade.com>
Fri, 6 May 2016 09:56:13 +0000 (12:56 +0300)
committerazv <azv@opencascade.com>
Fri, 6 May 2016 09:56:35 +0000 (12:56 +0300)
src/PythonAPI/examples/Platine.py

index e5b3cb50d695584a6b783569900cc38ac087a515..9ff45cca55e2da4195d46617e473669266200a8c 100644 (file)
@@ -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()