On 2013-10-21 11:45, Marco Passanisi wrote:
Salve a tutti,
ho la necessita di eseguire un comando dnscmd da python, sto provando
con subprocess ma senza risultato. Vi posto lo script di partenza:

import subprocess

output = subprocess.Popen("C:Windows\System32\dnscmd.exe" /EnumZones,
shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

A prima botta, se hai dei backslash nella stringa, o li raddoppi ("C:\\Windows\\System32\\...") o usi una raw string (r"C:\Windows\System32\...").

Poi, quando chiedi aiuto perchè hai un errore, di solito fa comodo sapere che errore sia.


-- Daniele

_______________________________________________
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python

Rispondere a