ModelHighAPI_Dumper& ModelHighAPI_Dumper::operator<<(
const std::shared_ptr<ModelAPI_AttributeString>& theAttrStr)
{
- *myDumpStorage << "\"" << theAttrStr->value() << "\"";
+ // escaping the quote sign in the string under dumping
+ std::string aStr = theAttrStr->value();
+ size_t aPos = aStr.find("\"");
+ while (aPos != std::string::npos) {
+ aStr.insert(aPos, "\\");
+ aPos = aStr.find("\"", aPos + 2);
+ }
+ *myDumpStorage << "'" << aStr << "'";
return *this;
}
#
from salome.shaper import model
-import inspect, os, sys
-
-from PyQt5.Qt import QApplication
-
-import salome
-salome.salome_init_without_session()
-salome.salome_init(1)
-if QApplication.instance() is None:
- app = QApplication([])
+import inspect, os
data_dir = os.path.join(os.path.dirname(inspect.getfile(lambda: None)), "data")
aListOfParameters = model.importParameters(Part_1_doc, aDir)
assert(len(aListOfParameters) == 0)
-assert(model.checkPythonDump())
from salome.shaper import model
import inspect, os
-from PyQt5.Qt import QApplication
-
-import salome
-salome.salome_init_without_session()
-salome.salome_init(1)
-if QApplication.instance() is None:
- app = QApplication([])
-
data_dir = os.path.join(os.path.dirname(inspect.getfile(lambda: None)), "data")
model.begin()