0

I am writing a program using matplotlib and would like to have the option for the user to input text or numbers. There currently is not a text-entry widget in matplotlib however (to my knowledge).

Is there an easy way to get user text without either a) making them enter it through the terminal or b) writing a GUI/using a GUI package such as tkinter or pygtk?

For example, a simple library that would allow me to create a text-entry window.

Thanks.

Frick Steves
  • 365
  • 4
  • 11
  • If you exclude the two obvious solutions to the problem, what are you expecting as an answer? A text input by definition is a GUI element. If you exclude the use of a GUI element as a solution which requires a GUI element, you are contradicting yourself. Why not directly ask for a car without wheels? – ImportanceOfBeingErnest Jun 13 '17 at 22:58
  • I'm voting to close this question as off-topic because it contradicts itself. – ImportanceOfBeingErnest Jun 13 '17 at 22:59

1 Answers1

0

Just in case you loosen the restriction of not using tkinter, a simple dialog is done with

root = Tkinter.Tk()
root.withdraw()
w = tkSimpleDialog.askstring("Title", "Please type comment")

A possible usage case can be found in this question: How do I make matplotlib open a box for user comments?

ImportanceOfBeingErnest
  • 321,279
  • 53
  • 665
  • 712