Question: I am trying to make a graphical interface (with tkinter) on an existing python project which work well in command line.
The command line used the function `Input()` to get parameter from the keybord, but now I want to interface this things with my graphical interface. Then, when I push the button (on my interface), I want to input the selected value from the interface to the `Input()` method, but I don't know how to do that, and even if it's possible. I tried with `sys.stdin` but it's not working.
If someone have any idea, let me know,
thank you :)

Answer: 
uhm, i think it's not gonna work for what I wanted to do 

This is an example of my idea, let me explain again :
I have an `Input()` function in my game thread, and I want to fill it by 2 differents ways :

-directly with the terminal

-with my interface by using the submit button : this button call a function where I want to fill the `Input()` by the selected value on the GUI

there is an exemple of my code :

```
import tkinter as tk
from tkinter import ttk

def submitEvent():
    print('Submit is pushed')
    # --> fill the Input() with the value of the combobox ( listeCombo.get() )

def gameThread():
    input("give a number between 1 and 4")

root = tk.Tk()
root.geometry('200x100')
x = threading.Thread(target=gameThread)
x.start()
list=['1', '2', '3', '4']
combolist = ttk.Combobox(root, values=list)
submitButton = tk.Button(root, text='Submit', command=submitEvent)
combolist.grid(column=1, row=1)
submitButton.grid(column=1, row=2)
root.mainloop()```

```
Try:

```py
global somevariable
somevariable = input('prompt: ')

```

And then to call it later:

```py
thingneededforgui = somevariable

```

That should work. I use such things when designing pgzero games.