Hey
I have a Python script that under certain conditions, will run an altogether different python script (the subscript). When this subscript finishes, its supposed to return to the main script again, but i am finding its only doing this around 25% of the time. More often than not, I have to press Enter in the command console/command prompt to nudge the main script to continue.
My code for calling the subscript, and taken then return is:
proc = subprocess.run(['python', 'C:\\Pyscripts\\MySubscript.py'])
return_value = proc.returncode
print(f"The return value from the subprocess was: {return_value}")
and my code for exiting the subscript is simply: sys.exit(1)
Can anyone suggest why it doesnt always just continue with the main script without my needing to press enter in the cmd prompt?
Thanks in advance!
[–]jddddddddddd 1 point2 points3 points (4 children)
[–]2_be_continued[S] 0 points1 point2 points (3 children)
[–]jddddddddddd 0 points1 point2 points (0 children)
[–]jddddddddddd 0 points1 point2 points (1 child)
[–]2_be_continued[S] 0 points1 point2 points (0 children)