wxpython

Robot Framework 使用【1】-- 基于Python3.7 + RIDE 最新版本搭建

别说谁变了你拦得住时间么 提交于 2020-08-11 04:10:12
前言 Robot Framework作为公司能快速落地实现UI自动化测试的一款框架,同时也非常适合刚入门自动化测试的朋友们去快速学习自动化,笔者计划通过从搭建逐步到完成自动化测试的过程来整体描述它的使用。 Robot Framework环境搭建步骤 Robot Framework是基于Python语言开发的一款框架,搭建步骤如下: 对于Robot Framework熟悉的老手尝鲜新版 或 python熟悉的朋友看如下简易安装步骤即可(详细截图说明内容适合新入门朋友) 简易安装步骤: 安装python3.7 在dos命令输入 pip install robotframework 在线安装robotframework 在dos命令输入 pip install Pypubsub==3.3.0 在线安装 Pypubsub 在dos命令输入 pip install wxPython==4.0.3 在线安装 wxPython 在dos命令输入 pip install robotframework-ride 在线安装robotframework-ride 在dos命令输入 pip list 检查是否安装成功 在dos命令输入 ride.py 检查是否出现RIDE主界面,如不能出现,可去 python安装路径\scripts\ride.py 手动双击启动 详细安装步骤: 安装 python3.7

解决ModuleNotFoundError: No module named 'pip'问题

筅森魡賤 提交于 2020-08-11 00:23:37
Python学习遇到小问题:ModuleNotFoundError: No module named ‘pip’ 今天想要装一下wxPython第三方库来写一下Python的GUI的时候发现cmd窗口下无法执行pip命令,想了想昨晚好像是pip命令行提示了我有新版本可以更新使用,更新之后也不成功,但昨晚没有怎么理会,以为没事,但今早起来一看发现pip命令都用不了了,出现了ModuleNotFoundError: No module named 'pip’这个错误。 查询了网上之后发现,这个错误可以通过两行简单的cmd命令行语句进行改正修复。 python -m ensurepip python -m pip install --upgrade pip 来源: oschina 链接: https://my.oschina.net/lenglingx/blog/4474264

Python print statement changes behavior of code?

生来就可爱ヽ(ⅴ<●) 提交于 2020-07-09 16:57:24
问题 The weirdness: After some experimenting I've concluded that putting in a useless line ( print "hi" , or x = 1 ) ANYWHERE in the code below makes it work correctly. What's going on? I'd love to understand what about how Python is processing this code that's causing this weird behavior. Some context: I'm writing a gui in wxpython. I have this function (see below) which causes a tool to change icons when pressed (by removing the tool and adding it back in with a different icon). The code shown

wxPython - change panel by button

怎甘沉沦 提交于 2020-07-08 02:37:42
问题 I would like to write simple code with 2 panels. Simple "Hello" and button next to it. Button changes panel to panel_2 with text "Panel 2" and button next to it. I do not know how can I achieve that. There is my code: import wx class Glowne(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent=parent) self.SetSize((800,600)) tekst = 'HELLO' font = wx.Font(18, wx.DEFAULT, wx.NORMAL, wx.NORMAL) wx.StaticText(self, -1, tekst, (300, 10)).SetFont(font) btn = wx.Button(self, -1,

wxPython - change panel by button

半城伤御伤魂 提交于 2020-07-08 02:37:39
问题 I would like to write simple code with 2 panels. Simple "Hello" and button next to it. Button changes panel to panel_2 with text "Panel 2" and button next to it. I do not know how can I achieve that. There is my code: import wx class Glowne(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent=parent) self.SetSize((800,600)) tekst = 'HELLO' font = wx.Font(18, wx.DEFAULT, wx.NORMAL, wx.NORMAL) wx.StaticText(self, -1, tekst, (300, 10)).SetFont(font) btn = wx.Button(self, -1,

wxPython - change panel by button

青春壹個敷衍的年華 提交于 2020-07-08 02:37:27
问题 I would like to write simple code with 2 panels. Simple "Hello" and button next to it. Button changes panel to panel_2 with text "Panel 2" and button next to it. I do not know how can I achieve that. There is my code: import wx class Glowne(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent=parent) self.SetSize((800,600)) tekst = 'HELLO' font = wx.Font(18, wx.DEFAULT, wx.NORMAL, wx.NORMAL) wx.StaticText(self, -1, tekst, (300, 10)).SetFont(font) btn = wx.Button(self, -1,

Python: variable only works when print statement is present

血红的双手。 提交于 2020-06-29 08:21:18
问题 I have an extremely strange problem that has stumped me for about the past day. import wx, gui, threading, time, pyodbc from OrderNumEntry import entryID, plyID, stationID from main import strPlyDB from Op1Login import eID1 global eID1 class MainFrame1(gui.MainFrame1Op): def __init__(self, parent): gui.MainFrame1Op.__init__(self, parent) self.m_textCtrl3.SetValue(eID1) # print eID1 def checkClick1(self, event): if threading.activeCount() < 2: t1 = threading.Thread(target = self.checkAdvance1)

Python: variable only works when print statement is present

孤街浪徒 提交于 2020-06-29 08:20:27
问题 I have an extremely strange problem that has stumped me for about the past day. import wx, gui, threading, time, pyodbc from OrderNumEntry import entryID, plyID, stationID from main import strPlyDB from Op1Login import eID1 global eID1 class MainFrame1(gui.MainFrame1Op): def __init__(self, parent): gui.MainFrame1Op.__init__(self, parent) self.m_textCtrl3.SetValue(eID1) # print eID1 def checkClick1(self, event): if threading.activeCount() < 2: t1 = threading.Thread(target = self.checkAdvance1)

Trying to create a dialog in another thread wxpython

拟墨画扇 提交于 2020-06-27 08:49:31
问题 I'm running a function in another thread that is supposed to fill out a dialog and then show it but it just seg faults as soon as I tried to alter the dialog in any way. I've read that this is a common issue with WxPython and that devs are not intended to directly alter dialogs in another thread. How do I get around this? I can just call the function in my main thread but that will block my GUI and it is a lengthy operation to initialize the dialog - I would like to avoid this. My code is

pyinstaller on Windows with --noconsole simply won't work

坚强是说给别人听的谎言 提交于 2020-06-24 10:25:47
问题 I have a fairly simple GUI (wxPython) app and is working great. I'm using Windows 7. When compiling it using pyinstaller with -w (or --noconsole or --windowed ) and run it, I can see a console window for a millisecond and then it shutdown. The GUI app won't run. Compiling without the -w will produce a working app with a console window. What am I missing here? 回答1: I would guess that you are somehow launching a subprocess that gets messed up when Python runs without a console window. I have