<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: spawn a python executable and suspend until complete in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spawn-a-python-executable-and-suspend-until-complete/m-p/8898519#M86671</link>
    <description>&lt;P&gt;@Anonymous&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;put it in batch and call the batch from shell&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope it work&lt;/P&gt;&lt;P&gt;moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jul 2019 14:14:35 GMT</pubDate>
    <dc:creator>Moshe-A</dc:creator>
    <dc:date>2019-07-09T14:14:35Z</dc:date>
    <item>
      <title>spawn a python executable and suspend until complete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spawn-a-python-executable-and-suspend-until-complete/m-p/8898475#M86669</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I would like to be able to spawn a python script from lisp and suspend lisp until the python script completes.&lt;/P&gt;&lt;P&gt;A good candidate seemed to be&amp;nbsp;acet-sys-spawn,&lt;/P&gt;&lt;P&gt;but the following attempts did nothing and returned an exit code of -1.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(acet-sys-spawn 1 "c:\\tom\\tmp\\tmp5\\primitivelinesAndIndices.py")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(acet-sys-spawn 1 "C:\\Python27\\python.exe c:\\tom\\tmp\\tmp5\\primitivelinesAndIndices.py")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The invocation &lt;STRONG&gt;(acet-sys-spawn 1 "C:\\Program Files\\windows nt\\accessories\\wordpad.exe")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;did start wordpad, waited until it was closed, then returned an error code of 0 as expected.&lt;/P&gt;&lt;P&gt;Also,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(command "shell" "C:\\Python27\\ArcGIS10.5\\python.exe c:\\tom\\tmp\\tmp5\\primitivelinesAndIndices.py")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Any ideas or suggestions?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 13:54:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spawn-a-python-executable-and-suspend-until-complete/m-p/8898475#M86669</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-09T13:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: spawn a python executable and suspend until complete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spawn-a-python-executable-and-suspend-until-complete/m-p/8898515#M86670</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you tried..?&lt;/P&gt;&lt;PRE&gt;(acet-sys-spawn 1 "C:\\Python27\\python.exe&lt;FONT color="#FF0000"&gt;" "&lt;/FONT&gt;c:\\tom\\tmp\\tmp5\\primitivelinesAndIndices.py")&lt;/PRE&gt;&lt;P&gt;notice &lt;FONT color="#FF0000"&gt;my 2 parentheses&lt;/FONT&gt;, this ensures that the .exe is the &lt;EM&gt;command&lt;/EM&gt; and the .py is the &lt;EM&gt;argument&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;~DD&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 14:12:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spawn-a-python-executable-and-suspend-until-complete/m-p/8898515#M86670</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2019-07-09T14:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: spawn a python executable and suspend until complete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spawn-a-python-executable-and-suspend-until-complete/m-p/8898519#M86671</link>
      <description>&lt;P&gt;@Anonymous&amp;nbsp; hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;put it in batch and call the batch from shell&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope it work&lt;/P&gt;&lt;P&gt;moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 14:14:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spawn-a-python-executable-and-suspend-until-complete/m-p/8898519#M86671</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2019-07-09T14:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: spawn a python executable and suspend until complete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spawn-a-python-executable-and-suspend-until-complete/m-p/8898597#M86672</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;That for suggesting setting both the executable and its file argument in their own sets of quotation marks. works exactly as I hoped.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 14:32:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spawn-a-python-executable-and-suspend-until-complete/m-p/8898597#M86672</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-09T14:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: spawn a python executable and suspend until complete</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spawn-a-python-executable-and-suspend-until-complete/m-p/8898620#M86673</link>
      <description>&lt;P&gt;That does function, but, while the console suspends, autocad keeps running. I will certainly keep this in mind when that behavior is wanted, which is equally likely. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 14:38:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/spawn-a-python-executable-and-suspend-until-complete/m-p/8898620#M86673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-09T14:38:52Z</dc:date>
    </item>
  </channel>
</rss>

