Closed WarpWing closed 3 years ago
How did you resolve this? @WarpWing I have the same question, I need to get value from an user input...
How did you resolve this? @WarpWing I have the same question, I need to get value from an user input...
I didn't. I just called a function from the menu and had that function handle user input like so. Yeah the library can be a bit confusing so for my use case I just adapted it to work with functions
launchMP = FunctionItem("Create New MP Instance", launchMPI)
def launchMPI():
print("What would like to name this MP Instance?")
mpname = input("Name: ")
Thanks for your help. I used a similar approach:
# Dict with variables, default values are empty
variables = {'account': '', 'folder': '', 'number_files': 0}
# Set account
account_set = FunctionItem("Cuenta de donde quieres realizar la descarga de contenido", input_user,
['account', "Nombre de la cuenta: "])
def input_user(var, text):
s = input(text)
variables[var] = s
In variables dict I stored a few inputs from user, so I have others variables FunctionItem that called the same function _inputuser(var, text) in order to store the inputs.
I agree with you, it's a bit confusing, but it's a good library anyway.
Is it possible I could get a variable from
so that I can use it as input in my functions?