Questions tagged [wxpython]

wxPython is a Python wrapper for the cross-platform C++ GUI API wxWidgets.

wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a Python extension module (native code) that wraps the popular wxWidgets cross-platform GUI library, which is written in C++.

Resources

Books

6954 questions
28
votes
2 answers

Embedding a matplotlib figure inside a WxPython panel

How do I embed a matplotlib figure object inside a WxPython panel? I googled around and saw complicated examples involving interactive graphics and other extra stuff. Can anybody help with a minimal example?
Jesvin Jose
  • 20,780
  • 25
  • 95
  • 183
27
votes
6 answers

How to convert a string from CP-1251 to UTF-8?

I'm using mutagen to convert ID3 tags data from CP-1251/CP-1252 to UTF-8. In Linux there is no problem. But on Windows, calling SetValue() on a wx.TextCtrl produces the error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position …
jsnjack
  • 2,282
  • 2
  • 17
  • 20
27
votes
2 answers

wxPython, Set value of StaticText()

I am making a little GUI frontend for a app at the moment using wxPython. I am using wx.StaticText() to create a place to hold some text, code below: content = wx.StaticText(panel, -1, "Text Here", style=wx.ALIGN_CENTRE) I have a button when…
RailsSon
  • 17,439
  • 31
  • 80
  • 104
26
votes
6 answers

How do I install wxPython on Mac OS X?

I'd like to use wxPython on my Mac OS 10.7 (Lion) computer. (I'm a Tkinter refugee.) I upgraded from Python 2.7.1, then downloaded and installed wxPython2.8-osx-unicode-2.8.12.1-universal-py2.7.dmg. Here's what I get: Python 2.7.2…
David Matuszek
  • 1,243
  • 1
  • 16
  • 30
26
votes
2 answers

Py2exe lxml woes

I have a wxpython application that depends on lxml and works well when running it through the python interpreter. However, when creating an exe with py2exe, I got this error ImportError: No module named _elementpath I then used python setup.py…
jack the lesser
  • 661
  • 1
  • 7
  • 15
26
votes
7 answers

Qt being now released under LGPL, would you recommend it over wxWidgets?

I am quite a heavy user of wxWidgets, partly because of licensing reasons. How do you see the future of wxWidgets in prospect of the recent announcement of Qt now being released under LGPL? Do you think wxwidget is still a good technical choice for…
Mapad
  • 7,566
  • 5
  • 37
  • 40
25
votes
5 answers

How to check if OS is Vista in Python?

How, in the simplest possible way, distinguish between Windows XP and Windows Vista, using Python and pywin32 or wxPython? Essentially, I need a function that called will return True iff current OS is Vista: >>> isWindowsVista() True
DzinX
  • 47,309
  • 9
  • 57
  • 78
22
votes
6 answers

wxPython: Calling an event manually

How can I call a specific event manually from my own code?
Ram Rachum
  • 71,442
  • 73
  • 210
  • 338
22
votes
6 answers

Pausing a thread using threading class

I have a long process that i've scheduled to run in a thread, because otherwise it will freeze the ui in my wxpython application. I'm using threading.Thread(target = myLongProcess).start() to start the thread and it works, but I don't know how to…
jimbo
  • 299
  • 1
  • 2
  • 7
22
votes
3 answers

Change the colour of a StaticText, wxPython

I need to make a StaticText red, what should I use?
Gabriele Cirulli
  • 9,534
  • 23
  • 65
  • 97
21
votes
3 answers

Embedding a Pygame window into a Tkinter or WxPython frame

A friend and I are making a game in pygame. We would like to have a pygame window embedded into a tkinter or WxPython frame, so that we can include text input, buttons, and dropdown menus that are supported by WX or Tkinter. I have scoured the…
AHuman
  • 1,551
  • 3
  • 15
  • 26
20
votes
1 answer

wxPython StaticText Widget Font

How do I set the font on a wxPython StaticText widget?
rectangletangle
  • 42,965
  • 86
  • 186
  • 264
20
votes
4 answers

Modern GUI programming in Python 3.3

I am putting together a few programs, and it's about time to start making GUI's for some of them. The code is currently written in Python 3.3. I have researched a few GUI's for Python, namely Tkinter, wxPython and PyGTK. Everything I am finding…
Tennesseej
  • 379
  • 2
  • 3
  • 11
19
votes
7 answers

How to debug wxpython applications?

I'm trying wxpython for the first time. I've wrote a GUI for a python program and when I run it, it produces some error in the GUI, but the GUI disappears very quickly, quickly enough for me to be unable to read the error info. Is there any log that…
rogeriopvl
  • 42,645
  • 7
  • 51
  • 58
19
votes
1 answer

Dynamically change the choices in a wx.ComboBox()

I didn't find a better way to change the different choices in a wx.ComboBox() than swap the old ComboBox with a new one. Is there a better way? Oerjan Pettersen #!/usr/bin/python #20_combobox.py import wx import wx.lib.inspection class…
Orjanp
  • 9,551
  • 12
  • 33
  • 36