I want to execute a python file from within Moho, as a tool.
I don't have much experience with lua, but I found the os.execute() command.
I don't seem to get it working from within Anime Studio Pro, but if I run the python file from the terminal, it works just fine.
Are there any steps I need to take account when I want to execute an python script from within Anime?
OS Execute from within tool
Moderators: Víctor Paredes, Belgarath, slowtiger
- synthsin75
- Posts: 10270
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: OS Execute from within tool
See this script for an example: http://lostmarble.com/forum/viewtopic.php?t=12483
If the python file is not an executable, I think you'll need to pass that file as an argument to the executable to handle it.
If the python file is not an executable, I think you'll need to pass that file as an argument to the executable to handle it.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: OS Execute from within tool
Again, thanks for the reply.
Eventually it had nothing to do with the os.execute command.
I used debug.getinfo(1).short_src to get the path of the folder in which te lua script is located.
But because the path was longer than 60 characters, the path was abbreviated.
Now I use debug.getinfo(1).source and the problem has been solved,....for now
Eventually it had nothing to do with the os.execute command.
I used debug.getinfo(1).short_src to get the path of the folder in which te lua script is located.
But because the path was longer than 60 characters, the path was abbreviated.
Now I use debug.getinfo(1).source and the problem has been solved,....for now