Как установить easygui для python 3 на windows

EasyGUI is a module for very simple, very easy GUI programming in Python. EasyGUI is different from other GUI generators in that EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by simple function calls.

Project in Maintainance

Hi everyone. There hasn’t been much activity but thankfully we have a new revision. Thank you contributors and thank you Stephen Ferg for creating EasyGui.

You might also consider the following alternatives:

  • https://github.com/aroberge/easygui_qt
  • https://github.com/ponty/psidialogs

For those who wish to contribute you are welcome to fork this respository. Or, take a look at the alternatives and contribute there.

Kind Regards, Robert

EasyGUI is a module for very simple, very easy GUI programming in Python. EasyGUI is different from other GUI
libraries in that EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by simple function calls.

EasyGUI runs on Python 2 and 3, and does not have any dependencies beyond python and Tk. Linux Python 2 users will have to run sudo apt-get install python-tk and Linux Python 3 users will have to run sudo apt-get install python3-tk to install Tkinter.

Example Usage

>>> import easygui
>>> easygui.ynbox('Shall I continue?', 'Title', ('Yes', 'No'))
1
>>> easygui.msgbox('This is a basic message box.', 'Title Goes Here')
'OK'
>>> easygui.buttonbox('Click on your favorite flavor.', 'Favorite Flavor', ('Chocolate', 'Vanilla', 'Strawberry'))
'Chocolate'

To see demo programs using EasyGUI, call the easygui.egdemo() function.

Full documentation is always available.

For the most-recent production version:
http://easygui.readthedocs.org/en/master/.

For our develop version which will be released next:
http://easygui.readthedocs.org/en/develop.

0.98.3

Update collections.abc import location (old location was deprecated since version 3.3, removed in version 3.10)
See: https://docs.python.org/3.9/library/collections.html#module-collections for details
Add some unit test coverage and test automation for TravisCI.

0.98.2

Several updates and fixes thanks to Al and others.

0.98.0

This is an exciting time for easygui. We continue to make good progress with refactoring as
well as some enhancements and bug fixes here and there.

We would like to welcome Juanjo Denis-Corrales to the team. He is responsible for lots of good new work
this release. Of course we appreciate the work of everyone who contributed.

NOTE: I decided in this release to change the API a bit. Please consult the function documentation for details.

BUG FIXES

  • Made changes guessing at fixes to any IDLE problems. Please report any problems found.

ENHANCEMENTS

  • Refactored the easygui.py file into several smaller files to improve our ability to manage the code
  • Added callbacks to allow for more dynamic dialogs. See the docs for usage.
  • Added class access to dialogs so properties may be changed.

KNOWN ISSUES

  • There were previous issues when using easygui with the IDLE IDE. I hope I resolved these problems, however,
    I’ve never actually been able to repeat them. Please report any problems found in github.

OTHER CHANGES

  • Centralized the Python 2 versus Python 3 «compatibility layer» into boxes/utils.py

0.97.4

This is a minor bug-fix release to address python 3 import errors.

0.97.3

We are happy to release version 0.97.3 of easygui. The intent of this release is to address some basic
functionality issues as well as improve easygui in the ways people have asked.

Robert Lugg (me) was searching for a GUI library for my python work. I saw easygui and liked very much its
paradigm. Stephen Ferg, the creator and developer of easygui, graciously allowed me to start development
back up. With the help of Alexander Zawadzki, Horst Jens, and others I set a goal to release before the
end of 2014.

We rely on user feedback so please bring up problems, ideas, or just say how you are using easygui.

BUG FIXES

  • sourceforge #4: easygui docs contain bad references to easygui_pydoc.html
  • sourceforge #6: no index.html in docs download file. Updated to sphinx which as autolinking.
  • sourceforge #8: unicode issues with file*box. Fixed all that I knew how.
  • sourceforge #12: Cannot Exit with ‘X’. Now X and escape either return «cancel_button», if set, or None

ENHANCEMENTS

  • Added ability to specify default_choice and cancel_choice for button widgets (See API docs)

  • True and False are returned instead of 1 and 0 for several boxes

  • Allow user to map keyboard keys to buttons by enclosing a hotkey in square braces like: «Pick [M]e», which would assign
    keyboard key M to that button. Double braces hide that character, and keysyms are allowed:

    [[q]]Exit Would show Exit on the button, and the button would be controlled by the q key

    [<F1>]Help Would show Help on the button, and the button would be controlled by the F1 function key

    NOTE: We are still working on the exact syntax of these key mappings as Enter, space, and arrows are already being used.

  • Escape and the windows ‘X’ button always work in buttonboxes. Those return None in that case.

  • sourceforge #9: let fileopenbox open multiple files. Added optional argument ‘multiple’

  • Location of dialogs on screen is preserved. This isn’t perfect yet, but now, at least, the dialogs don’t
    always reset to their default position!

  • added some, but not all of the bugs/enhancements developed by Robbie Brook:
    http://all-you-need-is-tech.blogspot.com/2013/01/improving-easygui-for-python.html

KNOWN ISSUES

  • In the documentation, there were previous references to issues when using the IDLE IDE. I haven’t
    experienced those, but also didn’t do anything to fix them, so they may still be there. Please report
    any problems and we’ll try to address them
  • I am fairly new to contributing to open source, so I don’t understand packaging, pypi, etc. There
    are likely problems as well as better ways to do things. Again, I appreciate any help or guidance.

Other Changes (that you likely don’t care about)

  • Restructured loading of image files to try PIL first throw error if file doesn’t exist.
  • Converted docs to sphinx with just a bit of doctest. Most content was retained from the old site, so
    there might be some redundancies still. Please make any suggested improvements.
  • Set up a GitHub repository for development: https://github.com/robertlugg/easygui
  • Improved output/packaging for Debian distribution

EasyGui is licensed under what is generally known as
the «modified BSD license» (aka «revised BSD», «new BSD», «3-clause BSD»).
This license is GPL-compatible but less restrictive than GPL.

Содержание

  1. Русские Блоги
  2. Python установить easygui
  3. Интеллектуальная рекомендация
  4. Обход последовательности двоичного дерева, обход предварительного порядка (рекурсивный, нерекурсивный), обход среднего порядка (рекурсивный, нерекурсивный), последующий обход (рекурсивный, нерекурсивный)
  5. iOS- alloc init new
  6. Python без модуля по имени решение
  7. 1.5.2 Вложенность и область действия функций Python
  8. EasyGui Tutorial¶
  9. Introduction¶
  10. EasyGui’s demonstration routine¶
  11. Importing EasyGui¶
  12. Using EasyGui¶
  13. Default arguments for EasyGui functions¶
  14. Using keyword arguments when calling EasyGui functions¶
  15. Using buttonboxes¶
  16. msgbox¶
  17. ccbox¶
  18. ynbox¶
  19. buttonbox¶
  20. indexbox¶
  21. boolbox¶
  22. How to show an image in a buttonbox¶
  23. Letting the user select from a list of choices¶
  24. choicebox¶
  25. multchoicebox¶
  26. Letting the user enter information¶
  27. enterbox¶
  28. integerbox¶
  29. multenterbox¶
  30. Letting the user enter password information¶
  31. passwordbox¶
  32. multpasswordbox¶
  33. Displaying text¶
  34. textbox¶
  35. codebox¶
  36. Working with files¶
  37. diropenbox¶
  38. fileopenbox¶
  39. filesavebox¶
  40. Remembering User Settings¶
  41. EgStore¶
  42. Trapping Exceptions¶
  43. exceptionbox¶
  44. Как устанавливать пакеты в Python — с PIP и без
  45. Установка PIP для Python 3 и 2
  46. Установка пакета в pip
  47. Удаление пакета Python
  48. Как установить пакеты в Python без pip
  49. Установка PIP для Python 3 и 2
  50. Установка пакета в pip
  51. Удаление пакета Python
  52. Как установить пакеты в Python без pip
  53. Русские Блоги
  54. EasyGUI для заметок по изучению Python
  55. Демонстрация различных функций EasyGUI
  56. Импортировать EasyGUI
  57. Используйте EasyGUI
  58. Параметры по умолчанию для функций EasyGUI
  59. Используйте параметры ключевого слова для вызова функций EasyGUI
  60. Используйте компоненты кнопки
  61. msgbox()
  62. ccbox()
  63. ynbox()
  64. buttonbox()
  65. indexbox()
  66. boolbox()
  67. Как отображать картинки в кнопочном боксе
  68. Предоставьте пользователям ряд возможностей
  69. choicebox()
  70. multchoicebox()
  71. Разрешить пользователю ввести сообщение
  72. enterbox()
  73. ntegerbox()
  74. multenterbox()
  75. Разрешите пользователю ввести пароль
  76. passwordbox()
  77. multpasswordbox()
  78. Показать текст
  79. textbox()
  80. codebox()
  81. Каталоги и файлы
  82. diropenbox()
  83. fileopenbox()
  84. filesavebox()
  85. Запомните настройки пользователя
  86. EgStore
  87. Поймать исключение
  88. Интеллектуальная рекомендация
  89. Обход последовательности двоичного дерева, обход предварительного порядка (рекурсивный, нерекурсивный), обход среднего порядка (рекурсивный, нерекурсивный), последующий обход (рекурсивный, нерекурсивный)
  90. iOS- alloc init new
  91. Python без модуля по имени решение
  92. 1.5.2 Вложенность и область действия функций Python

Русские Блоги

Python установить easygui

Слова, написанные перед статьей: В процессе установки easygui, python столкнулся со многими проблемами, такими как модуль easygui не был найден, не найден путь компиляции python для pycharm, и он оказался неудачным. Позже я снова загрузил 0,96, чтобы добиться успеха. Вот шаги:

2. После распаковки двумя файлами являются setup.py и easygui.py.

4. Создайте новую папку easygui в папке python / Lib / site-packages.

3. Поместите файл easygui.py в папку easygui.

4. Настройте переменные среды.

Мой компьютер-Свойства-Дополнительные параметры системы-Дополнительные-переменные среды-Создать новую системную переменную

Имя переменной PYTHONPATH

Значение переменной: C: Python Python36-32 lib site-packages easygui (Моя переменная имеет следующее значение: путь каждого должен быть разным, в зависимости от пути установки Python.
5. Откройте IDLE и представьте easygui.

6. Напишите тестовый код.

7. Появится окно сообщения. Успех!
5dcd857b887da23d77a2d1cf39bbe5bc
Кроме того, его также можно ввести так

import easygui as g

Возникшие проблемы: 1. Перемещено положение python, его легко написать при написании пути для удобства
Поэтому при компиляции с помощью Pycharm компилятор python не может быть найден.

Решение:
File—>settings—>Project—->Project Interpreter

e60d23752996af70b3cdbe577097e7f4

Затем перезапустите Pycharm

Интеллектуальная рекомендация

Обход последовательности двоичного дерева, обход предварительного порядка (рекурсивный, нерекурсивный), обход среднего порядка (рекурсивный, нерекурсивный), последующий обход (рекурсивный, нерекурсивный)

Справочник статей Обход последовательности двоичного дерева Предзаказ обхода Рекурсивная версия Нерекурсивная версия Упорядоченный обход Рекурсивная версия Нерекурсивная версия Обход после заказа Реку.

1c1c9a435c9effaa5010371fd1fe1349

iOS- alloc init new

Вы должны создавать объекты каждый день в процессе разработки, но зачем вам нужно alloc init во время инициализации? Что сделали alloc и init? alloc: выделяет память для объекта, позволяет ему не осво.

b31949f74feb564e307f72af0edbfe1d

Python без модуля по имени решение

Иногда запуск программы Python, такие как питон bob.py, клубеньковые ошибки ИМЕНИ «×××», потому что ИМПОРТ ××× произошел. Как решить это? Два случая ана.

1.5.2 Вложенность и область действия функций Python

1. Тернарная операция Результат выполнения условия if else Результат выполнения условия Например: 2. Пространство имен ** Глобальное пространство имен: ** Пространство, созданное для хранения «в.

Источник

EasyGui Tutorial¶

Introduction¶

In easygui, all GUI interactions are invoked by simple function calls.

Here is a simple demo program using easygui.

EasyGui’s demonstration routine¶

To run EasyGui’s demonstration routine, invoke EasyGui from the command line this way:

or from an IDE (such as IDLE, PythonWin, Wing, etc.) this way:

This will allow you to try out the various EasyGui functions, and will print the results of your choices to the console.

Importing EasyGui¶

In order to use EasyGui, you must import it. The simplest import statement is:

If you use this form, then to access the EasyGui functions, you must prefix them with the name “easygui”, this way:

One alternative is to import EasyGui this way:

This makes it easier to invoke the EasyGui functions; you won’t have to prefix the function names with “easygui”. You can just code something like this:

A third alternative is to use something like the following import statement:

This allows you to keep the EasyGui namespace separate with a minimal amount of typing. You can access easgui functions like this:

This third alterative is actually the best way to do it once you get used to python and easygui.

Using EasyGui¶

Once your module has imported EasyGui, GUI operations are a simple a matter of invoking EasyGui functions with a few parameters. For example, using EasyGui, the famous “Hello, world!” program looks like this:

To see a demo of what EasyGui output looks like, invoke easyGui from the command line, this way:

To see examples of code that invokes the EasyGui functions, look at the demonstration code at the end of easygui.py.

Default arguments for EasyGui functions¶

For all of the boxes, the first two arguments are for message and title, in that order. In some cases, this might not be the most user-friendly arrangement (for example, the dialogs for getting directory and filenames ignore the message argument), but I felt that keeping this consistent across all widgets was a consideration that is more important.

Most arguments to EasyGui functions have defaults. Almost all of the boxes display a message and a title. The title defaults to the empty string, and the message usually has a simple default.

This makes it is possible to specify as few arguments as you need in order to get the result that you want. For instance, the title argument to msgbox is optional, so you can call msgbox specifying only a message, this way:

or specifying a message and a title, this way:

On the various types of buttonbox, the default message is “Shall I continue?”, so you can (if you wish) invoke them without arguments at all. Here we invoke ccbox (the close/cancel box, which returns a boolean value) without any arguments at all:

Using keyword arguments when calling EasyGui functions¶

It is possible to use keyword arguments when calling EasyGui functions.

Suppose for instance that you wanted to use a buttonbox, but (for whatever reason) did not want to specify the title (second) positional argument. You could still specify the choices argument (the third argument) using a keyword, this way:

Using buttonboxes¶

There are a number of functions built on top of buttonbox() for common needs.

msgbox¶

msgbox displays a message and offers an OK button. You can send whatever message you want, along with whatever title you want. You can even over-ride the default text of “OK” on the button if you wish. Here is the signature of the msgbox function:

The clearest way to over-ride the button text is to do it with a keyword argument, like this:

Here are a couple of examples:

ccbox¶

ccbox offers a choice of Continue and Cancel, and returns either True (for continue) or False (for cancel).

ynbox¶

ynbox offers a choice of Yes and No, and returns either True of False.

buttonbox¶

To specify your own set of buttons in a buttonbox, use the buttonbox() function.

The buttonbox can be used to display a set of buttons of your choice. When the user clicks on a button, buttonbox() returns the text of the choice. If the user cancels or closes the buttonbox, the default choice (the first choice) is returned.

buttonbox displays a message, a title, and a set of buttons. Returns the text of the button that the user selected.

indexbox¶

indexbox displays a message, a title, and a set of buttons. Returns the index of the user’s choice. For example, if you invoked index box with three choices (A, B, C), indexbox would return 0 if the user picked A, 1 if he picked B, and 2 if he picked C.

boolbox¶

boolbox (boolean box) displays a message, a title, and a set of buttons. Returns returns 1 if the first button is chosen. Otherwise returns 0.

Here is a simple example of a boolbox():

How to show an image in a buttonbox¶

The types of files supported depends on how you installed python. If other formats don’t work, you may need to install the PIL library.

If an image argument is specified, the image file will be displayed after the message.

Here is some sample code from EasyGui’s demonstration routine:

If you click on one of the buttons on the bottom, its value will be returned in ‘reply’. You may also click on the image. In that case, the image filename is returned.

Letting the user select from a list of choices¶

choicebox¶

Buttonboxes are good for offering the user a small selection of short choices. But if there are many choices, or the text of the choices is long, then a better strategy is to present them as a list.

choicebox provides a way for a user to select from a list of choices. The choices are specified in a sequence (a tuple or a list). The choices will be given a case-insensitive sort before they are presented.

The keyboard can be used to select an element of the list.

Pressing “g” on the keyboard, for example, will jump the selection to the first element beginning with “g”. Pressing “g” again, will jump the cursor to the next element beginning with “g”. At the end of the elements beginning with “g”, pressing “g” again will cause the selection to wrap around to the beginning of the list and jump to the first element beginning with “g”.

If there is no element beginning with “g”, then the last element that occurs before the position where “g” would occur is selected. If there is no element before “g”, then the first element in the list is selected:

Another example of a choicebox:

multchoicebox¶

The multchoicebox() function provides a way for a user to select from a list of choices. The interface looks just like the choicebox, but the user may select zero, one, or multiple choices.

The choices are specified in a sequence (a tuple or a list). The choices will be given a case-insensitive sort before they are presented.

Letting the user enter information¶

enterbox¶

enterbox is a simple way of getting a string from the user

integerbox¶

integerbox is a simple way of getting an integer from the user.

multenterbox¶

multenterbox is a simple way of showing multiple enterboxes on a single screen.

In the multenterbox:

Returns a list of the values of the fields, or None if the user cancels the operation.

Here is some example code, that shows how values returned from multenterbox can be checked for validity before they are accepted:

The first line ‘from __future__’ is only necessary if you are using Python 2.*, and is only needed for this demo.

Letting the user enter password information¶

passwordbox¶

A passwordbox box is like an enterbox, but used for entering passwords. The text is masked as it is typed in.

multpasswordbox¶

multpasswordbox has the same interface as multenterbox, but when it is displayed, the last of the fields is assumed to be a password, and is masked with asterisks.

Displaying text¶

EasyGui provides functions for displaying text.

textbox¶

The textbox() function displays text in a proportional font. The text will word-wrap.

codebox¶

The codebox() function displays text in a monospaced font and does not wrap.

Note that you can pass codebox() and textbox() either a string or a list of strings. A list of strings will be converted to text before being displayed. This means that you can use these functions to display the contents of a file this way:

Working with files¶

A common need is to ask the user for a filename or for a directory. EasyGui provides a few basic functions for allowing a user to navigate through the file system and choose a directory or a file. (These functions are wrappers around widgets and classes in lib-tk.)

Note that in the current version of EasyGui, the startpos argument is not supported.

diropenbox¶

diropenbox returns the name of a directory

fileopenbox¶

fileopenbox returns the name of a file

filesavebox¶

filesavebox returns the name of a file

Remembering User Settings¶

EgStore¶

A common need is to ask the user for some setting, and then to “persist it”, or store it on disk, so that the next time the user uses your application, you can remember his previous setting.

In order to make the process of storing and restoring user settings, EasyGui provides a class called EgStore. In order to remember some settings, your application must define a class (let’s call it Settings, although you can call it anything you want) that inherits from EgStore.

Your application must also create an object of that class (let’s call the object settings).

The constructor (the __init__ method) of the Settings class can initialize all of the values that you wish to remember.

Once you have done this, you can remember the settings simply by assigning values to instance variables in the settings object, and use the settings.store() method to persist the settings object to disk.

Here is an example of code using the Settings class:

Here is an example of code using a dedicated function to create the Settings class:

Trapping Exceptions¶

exceptionbox¶

Sometimes exceptions are raised… even in EasyGui applications. Depending on how you run your application, the stack trace might be thrown away, or written to stdout while your application crashes.

EasyGui provides a better way of handling exceptions via exceptionbox. Exceptionbox displays the stack trace in a codebox and may allow you to continue processing.

Exceptionbox is easy to use. Here is a code example:

Источник

Как устанавливать пакеты в Python — с PIP и без

cbc0f0509128ea8a7487ec71c1240fb531db396b

cbc0f0509128ea8a7487ec71c1240fb531db396b

content 43a3f7e73d0e4486238b71a8e7f4019e

Прежде чем что-то устанавливать, давайте разберёмся, что такое пакет, чем он отличается от модуля, и как с ним работать. У слова «пакет» применительно к Python два значения.

Установка PIP для Python 3 и 2

Если вы используете виртуальные окружения на базе venv или virtualenv, pip уже установлен. Начиная с Python 3.4 (для Python 2 — с версии 2.7.9) pip поставляется вместе с интерпретатором. Для более ранних версий устанавливать менеджер пакетов нужно вручную. Вариантов два:

C помощью скрипта get_pip.py — быстро.

Через setuptools — кроме pip сможем использовать easy_install.

Вариант 1. Скачиваем скрипт get_pip.py и запускаем в консоли. Для этого открываем терминал через Win+R>»cmd»>OK и пишем:

Полный путь полезен и в том случае, если у вас на компьютере несколько версий Python и вы ставите пакет для одной из них.

Вариант 2. Скачиваем архив с setuptools из PYPI и распаковываем в отдельный каталог. В терминале переходим в директорию setuptools c файлом setup.py и пишем:

python setup.py install

Установка пакета в pip

Пора запустить pip в Python и начать устанавливать пакеты короткой командой из консоли:

pip install имя_пакета

Обновить пакет не сложнее:

Если у вас последняя версия пакета, но вы хотите принудительно переустановить его:

Посмотреть список установленных пакетов Python можно с помощью команды:

Найти конкретный пакет по имени можно командой «pip search». О других командах можно прочесть в справке, которая выдается по команде «pip help».

Удаление пакета Python

Когда пакет больше не нужен, пишем:

pip uninstall имя_пакета

Как установить пакеты в Python без pip

он не удаляет пакеты,

он может пытаться установить недозагруженный пакет.

Если нужно скачать пакет из альтернативного источника, вы можете задать URL или локальный адрес на компьютере:

Список пакетов, установленных через easy_install, хранится в файле easy-install.pth в директории /libs/site-packages/ вашего Python.

К счастью, удалять установленные через easy_install пакеты можно с помощью pip. Если же его нет, потребуется удалить пакет вручную и стереть сведения о нем из easy-install.pth.

Теперь вы умеете ставить и удалять пакеты для вашей версии Python.

Кстати, для тех, кто изучает Python, мы подготовили список полезных и практичных советов.

content 43a3f7e73d0e4486238b71a8e7f4019e

Прежде чем что-то устанавливать, давайте разберёмся, что такое пакет, чем он отличается от модуля, и как с ним работать. У слова «пакет» применительно к Python два значения.

Установка PIP для Python 3 и 2

Если вы используете виртуальные окружения на базе venv или virtualenv, pip уже установлен. Начиная с Python 3.4 (для Python 2 — с версии 2.7.9) pip поставляется вместе с интерпретатором. Для более ранних версий устанавливать менеджер пакетов нужно вручную. Вариантов два:

C помощью скрипта get_pip.py — быстро.

Через setuptools — кроме pip сможем использовать easy_install.

Вариант 1. Скачиваем скрипт get_pip.py и запускаем в консоли. Для этого открываем терминал через Win+R>»cmd»>OK и пишем:

Полный путь полезен и в том случае, если у вас на компьютере несколько версий Python и вы ставите пакет для одной из них.

Вариант 2. Скачиваем архив с setuptools из PYPI и распаковываем в отдельный каталог. В терминале переходим в директорию setuptools c файлом setup.py и пишем:

python setup.py install

Установка пакета в pip

Пора запустить pip в Python и начать устанавливать пакеты короткой командой из консоли:

pip install имя_пакета

Обновить пакет не сложнее:

Если у вас последняя версия пакета, но вы хотите принудительно переустановить его:

Посмотреть список установленных пакетов Python можно с помощью команды:

Найти конкретный пакет по имени можно командой «pip search». О других командах можно прочесть в справке, которая выдается по команде «pip help».

Удаление пакета Python

Когда пакет больше не нужен, пишем:

pip uninstall имя_пакета

Как установить пакеты в Python без pip

он не удаляет пакеты,

он может пытаться установить недозагруженный пакет.

Если нужно скачать пакет из альтернативного источника, вы можете задать URL или локальный адрес на компьютере:

Список пакетов, установленных через easy_install, хранится в файле easy-install.pth в директории /libs/site-packages/ вашего Python.

К счастью, удалять установленные через easy_install пакеты можно с помощью pip. Если же его нет, потребуется удалить пакет вручную и стереть сведения о нем из easy-install.pth.

Теперь вы умеете ставить и удалять пакеты для вашей версии Python.

Кстати, для тех, кто изучает Python, мы подготовили список полезных и практичных советов.

Источник

Русские Блоги

EasyGUI для заметок по изучению Python

Я сам использую редактор pycharm, и следующие записи импортируются в пакет EasyGUI в pycharm

Демонстрация различных функций EasyGUI

Чтобы запустить демонстрационную программу EasyGUI, вызовите EasyGUI в командной строке следующим образом:

Или его можно вызвать из IDE (например, IDLE, PythonWin, Wing и т. Д.):

После успешного вызова вы можете попробовать различные функции EasyGUI и распечатать результат на консоли.
5bcb6a4425b4ba7f01256f7f788ffb59

Импортировать EasyGUI

Чтобы использовать этот модуль EasyGUI, вы должны сначала импортировать его.
Самый простой оператор импорта:

Если вы используете указанную выше форму для импорта, то при использовании функций EasyGUI вы должны префикс функции easygui, например:

Это упрощает нам вызов функций EasyGUI, и мы можем писать код прямо следующим образом:

Этот метод также позволяет сохранить пространство имен EasyGUI, уменьшая при этом объем ввода.
После импорта вы можете вызывать функции EasyGUI следующим образом:

Используйте EasyGUI

После того, как ваш модуль импортирован в EasyGUI, работа с графическим интерфейсом сводится к вызову нескольких параметров функции EasyGUI.
Например, используйте EasyGUI, чтобы реализовать самое известное приветствие в мире:

43fd7f9218892aabac3c14c4b4cf11b7

Параметры по умолчанию для функций EasyGUI

Для всех диалогов первыми двумя параметрами являются текст сообщения и заголовок диалога.
Согласно этому правилу при определенных обстоятельствах это может быть не идеальный дизайн макета (например, когда диалоговое окно получает имя каталога или файла, оно будет игнорировать параметр сообщения), но оставьте это Такая последовательность во всех частях окна является более подходящим соображением!
Большинство функций EasyGUI имеют параметры по умолчанию, и почти все компоненты будут отображать тело сообщения и заголовок диалога.
По умолчанию заголовок представляет собой пустую строку, а тело сообщения обычно имеет простое значение по умолчанию.
Это позволяет вам установить как можно меньше параметров. Например, параметры в части заголовка функции msgbox () являются необязательными, поэтому вам нужно указать только один параметр сообщения при вызове msgbox () Это например:

Конечно, вы также можете указать параметры заголовка и параметры сообщения, например:

Используйте параметры ключевого слова для вызова функций EasyGUI

Вы также можете использовать аргументы ключевого слова для вызова функций EasyGUI.
Теперь предположим, что вам нужно использовать компонент кнопки, но вы не хотите указывать параметр заголовка (второй параметр), вы все равно можете использовать метод параметра ключевого слова, чтобы указать параметр выбора (третий параметр), например такие:

ae01214a968396254122c8aa3fccec85

Используйте компоненты кнопки

В соответствии с требованиями EasyGUI установил ряд функций на buttonbox () для вызова.

msgbox()

c98dd593ba8c95abe5c63f9d3afb7ab6

ccbox()

ccbox () предоставляет выбор: «C [o] ntinue» или «C [a] ncel» и возвращает True или False соответственно.
Примечание: [o] в «C [o] ntinue» представляет собой комбинацию клавиш, что означает, что когда пользователь нажимает символ o на клавиатуре, это эквивалентно нажатию кнопки «C [o] ntinue».

ynbox()

То же, что и ccbox (), за исключением того, что здесь другое значение параметра choices по умолчанию. [] Означает использование функциональной клавиши F1 на клавиатуре в качестве сочетания клавиш для «Да».

buttonbox()

Вы можете использовать buttonbox (), чтобы определить свой собственный набор кнопок, а buttonbox () отобразит набор кнопок, настроенных вами.
Когда пользователь нажимает любую кнопку, buttonbox () возвращает текстовое содержимое кнопки.
Если пользователь нажимает кнопку «Отмена» или закрывает окно, возвращается вариант по умолчанию (первый вариант).
См. пример:

8c59952344eb28efeff4fa3b0a337ae5

indexbox()

По сути, то же самое, что и buttonbox (), разница в том, что когда пользователь выбирает первую кнопку, возвращается число 0, а при выборе второй кнопки возвращается число 1.

boolbox()

Он возвращает True, если выбрана первая кнопка, в противном случае возвращает False.

Как отображать картинки в кнопочном боксе

Предоставьте пользователям ряд возможностей

choicebox()

multchoicebox()

Функция multchoicebox () также предоставляет список для выбора.В отличие от choicebox (), multchoicebox () позволяет пользователям выбирать 0, 1 или несколько вариантов одновременно.
Функция multchoicebox () также использует последовательность (примитив или список) в качестве параметров. Перед отображением эти параметры будут отсортированы без учета регистра.

Разрешить пользователю ввести сообщение

enterbox()

ntegerbox()

integerbox () предоставляет пользователям простое поле ввода.Пользователи могут вводить только целочисленные значения в пределах диапазона (параметр нижнего уровня устанавливает минимальное значение, параметр верхнего уровня устанавливает максимальное значение), в противном случае пользователю потребуется повторно ввести значение.

multenterbox()

multenterbox () предоставляет пользователям несколько простых полей ввода. Обратите внимание на следующие моменты:

c124656a0f3d4b7066cbcf7f472294d6

Разрешите пользователю ввести пароль

Иногда пользователям может потребоваться ввести конфиденциальную информацию, например пароли, поэтому интерфейс должен выглядеть следующим образом: *******.

passwordbox()

passwordbox () имеет тот же стиль, что и enterbox (), за исключением того, что содержимое, введенное пользователем, отображается со звездочкой (*). Эта функция возвращает строку, введенную пользователем:

a7c0ae9c0c433c316249b905019150bf

multpasswordbox()

multpasswordbox () использует тот же интерфейс, что и multenterbox (), но когда он отображается, последнее поле ввода отображается как пароль (*)

Показать текст

textbox()

Функция textbox () будет отображать текстовое содержимое (автоматически обтекать) пропорциональным шрифтом (для параметра codebox = True по умолчанию установлен моноширинный шрифт) Эта функция подходит для отображения обычного письменного текста.
Примечание. Параметр text устанавливает содержимое редактируемой текстовой области, которое может быть строкой, списком или типом предка.

codebox()

codebox () отображает текстовое содержимое моноширинным шрифтом (без автоматического переноса строк), что эквивалентно текстовому полю (codebox = True)
Примечание: моноширинные шрифты некрасивы, но подходят для написания кода.

Каталоги и файлы

diropenbox()

Функция diropenbox () используется для предоставления диалогового окна для возврата имени каталога, выбранного пользователем (с полным путем), или None, если пользователь выбирает «Отмена».
Параметр по умолчанию используется для установки открытого каталога по умолчанию (убедитесь, что заданный каталог уже существует).

fileopenbox()

Функция fileopenbox () используется для предоставления диалогового окна для возврата имени файла, выбранного пользователем (с полным путем), или None, если пользователь выбирает «Отмена».
О методе установки параметра по умолчанию:

О способе установки параметра filetypes:

filesavebox()

Функция filesavebox () предоставляет диалоговое окно для выбора пути (с полным путем), по которому файл должен быть сохранен. Если пользователь выбирает «Отмена», возвращается значение «Нет».
Параметр по умолчанию должен содержать имя файла (например, имя файла, который необходимо сохранить), конечно, его также можно установить пустым или включить подстановочный знак для маски формата файла.
Чтобы узнать, как установить параметр filetypes, обратитесь к функции fileopenbox ().

Запомните настройки пользователя

EgStore

Чтобы реализовать процесс сохранения и восстановления настроек пользователя, EasyGUI предоставляет класс EgStore.

Чтобы запомнить определенные настройки, приложение должно определить класс («Настройки» в приведенном ниже случае), который наследуется от класса EgStore.

Затем приложение должно создать экземпляр объекта этого класса («настройки» в примере ниже).

Установите конструктор класса (init Method) должен инициализировать все значения, которые вы хотите запомнить.

Как только вы это сделаете, вы можете создать экземпляр переменной с заданным значением в объекте настроек, чтобы упростить запоминание настроек.

Затем используйте метод settings.store (), чтобы сохранить хранилище на жестком диске.

Создадим класс под названием «Настройки»:

Поймать исключение

При использовании EasyGUI для написания программ с графическим интерфейсом иногда неизбежны исключения. Конечно, это зависит от того, как вы запускаете приложение.Когда приложение выходит из строя, трассировка стека может быть выброшена или записана в функцию стандартного вывода stdout.

EasyGUI предоставляет лучший способ обработки исключений с помощью функции exceptionbox ().

Когда возникает исключение, exceptionbox () отображает трассировку стека в codebox () и разрешает дальнейшую обработку.

exceptionbox () прост в использовании. Вот пример:

896cf319c2a34cd001829f555c14db51

Интеллектуальная рекомендация

Обход последовательности двоичного дерева, обход предварительного порядка (рекурсивный, нерекурсивный), обход среднего порядка (рекурсивный, нерекурсивный), последующий обход (рекурсивный, нерекурсивный)

Справочник статей Обход последовательности двоичного дерева Предзаказ обхода Рекурсивная версия Нерекурсивная версия Упорядоченный обход Рекурсивная версия Нерекурсивная версия Обход после заказа Реку.

1c1c9a435c9effaa5010371fd1fe1349

iOS- alloc init new

Вы должны создавать объекты каждый день в процессе разработки, но зачем вам нужно alloc init во время инициализации? Что сделали alloc и init? alloc: выделяет память для объекта, позволяет ему не осво.

b31949f74feb564e307f72af0edbfe1d

Python без модуля по имени решение

Иногда запуск программы Python, такие как питон bob.py, клубеньковые ошибки ИМЕНИ «×××», потому что ИМПОРТ ××× произошел. Как решить это? Два случая ана.

1.5.2 Вложенность и область действия функций Python

1. Тернарная операция Результат выполнения условия if else Результат выполнения условия Например: 2. Пространство имен ** Глобальное пространство имен: ** Пространство, созданное для хранения «в.

Источник

EasyGUI is a python module that can implement GUI applications very simple and easily. All the GUI object is created by a python function call, it is not an event-driven framework, you can use it flexibly in your python script. This article will tell you how to use it with some examples.

1. How To Install Python EasyGUI Module.

  1. Open a terminal and run the command pip show easygui to check whether easygui has been installed or not.
    $ pip show easygui 
    WARNING: Package(s) not found: easygui
  2. If it can not find the easygui module, then you can install it with the command pip install easygui in the terminal.
    $ pip install easygui
    Collecting easygui
      Downloading easygui-0.98.2-py2.py3-none-any.whl (92 kB)
         |████████████████████████████████| 92 kB 169 kB/s 
    Installing collected packages: easygui
    Successfully installed easygui-0.98.2
  3. Now you can run the command pip show easygui again to get the python easygui module installation information.
    $ pip show easygui
    Name: easygui
    Version: 0.98.2
    Summary: EasyGUI is a module for very simple, very easy GUI programming in Python.  EasyGUI is different from other GUI generators in that EasyGUI is NOT event-driven.  Instead, all GUI interactions are invoked by simple function calls.
    Home-page: https://github.com/robertlugg/easygui
    Author: easygui developers and Stephen Ferg
    Author-email: [email protected]
    License: BSD
    Location: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages
    Requires: 
    Required-by: 
    

2. How To Use Python EasyGUI In Eclipse Pydev.

  1. If you want to use the python easygui module in the eclipse Pydev project, you can follow the below steps.
  2. First, from the command pip show easygui returned data, we can see the easygui module is installed in the directory /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages.
  3. So what you need to do is to add the easygui module installed directory into the eclipse Pydev project PYTHONPATH —> External Libraries.
  4. You can right-click the eclipse Pydev project, then click the Properties menu item in the popup menu list to open the project Properties for dialog window.
  5. Click the PyDev – PYTHONPATH menu item on the left side, then click the External Libraries tab on the dialog right side.
  6. Please make sure the easygui module install directory exists in the External Libraries, if not, click the Add source folder button to add it. You can read the article How To Add Library In Python Eclipse Project to learn more.

3. Run Python EasyGUI Examples.

There list some examples for the easygui functions.

  1. Before you can use easygui function, you must import it into your python script.
    from easygui import *
  2. The function abouteasygui() will display an about dialog that will introduce the easygui module.
    # Import all functions from easygui module.
    from easygui import *
    
    if __name__ == '__main__':
        
        # display the easygui about dialog window.
        abouteasygui()
  3. The function easygui_demo() will display a dialog that contains all the demo of how to use easygui common used functions, but you should import it with the command from easygui.boxes.demo import easygui_demo before using it.
    from easygui.boxes.demo import easygui_demo
    
    if __name__ == '__main__':
    
        # the easygui_demo() function will display all the function's demo.
        easygui_demo()
  4. Easygui function msgbox example.
    from easygui import *
    
    if __name__ == '__main__':
           
        # display a message box.
        title_txt = 'This is title'
        msg_txt = 'This is easygui msgbox message.'
        ret = msgbox(title=title_txt, msg=msg_txt)
        print('msgbox return = ', ret)
    
    ==========================================
    Below is the above code output.
    
    msgbox return = OK
  5. Easygui function ynbox example.
    from easygui import *
    
    if __name__ == '__main__':
        
        # display the ynbox (yes or no box)
        title_txt = 'Demo for ynbox'
        msg_txt = 'Shall I continue?'
        ret = ynbox(title=title_txt, msg=msg_txt, choices = ('Yes', 'No'))
        print('ynbox return = ', ret)
        
    ==========================================
    Output.
    
    ynbox return = False
  6. Easygui function ccbox example.
    from easygui import *
    
    if __name__ == '__main__':
        
        # demo for ccbox (continue or cancel box)
        title_txt = 'Demo for ccbox'
        msg_txt = 'Shall I continue or cancel?'
        ret = ccbox(msg = msg_txt, title = title_txt, choices = ('Continue', 'Cancel'))
        print('ccbox return = ', ret)
    ==========================================
    Output.
    
    ccbox return = True
  7. Easygui function boolbox example.
    from easygui import *
    
    if __name__ == '__main__':
           
        # demo for boolbox
        title_txt = 'Demo for boolbox'
        msg_txt = 'Shall I continue or cancel?'
        ret = boolbox(msg = msg_txt, title = title_txt, choices = ('I like python', 'I do not like python'))
        print('boolbox return = ', ret)
    ===========================================
    Output.
    
    boolbox return = False
  8. Easygui function buttonbox example.
    from easygui import *
    
    if __name__ == '__main__':
            
        # demo for buttonbox
        title_txt = 'Demo for buttonbox'
        msg_txt = 'Shall I continue or cancel?'
        
        btn1 = 'Python'
        btn2 = 'Java'
        btn3 = 'Javascript'
        
        btn_list = []
        btn_list.append(btn1)
        btn_list.append(btn2)
        btn_list.append(btn3)
        ret = buttonbox(msg = msg_txt, title = title_txt, choices = btn_list)
        print('buttonbox return = ', ret)
    ===========================================
    Output.
    
    buttonbox return = Python
  9. Easygui function buttonbox with images example.
    # demo for buttonbox with images.
    title_txt = 'Demo for buttonbox with images'
    msg_txt = 'Which image do you like?'
    
    btn1 = 'Apple'
    btn2 = 'Android'
    
    btn_list = []
    btn_list.append(btn1)
    btn_list.append(btn2)
    
    images_path = ('C:\Users\zhaosong\Pictures\apple.PNG', 'C:\Users\zhaosong\Pictures\android.jpg')
    ret = buttonbox(msg = msg_txt, title = title_txt, choices = btn_list, image=images_path)
    print('buttonbox return = ', ret)
    ==============================================
    Output.
    
    buttonbox return = Apple
    
    or
    
    buttonbox return = C:UserszhaosongPicturesapple.PNG
  10. Easygui function choicebox example.
    from easygui import *
       
    def choicebox_example():
        # demo for ccbox (continue or cancel box)
        title_txt = 'Demo for choicebox'
        msg_txt = 'Select one coding language?'
        ret = choicebox(msg = msg_txt, title = title_txt, choices = ('Python', 'Java', 'Swift'))
        print('choicebox return = ', ret)
                                    
    
    if __name__ == '__main__':
        
        choicebox_example()
    ===============================================
    Output.
    
    
    choicebox return = Python
  11. Easygui function multchoicebox example.
    from easygui import *
    
    def multchoicebox_example():
        # demo for multchoicebox
        title_txt = 'Demo for multchoicebox'
        msg_txt = 'Select multiple coding language?'
        ret = multchoicebox(msg = msg_txt, title = title_txt, choices = ('Python', 'Java', 'Swift'))
        print('multchoicebox return = ', ret)
                                        
    
    if __name__ == '__main__':
        
        multchoicebox_example()
    ================================================
    Output.
    
    multchoicebox return = ['Python', 'Java', 'Swift']
  12. Easygui function textbox example.
    from easygui import *
    
    def textbox_example():
        # demo for multchoicebox
        title_txt = 'Demo for textbox'
        msg_txt = 'Input text in the below text area.'
        ret = textbox(msg = msg_txt, title = title_txt)
        print('textbox return = ', ret)
                                            
    
    if __name__ == '__main__':
        
        textbox_example()
    
    ======================================================
    Output.
    
    textbox return =  I love python.
  13. Easygui function codebox example.
    from easygui import *
    import os
    
    def codebox_example():
        # demo for multchoicebox
        title_txt = 'Demo for codebox'
        msg_txt = 'Below python source code are loaded from a python file.'
        
        file_path = 'C:WorkSpaceWorkdev2qa.com-example-codePythonExampleProjectcomdev2qaexampleguiEasyguiExample.py'
        
        file = open(file_path)
        
        file_content = file.readlines();
        
        file.close()
        
        ret = codebox(msg = msg_txt, title = title_txt, text= file_content)
        print('codebox return = ', ret)                                         
                                            
    
    if __name__ == '__main__':
           
        codebox_example()
    =========================================================
    Output.
    
    codebox return = 
    from easygui import *
    import os
    
    def codebox_example():
        # demo for codebox
        title_txt = 'Demo for codebox'
        msg_txt = 'Below python source code are loaded from a python file.'
        
        # read a python source file content.
        file_path = 'C:WorkSpaceWorkdev2qa.com-example-codePythonExampleProjectcomdev2qaexampleguiEasyguiExample.py'
        
        file = open(file_path)
        
        file_content = file.readlines();
        
        file.close()
        
        # show python source code in the codebox.
        ret = codebox(msg = msg_txt, title = title_txt, text= file_content)
        print('textbox return = ', ret)                                            
                                            
    if __name__ == '__main__':
            
        codebox_example()
  14. Easygui function enterbox example.
    from easygui import *
    
    def enterbox_example():
        # demo for enterbox
        title_txt = 'Demo for enterbox'
        msg_txt = 'Enter the coding language that you prefer.'
        ret = enterbox(msg = msg_txt, title = title_txt)
        print('enterbox return = ', ret)   
                                            
    
    if __name__ == '__main__':
    
        enterbox_example()
    ======================================
    Output.
    
    enterbox return =  python
  15. Easygui function integerbox example.
    from easygui import *
    
    def integerbox_example():
        # demo for enterbox
        title_txt = 'Demo for integerbox'
        msg_txt = 'Enter an integer between 90 - 100.'
        ret = integerbox(msg = msg_txt, title = title_txt)
        print('integerbox return = ', ret)                                          
    
    if __name__ == '__main__':
            
        integerbox_example()
    ================================================================
    Output.
    
    If you enter an integer value smaller than or bigger than the integer range, it will prompt an alert dialog. otherwise, it will return the user entered integer value.
    
  16. Easygui function passwordbox example.
  17. Easygui function multenterbox example.
  18. Easygui function multpasswordbox example.
  19. Easygui function enterbox with an image example.
  20. Easygui function filesavebox example.
  21. Easygui function fileopenbox example.
  22. Easygui function diropenbox example.
  23. Easygui function exceptionbox example.

Слова, написанные перед статьей: В процессе установки easygui, python столкнулся со многими проблемами, такими как модуль easygui не был найден, не найден путь компиляции python для pycharm, и он оказался неудачным. Позже я снова загрузил 0,96, чтобы добиться успеха. Вот шаги:

шаг:

1. Скачать 0,96 easygui.https://sourceforge.net/projects/easygui/files/0.96

2. После распаковки двумя файлами являются setup.py и easygui.py.

4. Создайте новую папку easygui в папке python / Lib / site-packages.

3. Поместите файл easygui.py в папку easygui.

4. Настройте переменные среды.

Мой компьютер-Свойства-Дополнительные параметры системы-Дополнительные-переменные среды-Создать новую системную переменную

Имя переменной PYTHONPATH

Значение переменной: C: Python Python36-32 lib site-packages easygui (Моя переменная имеет следующее значение: путь каждого должен быть разным, в зависимости от пути установки Python.
5. Откройте IDLE и представьте easygui.

import easygui

6. Напишите тестовый код.

easygui.msgbox(‘Hello World’)

7. Появится окно сообщения. Успех!

Кроме того, его также можно ввести так

import easygui as g

g.msgbox(“Hello World”)

Возникшие проблемы: 1. Перемещено положение python, его легко написать при написании пути для удобства
Поэтому при компиляции с помощью Pycharm компилятор python не может быть найден.

Примечание. Поскольку я переместил python, путь для добавления интерпретатора python к системному пути при установке питона был неверным, поэтому мне пришлось изменить шаги изменения: Панель управления -> Система -> Дополнительные параметры системы -> Переменные среды -> Системная переменная—> Путь, найдите путь с помощью python.exe, измените его на путь, по которому вы сейчас находитесь на python.exe

Решение:
File—>settings—>Project—->Project Interpreter

Нажмите в правом верхнем углу ..—> Добавить,

Удалите все файлы в папке, расположенной в папке «Местоположение» (если вас это не беспокоит, вы можете сначала обрезать файл в других местах), поскольку вы можете изменить путь интерпретатора Base. , Изменено в пути компиляции интерпретатора Python
Есть еще один шаг, чтобы поместить easygui.py в загруженный и разархивированный easygui в проект, который вы создали в Pycharm.

F/untitleed/venv/LibВ пути / site-packages все разные, это зависит от пути проекта, созданного при установке Pycharm

Затем перезапустите Pycharm

Improve Article

Save Article

  • Read
  • Discuss
  • Improve Article

    Save Article

    EasyGUI is a module for very simple, very easy GUI programming in Python. EasyGUI is different from other GUI generators in that EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by simple function calls. Unlike other complicated GUI’s EasyGUI is the simplest GUI till now.

    Install using this command: 

    pip install easygui

    Note : It is not recommended to run EasyGui on IDLE as EasyGui runs on Tkinter and has its own event loop, and IDLE is also an application written by Tkinter module and also it has its own event loop. So when both are run at the same time, conflicts can occur and unpredictable results can occur. So it is preferred to run EasyGui out side the IDLE.

    Importing EasyGUI  

    from easygui import *

    It is the best way to use all the widgets without extra reference.

    Example : 
    In this we will create a window having a short message and a press button which when pressed closes our message box, below is the implementation 

    Python3

    from easygui import *

    title = "GfG-EasyGUI"

    msg = "GeeksforGeeks, Hello World from EasyGUI"

    button = "Let's Go"

    msgbox(msg, title, button )

    Output : 

    "Let's Go"

    Another Example: 
    In this we will allow user to choose the “geek form” and when ans is selected it will get printed, below is the implementation 

    Python3

    from easygui import *

    choices = ["Geek", "Super Geek", "Super Geek 2", "Super Geek God"]

    msg = "Select any one option"

    reply = choicebox(msg, choices = choices)

    print("You selected : ", end = "")

    print(reply)

    Output : 
     

    You selected : Super Geek God

    Improve Article

    Save Article

  • Read
  • Discuss
  • Improve Article

    Save Article

    EasyGUI is a module for very simple, very easy GUI programming in Python. EasyGUI is different from other GUI generators in that EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by simple function calls. Unlike other complicated GUI’s EasyGUI is the simplest GUI till now.

    Install using this command: 

    pip install easygui

    Note : It is not recommended to run EasyGui on IDLE as EasyGui runs on Tkinter and has its own event loop, and IDLE is also an application written by Tkinter module and also it has its own event loop. So when both are run at the same time, conflicts can occur and unpredictable results can occur. So it is preferred to run EasyGui out side the IDLE.

    Importing EasyGUI  

    from easygui import *

    It is the best way to use all the widgets without extra reference.

    Example : 
    In this we will create a window having a short message and a press button which when pressed closes our message box, below is the implementation 

    Python3

    from easygui import *

    title = "GfG-EasyGUI"

    msg = "GeeksforGeeks, Hello World from EasyGUI"

    button = "Let's Go"

    msgbox(msg, title, button )

    Output : 

    "Let's Go"

    Another Example: 
    In this we will allow user to choose the “geek form” and when ans is selected it will get printed, below is the implementation 

    Python3

    from easygui import *

    choices = ["Geek", "Super Geek", "Super Geek 2", "Super Geek God"]

    msg = "Select any one option"

    reply = choicebox(msg, choices = choices)

    print("You selected : ", end = "")

    print(reply)

    Output : 
     

    You selected : Super Geek God

    Понравилась статья? Поделить с друзьями:
  • Как установить easy settings на windows 10
  • Как установить directplay на windows 7
  • Как установить easier cap на windows 10
  • Как установить eappx на windows 10
  • Как установить dxgi dll для windows 7