easygui

Python- Displaying a message box that can be closed in the code (no user intervention)

三世轮回 提交于 2019-12-20 03:11:41
问题 I am creating test scripts using Python. I need to have a message displayed to the user while the script continues to run. This is to have some status update , for eg: "Saving test results" which should not wait for the user to click "Ok". Essentially , I need to create a message that pops up and closes without the user having to do it. Currently,I am using easygui module for adding GUI.Easygui can be used for creating such message boxes but they cannot be closed in the code and need to wait

Py2Exe and Easgui

旧时模样 提交于 2019-12-14 02:36:19
问题 I am trying to convert a py file to an exe. Here is the code for my setupfile from distutils.core import setup import py2exe setup(console=["mycode.py"]) When I use cmd, it says: Import Error: No module named easygui How do I let py2exe know about the easygui? As well as the numpy and mathplotlib (all are used in mycode.py) 回答1: First, use pyinstaller. It is newer and better (though I have used py2exe until switching to pyinstaller) And it seems to have much better recipes for finding your

EasyGUI Output?

送分小仙女□ 提交于 2019-12-13 08:32:43
问题 Right...so, I have two lists. One has 16 entries. The other at least has a couple hundred. Outputting them with EasyGUI is easy enough, with either a textbox() function or msgbox() function. The problem is that I want it to display with one list item per row, instead of a huge blob. How would I achieve this? Here's an example of the code: def print_comb_GUI(combinations): eg.textbox(combinations) #eg = EasyGUI combinations is a list with about 100-200 entries (it depends) Every entry is a

Python EasyGUI- Integerbox Bound Limits

无人久伴 提交于 2019-12-11 12:36:40
问题 I am using EasyGUI as part of a small program I am writing. In it, I am using the IntegerBox "function". Part of the parameters of this function is the lowerbound and the upperbound (the limits of the value entered). If the value is under the lowerbound or if it exceeds the upperbound, the program raises an error. Only for this program, I want to remove the lowerbound/upperbound--- so it is possible to put any number in. My code is: import easygui as eg numMin=eg.integerbox(msg="What is the

Python easygui can't select file

懵懂的女人 提交于 2019-12-11 02:18:56
问题 Here's my code: import easygui f = easygui.fileopenbox() print f Seems simple, but when I run it, I can't select any of the files, see figure in link. Sorry if this is dumb, but I am at my wit's end! http://imgur.com/c20TvQ5 回答1: EasyGui isn't supported anymore. On OS X I don't have this problem with fileopenbox (it looks like what happens with diropenbox actually.) I'd recommend you try something like wxPython. Here's how to get a file open box in that (from https://stackoverflow.com/a

应用easygui模块的python程序

我是研究僧i 提交于 2019-12-10 22:01:32
应用easygui模块的python程序 这是我的第一个应用easygui模块的python程序 源码: import easygui as g import sys while 1 : g . msgbox ( "欢迎进入第一个界面小游戏" ) msg = "欢迎进入第一个小游戏" msg = "欢迎进入第一个小游戏" title = "小游戏哦" choices = [ "谈恋爱" , "编程" , "ooxx" , "琴棋书画" ] choice = g . choicebox ( msg , title , choices ) g . msgbox ( "你的选择是:" + str ( choice ) , "结果" ) msg = "你希望重新开始小游戏吗?" title = "请选择" if g . ccbox ( msg , title ) : pass else : sys . exit ( 0 ) 来源: CSDN 作者: heart_haike 链接: https://blog.csdn.net/qq_42400763/article/details/103483047

How to install EasyGUI on Mac OS X 10.6 (Snow Leopard)?

女生的网名这么多〃 提交于 2019-12-08 07:34:02
问题 I would like to install EasyGUI on Mac OS X 10.6, but am running into trouble. Has anyone successfully done this? If so, what explicit set of steps did you follow? Thank you. 回答1: It's hard to know what running into trouble means but, nonetheless, something like this seems to work on 10.6: mkdir test_easygui cd test_easygui curl http://easygui.sourceforge.net/current_version/easygui_v0.93.tar.gz | tar xz /usr/bin/python2.6 easygui.py EDIT: Unfortunately, the EasyGui download does not include

宠物资质及评分--Python

会有一股神秘感。 提交于 2019-12-02 19:57:51
import easygui class Pets(): def __init__(self,x,y,y1,y2,y3): self.x = float(x) self.y = float(y) self.y1 = float(y1) self.y2 = float(y2) self.y3 = float(y3) def single(self): z = self.y * 0.2565 + self.x * 89.5865 + 37.767 z1 = self.y1 * 0.2565 + self.x * 89.5865 + 37.767 z2 = self.y2 * 0.2565 + self.x * 89.5865 + 37.767 z3 = self.y3 * 0.2565 + self.x * 89.5865 + 37.767 s = easygui.buttonbox(msg=['满级满星斗志属性:', z,'满级满星健体属性:',z1], title='计算结果', choices=('再来一次', '结束')) return s def score(self): Y1 = (96.4 - 0.0035 * self.y) * self.x + 0.2886 * self.y - 26.26 Y2 = (96.4 - 0.0035 * self.y2) * self

Closing a running program from a process

血红的双手。 提交于 2019-12-02 05:30:38
How can I close a program from a child process? For exanple: import easygui import multiprocessing def func(): reply=easygui.buttonbox("start?",image="F:\project\phonber.png",choices=['yes','no']) if reply=="yes": exit_option() if __name__=='__main__': p=multiprocessing.Process(target=func,args=()) t=p.start() while True: None Is there a way to execute the exit_option() ? Montmons Your forgot to actually call the function: import easygui import multiprocessing def func(): reply=easygui.buttonbox("start?",image="F:\project\phonber.png",choices=['yes','no']) if reply=="yes": exit_option() func()

Python- Displaying a message box that can be closed in the code (no user intervention)

一个人想着一个人 提交于 2019-12-02 01:48:04
I am creating test scripts using Python. I need to have a message displayed to the user while the script continues to run. This is to have some status update , for eg: "Saving test results" which should not wait for the user to click "Ok". Essentially , I need to create a message that pops up and closes without the user having to do it. Currently,I am using easygui module for adding GUI.Easygui can be used for creating such message boxes but they cannot be closed in the code and need to wait for the user to close them for the script to continue running. Thanks in advance for your time and help