How to Run a Script from within a Script

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
jsonnabend
Experienced User
Posts: 127
Joined: Wed Apr 23, 2008 7:35 pm

How to Run a Script from within a Script

Post by jsonnabend » Wed Mar 04, 2009 2:39 pm

I am trying to run a second script from within a first script by passing the first script the actual text of the second script. I have a line like:

eg.plugins.EventGhost.PythonScript(script)

where the variable script holds the text of the second script (taken from a cut and paste of a PythonScript action). The second script won't run. The error I get is:

Traceback (most recent call last):
Python script "44", line 4, in <module>
eg.plugins.EventGhost.PythonScript(script)
File "C:\Program Files\EventGhost\eg\Classes\ActionClass.py", line 78, in __call__
AttributeError: class Compile has no attribute 'im_func'

I'm using EG 0.3.6.1430, WinXP.

- Jeff

Post Reply