
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I would like to be able to spawn a python script from lisp and suspend lisp until the python script completes.
A good candidate seemed to be acet-sys-spawn,
but the following attempts did nothing and returned an exit code of -1.
(acet-sys-spawn 1 "c:\\tom\\tmp\\tmp5\\primitivelinesAndIndices.py")
(acet-sys-spawn 1 "C:\\Python27\\python.exe c:\\tom\\tmp\\tmp5\\primitivelinesAndIndices.py")
The invocation (acet-sys-spawn 1 "C:\\Program Files\\windows nt\\accessories\\wordpad.exe")
did start wordpad, waited until it was closed, then returned an error code of 0 as expected.
Also,
(command "shell" "C:\\Python27\\ArcGIS10.5\\python.exe c:\\tom\\tmp\\tmp5\\primitivelinesAndIndices.py")
will run the python script, but execution doesn't suspend, so lisp would have to poll for a state change somehow before retrieving the python scripts output, and that is a lot clunkier than what I want.
Any ideas or suggestions?
Solved! Go to Solution.