import subprocess as SP
res = SP.Popen(['zenity', '--entry', '--text', 'please write some text'],
    stdout=SP.PIPE)
usertext = str(res.communicate()[0][:-1])
text = usertext[2:-1]
print('I got this text from the user: %s' % text)
Python Message Box Without huge library dependancy