Page 1 of 1

defining functions I can call from python scripts

Posted: Tue Oct 12, 2010 9:50 am
by miljbee
Hello,

Is there a way to define "functions" or "sub" or something similar, that I could call from python scripts (actions) ?

Regards,

Re: defining functions I can call from python scripts

Posted: Tue Oct 12, 2010 12:01 pm
by Pako
Of course it is possible.
Look at the example:
Script-Function.jpg
Script-Function.jpg (13.12 KiB) Viewed 2494 times
Python script contains this code:

Code: Select all

def TestFunction(txt):
    print txt
eg.globals.testFunction = TestFunction
Pako

Re: defining functions I can call from python scripts

Posted: Tue Oct 12, 2010 4:59 pm
by miljbee
great !

Thank you very much !