I'm trying to get user input as function call in a small python program but, when i'm using the input() method, python shell does not let me input anything and quit by itself.
from fileinput import input
def funcinput():
comm = input("-->")
print('your input is %s' %comm)
if __name__ == "__main__":
print("try to get input")
funcinput()
Code looks like this and every time I run it, python launcher just give me:
try to get input
your input is <fileinput.FileInput object at 0x10464c208>
>>>
without let me input anything
What should I do to make it work?
commbecomes aFileInputobject.