I know this may seem a common question, yes, there are many questions similar to mine and yes, apparently there are solutions but the problem is that I tried them but they do not work. This is my code:
def testOne():
output = subprocess.run(["htpasswd.exe", "-nb", "spock", "volerevolare"], capture_output=True)
print( output )
print("out: <{o}>".format(o=output.stdout.decode()))
print( "return code: dec {d:d} hex {h:X}".format(d=output.returncode, h=output.returncode) )
#---------------------------------------------------------------------------
and this is its output:
CompletedProcess(args=['htpasswd.exe', '-nb', 'spock', 'volerevolare'], returncode=3221225781, stdout=b'', stderr=b'')
out: <>
return code: dec 3221225781 hex C0000135
so in my opinion after looking at the error code I think that my little applications does not work and htpasswd.exe is not executed. O.S. is Win 7, normal user (not admin user). What I missed? Thanks, Massimo