Running Command Prompt In Python

Am Ra <[email protected]> Thu, 29 Feb 2024 05:26:01 -0600
Newsgroups gmane.comp.python.tutor
Message-ID <CAM=eHO+fL+QFtu6NiK6L3JpiWM5JK7vnA9NcWhghqQxbJimuBA@mail.gmail.com>
Hi,
I am trying to activate and run command prompt in python but I am stuck in
one section of the code. Below I will explain what I have done so far and
what issue I am dealing with.

Importing os, and using os.system to connect to Command Prompt.
[image: image.png]

Then, dmel922.exe will be activated to generate an empty csv file from a
raw dataset.
[image: image.png]

Up to here it is working as it is supposed to. However, it goes on a pause
and not adding any data to the empty csv file because it is waiting on the
user input which is “Enter y to Continue”.  As we see in the picture below,
the Command Prompt is asking the user to press y to continue. As soon as, I
press y in the Command Prompt it will continue and finish the task.
[image: image.png]

I just cannot figure out how to write a code in python to answer that
“Enter y to Continue” prompt or bypass that so that the system continues
and finishes its task.

Please advise. Thank you very much.



Sincerely,

Mike
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor