Topic was automatically imported from the old Question2Answer platform.
Asked By
Animesh
Hello I am an intermediate godot user, I want to make a button to run a python script in the command prompt when it is pressed. I used OS.create_process and OS.execute but with no success. Any help will be greatly appreciated.
The python script also contains input functions so I will also need to use the terminal for inputs
I did exactly the same thing on this project. It’s Godot 3.5, but I’m pretty sure it doesn’t change much. Arguments are passed to OS.execute and received on Python’s os.argv.
I did exactly the same thing on this project. It’s Godot 3.5, but I’m pretty sure it doesn’t change much. Arguments are passed to OS.execute and received on Python’s os.argv.
Yeah I tried it but I can’t figure it out, it simply doesn’t work.
I have a python file with the code:
a = int(input("Enter the length of password"))
...
print(password)
I just want godot to run the python file in command prompt. What arguments in the OS.execute() function should I give?