Skip to content

Commit

Permalink
Merge pull request #125 from fragmuffin/feature/temp-module-name
Browse files Browse the repository at this point in the history
changed __name__ to be more descriptive
  • Loading branch information
jmwright committed Jun 19, 2018
2 parents 04183a4 + ed2630c commit 4fc32ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CQGui/Command.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def Activated(self):

# We import this way because using execfile() causes non-standard script execution in some situations
with revert_sys_modules():
imp.load_source('temp_module', tempFile.name)
imp.load_source('__cq_freecad_module__', tempFile.name)

msg = QtGui.QApplication.translate(
"cqCodeWidget",
Expand Down
1 change: 1 addition & 0 deletions Libs/cadquery/cadquery/cqgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def build(self, build_parameters=None, build_options=None):
self.set_param_values(build_parameters)
collector = ScriptCallback()
env = EnvironmentBuilder().with_real_builtins().with_cadquery_objects() \
.add_entry("__name__", "__cqgi__") \
.add_entry("show_object", collector.show_object) \
.add_entry("debug", collector.debug) \
.add_entry("describe_parameter",collector.describe_parameter) \
Expand Down

0 comments on commit 4fc32ec

Please sign in to comment.