How to handle a prompt from a command line tool?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By plucafs

Hi. I’m trying to create a GUI for rclone, a command-line program to sync files and directories to and from different cloud storage providers.
The problem I’m facing is: when I try to setup a new configuration for a drive, I use the execute() method and I pass the rclone.exe with the necessary arguments. Being an interactive configuration, rclone.exe asks me to input a certain value to continue with the setup. How can I intercept this behavior (the series of prompts to complete the configuration) and interact with rclone.exe within the GUI?
Inside the output argument in execute() I receive only the strings of the text displayed in the terminal.
Thanks in advance (from the category dropdown I can set only “Engine”. It doesn’t fits but I can’t submit the question otherwise).

You need a way to send standard input to the external program. It’s possible that this isn’t supported by gdscript, but hopefully that term helps your searching.

idbrii | 2022-12-21 21:36

These answers might help (no guarantee though):

SteveSmith | 2022-12-22 07:29

Thanks for your answers. The far I can get is this module for Godot. I’m not an advanced user so I don’t know how to continue from there, but I’m happy to know there are possibilities!

plucafs | 2022-12-22 09:09