<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to SysProcess.SysProcessExecuteCommand2 and execute python script</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/029b8d48fe/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/029b8d48fe/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/029b8d48fe/</id><updated>2020-12-13T10:02:06.570000Z</updated><subtitle>Recent posts to SysProcess.SysProcessExecuteCommand2 and execute python script</subtitle><entry><title>SysProcess.SysProcessExecuteCommand2 and execute python script</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/029b8d48fe/?limit=25#e1cf" rel="alternate"/><published>2020-12-13T10:02:06.570000Z</published><updated>2020-12-13T10:02:06.570000Z</updated><author><name>dumpfbacke</name><uri>https://forge.codesys.com/u/dumpfbacke/</uri></author><id>https://forge.codesys.com009f0d713d5c2c31d5ed6bc6b56aaf3228130f41</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;hi, &lt;br/&gt;
i have tested SysProcess.SysProcessExecuteCommand2 with argument "vcgencmd measure_clock arm" to give back cpu clock. its working fine. now my question, is it basecly possible to call a phyton script  SysProcess.SysProcessExecuteCommand2?&lt;br/&gt;
i have simple pythonscript reading processortemperatur. if i run it in shell it gives me back the temperature in the shell. so now when i call thist script with SysProcess.SysProcessExecuteCommand2 by "command1:= 'sudo python mytest.py'"  it schould give me back in "pszStdOut" the temperature? am i right or basecly not possible?&lt;br/&gt;
in each case it does not work if i try this.&lt;br/&gt;
this is my code:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nv"&gt;cocommand1&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;sudo python mytest.py&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;bDummyBool&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
    &lt;span class="nv"&gt;SysProcess&lt;/span&gt;.&lt;span class="nv"&gt;SysProcessExecuteCommand2&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;pszCommand&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;command1&lt;/span&gt;, &lt;span class="nv"&gt;pszStdOut&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;stdout1&lt;/span&gt;, &lt;span class="nv"&gt;udiStdOutLen&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;SIZEOF&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;stdout1&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;,&lt;span class="nv"&gt;pResult&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;ADR&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="ss"&gt;))&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;bDummyBool&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;FALSE&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;END_IF&lt;/span&gt;&lt;span class="c1"&gt;;de&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;please answer me.&lt;br/&gt;
thanks dumpfbacke&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>