Page 4 of 8
Re: Replace LiveCode Script with JavaScript, forever
Posted: Fri Mar 27, 2020 1:48 am
by PaulDaMacMan
FourthWorld wrote: Fri Mar 27, 2020 12:37 am
The OP left the room after his first post here, two months ago.
I know, I needed a break from working and I was bored/perusing the boards and just wanted to throw in my 0.5 cents.
Re: Replace LiveCode Script with JavaScript, forever
Posted: Fri Mar 27, 2020 3:25 am
by FourthWorld
Oh, it's not just you, it's all of us. Most of the threads here have one good question at the start, a very long multi-page series of tangents and diversions, and once in a while the OP returns to tell us how the project actually turned out. And once in a while they just never come back at all.
In this case, with just a single post and a request that kinda doesn't even make any sense (if we're going for popularity why not kill all languages and everyone use Java for everything?), I'm guessing he works for one of the way-too-many JS packager IDEs and seeing LC on the TIOBE list irked him.
Re: Replace LiveCode Script with JavaScript, forever
Posted: Fri Mar 27, 2020 10:20 am
by richmond62
I mentioned that I could not understand what was such a big thing about some new GUI IDE for Python that looked very shabby,
and pointed to LiveCode, on Reddit, and got such a slew of insults re LiveCode and personal insults ("you must be a cretin to use LiveCode.")
I became convinced that the Python crowd on Reddit could not "see the wood for the trees" as my old History teacher used to say.
An obsession with a single thing (religion, politics, programming language, car make) is rarely healthy.
Re: Replace LiveCode Script with JavaScript, forever
Posted: Fri Mar 27, 2020 3:59 pm
by FourthWorld
According to the Python conference sessions I've watched, it seems there are more apps in the mobile app stores made with LiveCode than with Python.
Today may have changed since I last watched them, but I don't see a lot of strong Python IDEs with mobile packagers. And given that Python had no built-in GUI support (few languages outside of xTalks do), it's not surprising, since one need to include Qt or other GUI framework in addition to the Python engine and one's own code. Not at all impossible, obviously, not apparently rare compared to the large role Python plays as a system management language.
But there's no doubt about Python's quality and popularity, so it's surprising anyone would have an insecurity complex over it.
Re: Replace LiveCode Script with JavaScript, forever
Posted: Mon Jul 06, 2020 12:44 pm
by okk
richmond62 wrote: Fri Mar 27, 2020 10:20 am
some new GUI IDE for Python that looked very shabby,
What was the name of that IDE? I am looking for something - even shabby - to make apps that have a dedicated GUI for executing python code, but I seem unable to find anything that gets close to Livecode in terms of development speed and user friendliness. I checked the Qt Creator IDE which seemed somewhat similar to LC, but workflow with python was still pretty cumbersome.
In my ideal world I would use LC for most of the development tasks like for example creating the user interface and the user interactions, but I could also access from within my LC program the fantatstic python libraries like for machine learning and so on. I know about shell function but I am not sure I fully understand how it could interact with python code.
And i disagree with the OP btw.
Best
Oliver
Re: Replace LiveCode Script with JavaScript, forever
Posted: Mon Jul 06, 2020 1:45 pm
by mrcoollion
On Windows, it is pretty easy to run Python scripts.
Just install Python for Windows
https://www.python.org/downloads/windows/
Use Shell to execute a python script like this (
put the script in a button and put print ("Hello world")
into the script).
Code: Select all
on mouseUp
-- put "c:\Python33\python c:\Python33\PAG_TestScript.py"&cr into tCommandline // This works
put "py c:\Python33\MyTestScript.py"&cr into tCommandline // Shorter and works also
set hideConsoleWindows to true
put shell(tCommandline) into tResult
set hideConsoleWindows to false
answer tResult
end mouseUp
Re: Replace LiveCode Script with JavaScript, forever
Posted: Sun Jul 12, 2020 3:04 pm
by okk
Thanks mrcoollion!
I slowly get familiar with the shell function. I can see how it could work on my own machine. Im my case I want to use python libraries to do some speech recognition and processing with the resulting data feeding back into my livecode application. But how would this work when I want to deliver a standalone application that uses those python scripts? i cannot expect that my users install python and the needed libraries. Could I in theory create an executable from the python scripts (via Pyinstaller for example) and then call this executable from Livecode? But perhaps this discussion should go to another thread on LC and python. Oliver
Re: Replace LiveCode Script with JavaScript, forever
Posted: Sun Jul 12, 2020 6:27 pm
by richmond62
In my ideal world I would use LC for most of the development tasks like for example creating the user interface and the user interactions, but I could also access from within my LC program the fantatstic python libraries like for machine learning and so on. I know about shell function but I am not sure I fully understand how it could interact with python code.
Um, erm, yes . . . we all have an "ideal world" . . . but, for some funny reason . . .

Re: Replace LiveCode Script with JavaScript, forever
Posted: Mon Jul 13, 2020 12:20 pm
by mrcoollion
okk wrote: Sun Jul 12, 2020 3:04 pm
Thanks mrcoollion!
i cannot expect that my users install python and the needed libraries.
There is a portable version of Python available. This makes it possible for you to add the portable python version to your own application install. E.g.
https://www.pythonanywhere.com/
This way your user will not have to install Python.
Just an idea......
Re: Replace LiveCode Script with JavaScript, forever
Posted: Mon Jul 13, 2020 4:23 pm
by FourthWorld
Which OSes don't come with Python preinstalled?
Re: Replace LiveCode Script with JavaScript, forever
Posted: Mon Jul 13, 2020 7:03 pm
by bogs
Windows, I suspect, and I don't think iOS or Android? This reply from S.O. would tend to confirm at least most Windows vers. don't have it.
As well, there is this little bit from the Python FAQ...
https://docs.python.org/3/faq/installed.html wrote:
-
Some Windows machines also have Python installed.
At this writing we’re aware of computers from
Hewlett-Packard and
Compaq that include Python. Apparently some of HP/Compaq’s administrative tools are written in Python.
- Many Unix-compatible operating systems, such as Mac OS X and
some Linux distributions, have Python installed by default; it’s included in the base installation.
Note that even in the 'nix / BSD world, it is hardly universal, although far more common than say, on Windows.
Re: Replace LiveCode Script with JavaScript, forever
Posted: Mon Jul 13, 2020 7:15 pm
by FourthWorld
Thanks, Bogs. I can understand mobile OSes not including Python, but on the desktop I guess I've been taking Windows Subsystem for Linux for granted for so long I've forgotten it's not active by default.
Re: Replace LiveCode Script with JavaScript, forever
Posted: Mon Jul 13, 2020 7:38 pm
by bogs
bogs wrote: Mon Jul 13, 2020 7:03 pm
and I don't think iOS or Android?
I probably didn't say this part clear enough, I
should have said "I know absolutely nothing about mobile, but I don't
think it is pre-installed on either of those systems?
Maybe someone that actually knows something about mobile would chime in on that side of things haha.
Re: Replace LiveCode Script with JavaScript, forever
Posted: Mon Jul 13, 2020 7:58 pm
by FourthWorld
bogs wrote: Mon Jul 13, 2020 7:38 pm
bogs wrote: Mon Jul 13, 2020 7:03 pm
and I don't think iOS or Android?
I probably didn't say this part clear enough, I
should have said "I know absolutely nothing about mobile, but I don't
think it is pre-installed on either of those systems?
Maybe someone that actually knows something about mobile would chime in on that side of things haha.
Seems a safe bet. Python is most usable in contexts where it's called from other apps. Indeed, that's the only reason to have it pre-installed, as opposed to an embedded version. Mobile OS vendors work very hard to minimize the ways different processes interact, so I would expect a general-purpose scripting engine like Python would not fit into such priorities.
Re: Replace LiveCode Script with JavaScript, forever
Posted: Tue Jul 14, 2020 7:10 am
by richmond62
Python is most usable in contexts where it's called from other apps.
So, WTFF (Why The Flying Fantoushies) is is being adopted faster than you can say 'LiveCode' in
educational establishments everywhere while LiveCode is NOT?