LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
planix
- Livecode Opensource Backer

- Posts: 47
- Joined: Tue Mar 10, 2009 12:47 pm
Post
by planix » Thu Aug 20, 2009 12:19 pm
Hi,
I want to experiment with python as an external/alternate language with Rev as the GUI front end. But, when I check my alternatelanguages I get
Code: Select all
XML
VBScript
VBScript.Encode
JScript.Compact
JScript
JScript.Encode
"SignedJavaScript"
"SignedVBScript"
I then installed python. But, checking alternate languages has the same result.
So, the question is can I install/access additional alternate scripting languages? If so, how?
I am using runrev 3.0 enterprise.
****************************************
PLANIX
"Knowing anything is better than knowing nothing. But knowing that nothing ain't anything, why that's just plain nirvana."
-
Mark
- Livecode Opensource Backer

- Posts: 5150
- Joined: Thu Feb 23, 2006 9:24 pm
-
Contact:
Post
by Mark » Thu Aug 20, 2009 1:25 pm
Hi planix,
If a language is able to hook into the scripting APIs of the operating system, it will be available as an alternateLanguage, such as Latenight Software's JavaScript OSA extension for Mac OS X. You don't need to do anything special for that. Since Python can't do that, it isn't available, but fortunately it is very easy to run Python from the shell.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
planix
- Livecode Opensource Backer

- Posts: 47
- Joined: Tue Mar 10, 2009 12:47 pm
Post
by planix » Thu Aug 20, 2009 1:37 pm
Thanks Mark.
Bryan McCormick revUp 50
http://www.runrev.com/newsletter/june/i ... etter1.php describes using python as an alternate language.
This puts the return delimited list of languages into the message box. Of course you can roll this into a function for later testing to make sure the target language is available before you go off into the weeds. Something like...
function isLangInstalled pLang
put the alternatelanguages into temp
if pLang is not in temp then
return "ERROR:"&& pLang &&"is not installed."
else
return empty
end if
end isLangInstalled
You would call this in your mouseUp or other script passing "Python" as the pLang parameter to the function, or whatever your target language may be.
Is he just referring to the Mac environment?
Can you point me to some additional docs or tutorials on using the shell command? A quick browse suggests I could use pretty much any program that can be accessed via the command line. Is that right? If so, I really would like to get up to speed with that for the project I am thinking about.
cheers
****************************************
PLANIX
"Knowing anything is better than knowing nothing. But knowing that nothing ain't anything, why that's just plain nirvana."