Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Tkinter Prompt

Tags:

python

tkinter

I am trying to prompt the user to enter a string of text. Is there available with python tkinter a Javascript like prompt?

like image 800
MitMaro Avatar asked Nov 06 '09 02:11

MitMaro


People also ask

How do I run a Tkinter in CMD?

Tkinter can be installed using pip. The following command is run in the command prompt to install Tkinter. This command will start downloading and installing packages related to the Tkinter library. Once done, the message of successful installation will be displayed.

How do I create a popup window in Tkinter?

Popup window in Tkinter can be created by defining the Toplevel(win) window. A Toplevel window manages to create a child window along with the parent window. It always opens above all the other windows defined in any application.

How do I display the prompt box in Python?

The tkMessageBox module is used to display message boxes in your applications. This module provides a number of functions that you can use to display an appropriate message. Some of these functions are showinfo, showwarning, showerror, askquestion, askokcancel, askyesno, and askretryignore.

How do I enable Tkinter in Python?

Python Distributions with Tkinter The simplest method to install Tkinter in a Windows environment is to download and install ActivePython 3.8 from here. Alternatively, you can create and activate a Conda environment with Python 3.7 or greater that is integrated with the latest version of Tkinter.


1 Answers

Yes, use tkSimpleDialog.askstring. Unfortunately this isn't in the main Python docs, so it's a bit hard to find.

like image 163
Nicholas Riley Avatar answered Sep 20 '22 18:09

Nicholas Riley