Page 1 of 1

Use EG action to execute an existing .py script

Posted: Thu Jul 28, 2011 5:20 pm
by williamp0044
Hi all,
Just wondering if there is a way that I can go about executing a Python program/script/.py file after an action is triggered in EventGhost? Similar to the System Execute plugin. I've tried several options with the Python Command and Python Script plugins but my knowledge on the language is limited and the python program does not have a .exe file. The interpreter is installed and I can run the program under normal conditions but I'd liked to incorporate it into an EventGhost script.

Thanks in advance.

Re: Use EG action to execute an existing .py script

Posted: Thu Sep 01, 2011 9:18 pm
by cfull1
Have you tried using a batch file?
python script:

Code: Select all

eg.plugins.System.Execute(batch file, options, 1, False, 2, directory, False)
batch file:

Code: Select all

@echooff
file.py

Re: Use EG action to execute an existing .py script

Posted: Sun Dec 18, 2011 2:46 pm
by Mama70
Create Python Command action and set it: execfile("file.py")