Sending Terminal Command (Python) Using LiveCode?

Thierry Douez th.douez at gmail.com
Wed Aug 27 05:18:11 EDT 2014


2014-08-27 9:27 GMT+02:00 Rolf Kocherhans :

> Hello John
>
> Yes this is possible, I do this all the time !

I do this very often too, with Perl or shells.

Instead of using the replace, I've choosen the merge road;
find it more flexible and readable when you have to deal with a long list
of commands.

Even build all the custom properties containing the template commands
automatically from the API documentation of the external tool with the help
of LC + regex.

HTH,

Thierry

>
> The way I use it:
> Create a stack with a field, put the whole python script
> (can have multiple lines) into the field.
> Replace place holders (replace %NAME% with Peter etc.) in the field,
> and then put field into a  variable and execute it with the shell command !
>
>> I would like to be able to call the GAM Python scripts via LiveCode. A typical GAM python terminal command would be something like:
>>
>> python gam.py create user jdoe at student.email.k12.ca.us firstname John lastname Doe password 111111 change password off
>>
>> Could I call this Python script directly from LiveCode?


------------------------------------------------
Thierry Douez - http://sunny-tdz.com
Maker of sunnYperl - sunnYmidi - sunnYmage




More information about the use-livecode mailing list