Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Subprocess command prompt (Windows)
Post: RE: Subprocess command prompt (Windows)

I'm still looking to make this work. If anybody has a suggestion or can help me it would be very appreciated. Thanks in advance - Arnau
arnaur General Coding Help 6 10,352 Sep-06-2018, 07:22 AM
    Thread: Subprocess command prompt (Windows)
Post: RE: Subprocess command prompt (Windows)

I changed it a bit adding flush() but I still can't figure it to work. This is the code: from subprocess import * p = Popen(['cmd', '/k', 'Command that does something and asks for a password'], stdi...
arnaur General Coding Help 6 10,352 Sep-04-2018, 10:34 AM
    Thread: Subprocess command prompt (Windows)
Post: RE: Subprocess command prompt (Windows)

I tried: from subprocess import * p = Popen('Command that does something and asks for a password', stdin=PIPE, stdout=PIPE, shell=True) p.stdin.write(b"secret password\r\n" * 2)Output:C:\>python s...
arnaur General Coding Help 6 10,352 Sep-03-2018, 10:58 AM
    Thread: Subprocess command prompt (Windows)
Post: RE: Subprocess command prompt (Windows)

That doesn't seem to work neither. from subprocess import * p = Popen("Command that does something and asks for a password",stdin=PIPE, stdout=PIPE, shell=True) p.communicate(b"secret password\r\n"...
arnaur General Coding Help 6 10,352 Sep-03-2018, 09:43 AM
    Thread: Subprocess command prompt (Windows)
Post: Subprocess command prompt (Windows)

Hello, I'm making a little program that runs a cmd command on Windows. That command needs a password and a verification of the password from the user to be typed it in the terminal. What I want to do ...
arnaur General Coding Help 6 10,352 Sep-03-2018, 08:51 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020