Questions tagged [wxpython]

152

votes
18

answer
160.6k

Views

Programmatically generate video or animated GIF in Python?

I have a series of images that I want to create a video from. Ideally I could specify a frame duration for each frame but a fixed frame rate would be fine too. I'm doing this in wxPython, so I can render to a wxDC or I can save the images to files, like PNG. Is there a Python library that will al...
FogleBird
83

votes
12

answer
236.3k

Views

How can I create a simple message box in Python?

I'm looking for the same effect as alert() in JavaScript. I wrote a simple web-based interpreter this afternoon using Twisted.web. You basically submit a block of Python code through a form, and the client comes and grabs it and executes it. I want to be able to make a simple popup message, without...
Carson Myers
78

votes
3

answer
89k

Views

Python - No handlers could be found for logger “OpenGL.error”

Okay, what is it, and why does it occur on Win2003 server, but not on WinXP. It doesn't seem to affect my application at all, but I get this error message when I close the application. And it's annoying (as errors messages should be). I am using pyOpenGl and wxPython to do the graphics stuff. Unfo...
Paige Watson
51

votes
11

answer
60.1k

Views

py2exe fails to generate an executable

I am using python 2.6 on XP. I have just installed py2exe, and I can successfully create a simple hello.exe from a hello.py. However, when I try using py2exe on my real program, py2exe produces a few information messages but fails to generate anything in the dist folder. My setup.py looks like thi...
Charles Anderson
43

votes
8

answer
41.7k

Views

wxPython for Python 3

Does wxPython have a version for Python 3? If it does, where can I get it?
Jijoy
41

votes
4

answer
183.3k

Views

How to stop a looping thread in Python?

What's the proper way to tell a looping thread to stop looping? I have a fairly simple program that pings a specified host in a separate threading.Thread class. In this class it sleeps 60 seconds, the runs again until the application quits. I'd like to implement a 'Stop' button in my wx.Frame to as...
pedram
41

votes
8

answer
56.4k

Views

Nice IDE with GUI designer for wxPython or Tkinter [closed]

I have a little experience developing small command-line applications with Python. I want to move on to developing GUIs with Python. From the available GUI toolkits for Python, the ones I feel the most inclined to are wxPython and Tkinter; but I don't want to code all of the GUI by myself all of the...
Alix Axel
36

votes
3

answer
43.9k

Views

wxPython vs PyQt vs PyGTK: when and what to use?

Need advise from those who have minimum health experience to design GUI interfaces with Python. When and what to choose depending of GUI complexity? Which GUI builders can we use to have a better development quality? This is my first GUI design, and I've did it without GUI builder, at the moment st...
31

votes
12

answer
24.3k

Views

How to create a Mac OS X app with Python?

I want to create a GUI application which should work on Windows and Mac. For this I've chosen Python. The problem is on Mac OS X. There are 2 tools to generate an '.app' for Mac: py2app and pyinstaller. py2app is pretty good, but it adds the source code in the package. I don't want to share the code...
Cristian Ciocău
30

votes
4

answer
16.7k

Views

How can I hide the console window when freezing wxPython applications with cxFreeze?

I'm developing a Python application using wxPython and freezing it using cxFreeze. All seems to be going fine apart from this following bit: When I run the executable created by cxFreeze, a blank console window pops up. I don't want to show it. Is there any way I could hide it? It doesn't seem to b...
28

votes
4

answer
36.5k

Views

A good wxpython GUI builder?

Is there a good wxpython GUI builder that does not require much coding, like in the case of the form builder in MS visual studio ?
Nataly
27

votes
8

answer
23.8k

Views

Quick and easy: trayicon with python?

I'd just need a quick example on how to easily put an icon with python on my systray. This means: I run the program, no window shows up, just a tray icon (I've got a png file) shows up in the systray and when I right-click on it a menu appears with some options (and when I click on an option, a func...
27

votes
2

answer
23.9k

Views

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?
aitchnyu
26

votes
2

answer
39.1k

Views

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 clicked retrieves data from MySQL, I am wanting to change...
RailsSon
26

votes
2

answer
14.2k

Views

Is it possible to pass arguments into event bindings?

I haven't found an answer elsewhere and this doesn't appear to have been asked yet on SO. When creating an event binding in wxPython, is it possible to pass additional arguments to the event? For example, this is the normal way: b = wx.Button(self, 10, 'Default Button', (20, 20)) self.Bind(wx.EVT_BU...
crystalattice
25

votes
2

answer
9.1k

Views

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 py2exe -p lxml and I did not get the above error but a...
jack the lesser
25

votes
5

answer
15.9k

Views

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
24

votes
6

answer
32.8k

Views

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 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) [GCC 4.2.1 (Apple Inc....
David Matuszek
23

votes
7

answer
18.5k

Views

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

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 new projects ? Or would you recommand adopting Qt,...
19

votes
6

answer
36.1k

Views

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 0: ordinal not in range(128) The original string (assum...
jsnjack
18

votes
7

answer
6.3k

Views

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 I can check for the error message? (I'm running Ma...
rogeriopvl
18

votes
6

answer
15.2k

Views

Undefined variable from import when using wxPython in pydev

I just downloaded wxPython, and was running some of the sample programs from here. However, on every line that uses a variable from wx.*, I get a 'Undefined variable from import error' For example, the following program generates five errors on lines 1,4,8, and two on line 5: import wx class MyFrame...
Bibendum
18

votes
3

answer
17.8k

Views

DLL load failed: 1% is not valid win32 application

import wx Traceback (most recent call last): File '', line 1, in import wx File 'C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\__init__.py', line 45, in from wx._core import * File 'C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py', line 4, in import _core_ ImportError: DLL load...
user1209152
18

votes
6

answer
22.9k

Views

wxPython: Calling an event manually

How can I call a specific event manually from my own code?
Ram Rachum
18

votes
6

answer
13k

Views

WxPython Incompatible With Snow Leopard?

Recently I upgraded to Snow Leopard, and now I can't run programs built with wxPython. The errors I get are (from Eclipse + PyDev): import wx File '/var/tmp/wxWidgets/wxWidgets-13~231/2.6/DSTROOT/System/Library/Frameworks /Python.framework/Versions/2.6/Extras/lib/ python/wx-2.8-mac-unicode/wx/__ini...
Alex
17

votes
8

answer
11k

Views

Selecting GUI on windows (wxPy vs pyQt)

We are planning to develop an application for monitoring and configuring our service (which is running on remote server). After long time of discussion, we decided for python as platform for our app, because we love and know python. But we don't know, what GUI toolkit preferred for our aims. We need...
Golovko
17

votes
2

answer
23.2k

Views

Still no wxPython for Python 3 (or 3.3) yet? [closed]

I wanted to start working with wxPython, but I found out that it isn't updated for Python 3. I'm using the newest verion of Python, 3.3 that is. So I started looking on the web and found some people who said there wasn't, but these threads were like 3 years old. So my question: Is there still no wxP...
PenguinCake
17

votes
5

answer
22k

Views

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 pause and resume the thread. I looked in the python...
jimbo
16

votes
1

answer
21.3k

Views

wxPython StaticText Widget Font

How do I set the font on a wxPython StaticText widget?
rectangletangle
15

votes
4

answer
24.9k

Views

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 seems to only create GUI's that look fairly archaic. I...
Tennesseej
15

votes
1

answer
20.5k

Views

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 MyFrame(wx.Frame): def __init__(self, *args, **kwargs): wx.Frame...
Orjanp
15

votes
2

answer
8.3k

Views

In wxPython how do you bind a EVT_KEY_DOWN event to the whole window?

I can bind an event to a textctrl box np. The problem is I have to be clicked inside of the textctrl box to 'catch' this event. I am hoping to be able to catch anytime someone presses the Arrow keys while the main window has focus. NOT WORKING: wx.EVT_KEY_DOWN(self, self.OnKeyDown) WORKING: self...
ril3y
15

votes
3

answer
10.9k

Views

Platform independent tool to copy text to clipboard

I am trying to write a function that copies a string parameter to the clipboard. I intend to use this in a Python script that I've been working on. This is what I have so far (found most this snippet on another stack overflow post): from tkinter import Tk def copy_to_clipboard(text): text = str(text...
aonbyte
14

votes
1

answer
4.4k

Views

Focus-follows-mouse in wxPython?

I'm developing an application that contains a number of panes. See the screenshot: The left settings pane is a wx.ScrolledPanel that contains a number of wx.Panels. The top events pane is a wx.grid.Grid. The bottom data pane is a wx.Panel that contains a wx.grid.Grid. The middle plot pane is a wx.Pa...
Bas van Dijk
14

votes
3

answer
20.2k

Views

Change the colour of a StaticText, wxPython

I need to make a StaticText red, what should I use?
Gabriele Cirulli
14

votes
5

answer
24.8k

Views

What is the best real time plotting widget for wxPython?

I would like to show a real time graph with one or two curves an up to 50 samples per second using Python and wxPython. The widget should support both Win32 and Linux platforms. Any hints are welcome. Edited to add: I don't need to update the display at 50 fps, but up need to show up to 50 samples...
Ber
14

votes
5

answer
4.5k

Views

3D/4D graphics with Python and wxPython?

In my day job as a PhD student, I do geological modeling. In my spare time (mainly for fun), I am learning Python and trying to write a simple program to view 3D geocellular models. geological model http://img710.imageshack.us/img710/6503/sgems.png geo model2 http://img638.imageshack.us/img638/529/1...
Flux Capacitor
13

votes
5

answer
33.9k

Views

Notebook widget in Tkinter

Having played around a little with both Tkinter and wxPython, I like Tkinter much better in terms of how clean my source code looks. However, it doesn't seem to have as many features; in particular it doesn't have tabs (as in, the tabs at the top of a Firefox window). A little Googling on the subje...
Eli Courtwright
12

votes
3

answer
5.3k

Views

When is “self” required?

I have been using classes for only a short while and when I write a method, I make all variables reference self, e.g. self.foo. However, I'm looking through the wxPython in Action book and notice that 'self' isn't used all the time. For example: import wx class TextFrame(wx.Frame): def __init__(self...
crystalattice
12

votes
2

answer
16.2k

Views

wxPython WebView example

I am writing a small reporting app using wxPython (wxAUI). I want to render my data as HTML, to be displayed in a WebView 'widget'. I am looking for a sample 'hello world' snippet that will show how to display/render an HTML string in a WebView widget - but have been unable to find a single example...