Re: Python to LiveCode
On 9/28/19 8:08 PM, kee nethery via use-livecode wrote: Once the code is functional, I refactored it to make it more in line with the way the destination code is typically structured. That’s what I did. Tedious but straightforward and successful. LOL. "And there we go, we've created Minecraft." https://boingboing.net/2019/10/03/every-programming-video-tutori.html -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Python to LiveCode
I have converted from language to language and what I did initially was to comment what every section of code did and how it did it (algorithms and logic). The idea was that I should be able to delete the initial code and reproduce it using the comments. Then take the comments and write the code in the destination language. Yes you might organize it differently but my goal was to get it completely functional so that it could pass the existing unit tests on the original source. Once the code is functional, I refactored it to make it more in line with the way the destination code is typically structured. That’s what I did. Tedious but straightforward and successful. Kee Nethery > On Sep 28, 2019, at 11:35 AM, Patrick Roza via use-livecode > wrote: > > I would like to take the python code and convert it to LiveCode. I know > there is a cheat sheet but it is limited. > > 1. Has anybody attempted this and what worked and didn't work? > > 2. Can someone point out the problems moving from one programming language > to LiveCode? > > Everyone on the list has been great and thank all of you. > > Patrick, > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Python to LiveCode
I would like to take the python code and convert it to LiveCode. I know there is a cheat sheet but it is limited. 1. Has anybody attempted this and what worked and didn't work? 2. Can someone point out the problems moving from one programming language to LiveCode? Everyone on the list has been great and thank all of you. Patrick, ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Sending Terminal Command (Python) Using LiveCode?
Hello John Yes this is possible, I do this all the time ! 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 ! This works very well, if you need more info, contact me off list. Cheers Rolf Am 27.08.2014 um 01:48 schrieb use-livecode-requ...@lists.runrev.com: Hi All, I manage a lot of accounts in our Google Apps for Education deployment. I have used LiveCode to automate a lot of the csv creation for this process. I use a Terminal application (GAM) created in Python to do some of this too. 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 j...@student.email.k12.ca.us firstname John lastname Doe password 11 change password off Could I call this Python script directly from LiveCode? Something like: on mouseUp shell(python gam.py create user j...@student.sylvan.k12.ca.us firstname John lastname Doe password 11 change password off end mouseUp This seems too easy. I?m guessing I would have to point Livecode to the proper directory (path) to the Python app. etc. Is calling python scripts possible through LiveCode? ?in need of an example :) Thank you! John Patten SUSD ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Sending Terminal Command (Python) Using LiveCode?
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 j...@student.email.k12.ca.us firstname John lastname Doe password 11 change password off Could I call this Python script directly from LiveCode? Thierry Douez - http://sunny-tdz.com Maker of sunnYperl - sunnYmidi - sunnYmage ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Sending Terminal Command (Python) Using LiveCode?
Awesome! I’m trying to get this working but I think I’m having a problem with providing the path to the Python App. I keep getting the error: python: can’t open file ‘Macintosh HD/Users/jpatten/gam’:[Errno 2] No Such file or directory. Here’s what I have in my button script: on mouseUp put cd fld 1 into tScript put shell(tScript) into tPython answer tPython end mouseUp and in my field I have the following: python “Macintosh HD”/Users/jpatten/gam gam.py info domain This python command just returns info about the Google Apps domain…. What am I missing? Thank you! On Aug 27, 2014, at 2:18 AM, Thierry Douez th.do...@gmail.com wrote: 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 j...@student.email.k12.ca.us firstname John lastname Doe password 11 change password off Could I call this Python script directly from LiveCode? Thierry Douez - http://sunny-tdz.com Maker of sunnYperl - sunnYmidi - sunnYmage ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Sending Terminal Command (Python) Using LiveCode?
Hi All, I manage a lot of accounts in our Google Apps for Education deployment. I have used LiveCode to automate a lot of the csv creation for this process. I use a Terminal application (GAM) created in Python to do some of this too. 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 j...@student.email.k12.ca.us firstname John lastname Doe password 11 change password off Could I call this Python script directly from LiveCode? Something like: on mouseUp shell(python gam.py create user j...@student.sylvan.k12.ca.us firstname John lastname Doe password 11 change password off end mouseUp This seems too easy. I’m guessing I would have to point Livecode to the proper directory (path) to the Python app. etc. Is calling python scripts possible through LiveCode? …in need of an example :) Thank you! John Patten SUSD ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Sending Terminal Command (Python) Using LiveCode?
John- Tuesday, August 26, 2014, 9:43:13 AM, you wrote: Is calling python scripts possible through LiveCode? in need of an example :) answer folder find the right folder set the defaulfolder to it put shell(python test.py someargument) works for me. -- -Mark Wieder ahsoftw...@gmail.com This communication may be unlawfully collected and stored by the National Security Agency (NSA) in secret. The parties to this email do not consent to the retrieving or storing of this communication and any related metadata, as well as printing, copying, re-transmitting, disseminating, or otherwise using it. If you believe you have received this communication in error, please delete it immediately. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode