wxpython

Installing wxPython on Windows: DistutilsPlatformError: Microsoft Visual C++ 14.2 or greater is required

Installing wxPython on Windows: DistutilsPlatformError: Microsoft Visual C++ 14.2 or greater is required Question: I have installed: Python 3.10.1 PyCharm Community 2021.3 Visual Studio Build Tools 2022, including: C++ Build Tools Core Features C++ 2022 Redistributable Update C++ core desktop features MSVC v143 – VS 2022 C++ x64/x86 build tools (Latest) Windows 10 SDK (10.0.19041.0) …

Total answers: 4

Learning Python: RuntimeError: wrapped C/C++ object of type StaticBitmap has been deleted

Learning Python: RuntimeError: wrapped C/C++ object of type StaticBitmap has been deleted Question: I’m currently learning to program with Python, I got this example code for a simple image viewer (see below), which produces the following error message when I close the app, run it again and open any directory to browse the images in …

Total answers: 2

Pyinstaller embed images folder in –onefile –windowed application

Pyinstaller embed images folder in –onefile –windowed application Question: I am trying to embed a folder with images into generated (with PyInstaller) executable. But it doesn’t work for me. Even with one simple image! The datas variable in my main.spec file looks like this: datas=[ (‘C:\Users\<user>\dir1\dir2\MyApp\images\*.png’, ‘images’) ], According to the documentation: The first string …

Total answers: 1

How to use `ListCtrl` on wxpython

How to use `ListCtrl` on wxpython Question: How can I append row and it’s corresponding data into ListCtrl. I’ve just finished how to use TreeCtrl(Relatively easier than ListCtrl), it shows me a clear usage of matching single GUI object and data. But ListCtrl dose not. How can I append or insert single row with it’s …

Total answers: 2

wxPython's wx.grid.Grid() won't come fully into view

wxPython's wx.grid.Grid() won't come fully into view Question: Issue: I’m experiencing an issue where a function that simply creates a Grid() works when called in one place, but not another place. When it is called from the “other,” non-working place, it does create a very small square in the corner of the window. At this …

Total answers: 1

Redirect sys.stdout from ping results to a wx.TextCtrl widget

Redirect sys.stdout from ping results to a wx.TextCtrl widget Question: I’m trying to redirect the sys.stdout stream to a wx.TextCtrl widget. In this code, i used ping but how to redirect results to wx.textctrl or statictext widgets. I can send variable from my input to wx.statictext but not able to get the stdout from ping …

Total answers: 3

How do I check the version of wxPython installed on my server?

How do I check the version of wxPython installed on my server? Question: I have Python and WxPython installed. I want to check what is the version of WxPython installed. Didn’t find the answer on https://wxpython.org/ Asked By: ban || Source Answers: Just like you would with every other Python library: pip show WxPython As …

Total answers: 2

wxPython check if the c++ part is deleted

wxPython check if the c++ part is deleted Question: I am working on a project where a function is throwing a wx.pyDeadObject Error because of a delayed task. I’ve read that in wx you can check if the c++ object still exsists by running if self:, however this no longer works in wxPython 3.0.2. using …

Total answers: 2

WxPython not rendering correctly

WxPython not rendering correctly Question: I create a WxPython notebook after a call from a menu item, but unfortunately it’s not rendering correctly (only a little blue shape in the corner is visible). I have to manually resize the window and it pops back to working order like the second picture. Code: def load_notebook(self): panel …

Total answers: 3

Different Marker color when value crosses a threshold

Different Marker color when value crosses a threshold Question: Here is an image of simplified plot of the situation: http://postimg.org/image/qkdm6p31p/ I would like to have a red marker for the values above a certain threshold value, in this case, the two points above the red line to have a red marker. Is it possible in …

Total answers: 1