I have a Python script that will do
p = subprocess.Popen(["powershell.exe", "DirectoryOfA.batFile], stdin = PIPE, stdout = PIPE)
I also have
while True:
now = time.localtime()
if now[4] == 0:
p.communicate(input = b'something')[0]
output = str(p.stdout.readline())
print(output)
so I can see the outputs that come out of it. inside the while loop I have an if
statement that if it's true, I want it to send an input to the powershell but it doesn't actually send the input until another output is sent and I'm not sure why.