使用wxPython的问题 [英] Problem using wxPython

查看:54
本文介绍了使用wxPython的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个GUI,我的GUI工具包是wxPython。现在,当GUI打开时...我点击的任何标签和按钮......都会执行一个动作。每次点击鼠标都是一个事件,它会在脚本中相应处理。


现在我想在不使用鼠标的情况下操作GUI ..我通过我的脚本... 。


例如......在原始的python脚本中......有一个函数OnBrowseForReport Directory。当我点击GUI中的浏览选项卡时,会打开一个对话框,从中我可以选择我的报告目录,然后单击确定。目录被选中......但所有这些动作都是在点击鼠标时执行的......即手动。我想自动化整个事情......即我想通过我自己的python脚本打开对话框并选择目录而不点击确定。选项卡...即通过我的脚本.....我想使用底层错误的OnBrowseForReport目录......


Plz帮助...它是紧急的!!

Hi,
i have a GUI and my GUI Toolkit is wxPython. Now when the GUI opens...whatever tabs and buttons i click...an action is performed. Each mouse click is an event and it is processed in the script accordingly.

Now i want to operate that GUI without using the mouse..i''e thru my script....

for example...in the original python script...there is a function "OnBrowseForReport Directory". When i click on the tab for browse in the GUI....a dialog opens from where i can choose my report directory and click on OK. The directory gets chosen...but all these actions are performed on the click of the mouse...i.e manually. I want to automate the entire thing...i.e I want to open the dialog thru my own python script and choose the directory without clicking on the "OK" tab...i.e thru my script.....i want to use the underlyting fumction "OnBrowseForReport Directory"...

Plz help...it''s urgent!!

推荐答案




i有一个GUI,我的GUI工具包是wxPython 。现在,当GUI打开时...我点击的任何标签和按钮......都会执行一个动作。每次点击鼠标都是一个事件,它会在脚本中相应处理。


现在我想在不使用鼠标的情况下操作GUI ..我通过我的脚本... 。


例如......在原始的python脚本中......有一个函数OnBrowseForReport Directory。当我点击GUI中的浏览选项卡时,会打开一个对话框,从中我可以选择我的报告目录,然后单击确定。目录被选中......但所有这些动作都是在点击鼠标时执行的......即手动。我想自动化整个事情......即我想通过我自己的python脚本打开对话框并选择目录而不点击确定。选项卡...即通过我的脚本.....我想使用底层错误的OnBrowseForReport目录......


Plz帮助...它是紧急的!
Hi,
i have a GUI and my GUI Toolkit is wxPython. Now when the GUI opens...whatever tabs and buttons i click...an action is performed. Each mouse click is an event and it is processed in the script accordingly.

Now i want to operate that GUI without using the mouse..i''e thru my script....

for example...in the original python script...there is a function "OnBrowseForReport Directory". When i click on the tab for browse in the GUI....a dialog opens from where i can choose my report directory and click on OK. The directory gets chosen...but all these actions are performed on the click of the mouse...i.e manually. I want to automate the entire thing...i.e I want to open the dialog thru my own python script and choose the directory without clicking on the "OK" tab...i.e thru my script.....i want to use the underlyting fumction "OnBrowseForReport Directory"...

Plz help...it''s urgent!!



" OnBrowseForReport Directory"不能因为那里的空间而成为名字(我将在我的解释中使用OnBrowseForReport:

最简单的方法是添加一个按钮(或菜单) item或者whaterver)开始你想要的动作。然后你可以调用self.OnBrowseForReport(None),只要事件处理程序永远不会调用任何event.WhatEver()s。依此类推,直到所有动作都完成。

"OnBrowseForReport Directory" can''t really be the name because of the space in there (I''ll use "OnBrowseForReport" in my explanation:
The easiest way to do this is to add a button (or menu item, or whaterver) to start the action you want. Then you can call self.OnBrowseForReport(None) as long as the event handler never calls any event.WhatEver()s. And so on, until all actions are complete.



" OnBrowseForReport Directory因为其中的空格而不能成为名称(我将使用OnBrowseForReport;在我的解释中:

最简单的方法是添加一个按钮(或菜单项或whaterver)来启动你想要的动作。然后你可以调用self.OnBrowseForReport(None)因为事件处理程序从不调用任何event.WhatEver()s。依此类推,直到所有操作都完成。
"OnBrowseForReport Directory" can''t really be the name because of the space in there (I''ll use "OnBrowseForReport" in my explanation:
The easiest way to do this is to add a button (or menu item, or whaterver) to start the action you want. Then you can call self.OnBrowseForReport(None) as long as the event handler never calls any event.WhatEver()s. And so on, until all actions are complete.



Cudn't get u ... let我解释一下......

thr''s一个看起来像这样的函数

Cudn''t get u...let me explain it a bit....
thr''s one function which looks like this

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号



Cudn''t get你...让我解释一下......

thr'的一个函数看起来像这样
Cudn''t get u...let me explain it a bit....
thr''s one function which looks like this
展开 | 选择 | Wrap | 行号


这篇关于使用wxPython的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆