Skip to content
Snippets Groups Projects
Commit 2ff1600f authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

onlab : python without .ol metamodel (hack)

parent 956a5f84
No related branches found
No related tags found
No related merge requests found
......@@ -400,6 +400,11 @@ int MergeFile(const std::string &fileName, bool warnIfMissing)
// FIXME: this is a hack -- think about a better way
status = metamodel_cb(fileName);
}
else if(ext == ".py"){
FlGui::instance()->onelab->addSolver("python", fileName, "", 1);
onelab_cb(0, (void*)"check");
status = 1;
}
#endif
else {
CTX::instance()->geom.draw = 1;
......
......@@ -62,6 +62,8 @@ class client :
_GMSH_START = 1
_GMSH_STOP = 2
_GMSH_INFO = 10
_GMSH_MERGE_FILE = 20
_GMSH_PARSE_STRING = 21
_GMSH_PARAMETER = 23
_GMSH_PARAMETER_QUERY = 24
......@@ -108,6 +110,13 @@ class client :
self._get_parameter(p)
return p.value
def merge_file(self, filename) :
if not self.socket :
return
if filename and filename[0] != '/' :
filename = os.getcwd() + "/" + filename;
self._send(self._GMSH_PARSE_STRING, 'Merge "'+filename+'";')
def __init__(self):
self.socket = None
self.name = ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment