| Server IP : 3.111.61.48 / Your IP : 216.73.216.67 Web Server : Apache System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.2.31 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.10/idlelib/__pycache__/ |
Upload File : |
o
�9j�: � @ s6 d Z ddlZddlZddlZddlZddlmZmZ ddl m
Z
mZmZm
Z
mZmZ ddlmZmZmZmZmZ ddl mZ ddlmZ ddlmZ G d d
� d
e
�ZG dd� de�ZG d
d� de�ZG dd� de�ZG dd� de�ZG dd� de�Z e!dkr�ddl"m#Z# e#dddd� ddl$m%Z% e%eee � dS dS )a|
Dialogs that query users and verify the answer before accepting.
Query is the generic base class for a popup dialog.
The user must either enter a valid answer or close the dialog.
Entries are validated when <Return> is entered or [Ok] is clicked.
Entries are ignored when [Cancel] or [X] are clicked.
The 'return value' is .result set to either a valid answer or None.
Subclass SectionName gets a name for a new config file section.
Configdialog uses it for new highlight theme and keybinding set names.
Subclass ModuleName gets a name for File => Open Module.
Subclass HelpSource gets menu item and path for additions to Help menu.
� N)�
executable�platform)�Toplevel� StringVar�
BooleanVar�W�E�S)�Frame�Button�Entry�Label�Checkbutton)�
filedialog)�Font)�
_setup_dialogc sl e Zd ZdZdi ddd�dd�Zddd �Zd
d� Zdd
d�Zdd� Zddd�Z ddd�Z
� fdd�Z� ZS )�QueryzoBase class for getting verified answer from a user.
For this base class, accept any non-blank string.
� F��text0�
used_names�_htest�_utestc C s: || _ || _|| _|| _t�| |� | �� | �|� | �|� |s&| � � t
| � | jdkr6| �d| j
� | �d| j
� | �d| j
� | �d| j� | �d| j� | �� | �� | �d|�� |�� d | �� d |�� |s}|�� d | �� d nd f � | jd
d
d� |s�| �� | j�� | �� dS dS )
a� Create modal popup, return when destroyed.
Additional subclass init must be done before this unless
_utest=True is passed to suppress wait_window().
title - string, title of popup dialog
message - string, informational message to display
text0 - initial value for entry
used_names - names already in use
_htest - bool, change box location when running htest
_utest - bool, leave window hidden and not modal
�aquaz<Command-.>z<Key-Escape>�WM_DELETE_WINDOWz<Key-Return>z
<KP_Enter>z+%d+%d� � F)�height�widthN)�parent�messager r r �__init__�withdraw�title� transient�grab_setr �_windowingsystem�bind�cancel�protocol�ok�create_widgets�update_idletasks�geometry�winfo_rootx�winfo_width�winfo_reqwidth�winfo_rooty�winfo_height�winfo_reqheight� resizable� deiconify�entry� focus_set�wait_window)�selfr r# r r r r r � r: �$/usr/lib/python3.10/idlelib/query.pyr! &