<div dir="ltr"><div>import subprocess</div><div><br></div><div>output = subprocess.Popen('"c:\Windows\system32\dnscmd.exe" ns-01 /enumzones', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)</div>
<div>out, err = output.communicate()</div><div><br></div><div>print(err)</div><div>b'""c:\\Windows\\system32\\dnscmd.exe"" non \x8a riconosciuto come comando interno o esterno,\r\n un programma eseguibile o un file batch.\r\n'<br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">Il giorno 21 ottobre 2013 12:59, Marco De Paoli <span dir="ltr"><<a href="mailto:depaolim@gmail.com" target="_blank">depaolim@gmail.com</a>></span> ha scritto:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">Il giorno 21 ottobre 2013 12:45, Marco Passanisi <span dir="ltr"><<a href="mailto:mpxnet@gmail.com" target="_blank">mpxnet@gmail.com</a>></span> ha scritto:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">ma senza risultato.</div></blockquote><div><br></div><div>ossia? ti da errore? e se sė, quale? oppure si blocca? <br>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span>out</span><span>,</span> <span>err</span> <span style="font-weight:bold">=</span> <span>output</span><span style="font-weight:bold">.</span><span>communicate</span><span>()</span><div>
<pre style="margin-top:0px;margin-bottom:0px"><div style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;padding-left:10px"><span><font color="#333333">print</font></span><span style="color:rgb(51,51,51)">(err</span><span style="color:rgb(51,51,51)">)</span></div>
</pre></div></div></blockquote><div><br></div><div>print(out)<br></div><div>print(output.returncode)<br><br></div><div>cosa dicono?<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>
Marco<br></div></font></span></div><br></div></div>
<br>_______________________________________________<br>
Python mailing list<br>
<a href="mailto:Python@lists.python.it">Python@lists.python.it</a><br>
<a href="http://lists.python.it/mailman/listinfo/python" target="_blank">http://lists.python.it/mailman/listinfo/python</a><br>
<br></blockquote></div><br></div>