# Executing Python from Module

**URL:** <https://forum.inductiveautomation.com/t/executing-python-from-module/6073>\
**Category:** 3rd Party Modules\
**Created:** [March 21, 2013, 2:44pm UTC](https://forum.inductiveautomation.com/t/executing-python-from-module/6073 "2013-03-21T14:44:26Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 22, 2013, 9:39pm UTC](https://forum.inductiveautomation.com/t/executing-python-from-module/6073/9 "2013-03-22T21:39:19Z")

</div>

[quote=“chuckcoughlin”]`scriptmgr.runCode("app.ils.callback.handleCompletion",mgr.createLocalsMap(),"xxx");` gives a JythonExecException: File “xxx” in line 1 in , name “app” is not defined"

It seems as if this call expects Python code in an external file, whereas my code is, in the designer, in Configuration-\>Script Modules in a package app.lis.callback. The callback package has a method defined “handleCompletion”.

— chuck[/quote]

Are ‘mgr’ and ‘scriptmgr’ the same instances of ScriptManager? What’s going on there? And why doesn’t handleCompletion have the open/close paranethesis?

---

_[View the full topic](https://forum.inductiveautomation.com/t/executing-python-from-module/6073)._
