wxpython

Animating Matplotlib panel - blit leaves old frames behind

烈酒焚心 提交于 2019-12-31 01:53:26
问题 I have a wxPython application which contains a matplotlib panel (courtesy of wxmpl, though I've seen the same with a plain FigureCanvasWxAgg canvas). I'd want to animate one of the plots in the panel, and in the past I've made similar things happen. The way I'm doing it is the suggested: copy the background plot [...] restore background update line data draw artist blit The problem is that the plots, instead of being "overwritten" by the background restoring, stay there and the whole things

ScrolledPanel with vertical scrollbar only and WrapSizer

给你一囗甜甜゛ 提交于 2019-12-30 10:22:55
问题 I uses a WrapSizer in order to have an automatic layout (as thumbnail gallery) like this (see screenshot on the left ) : I would like that if there are two many elements, a (vertical only)- ScrollBar is added on the panel (see right screenshot). How to add such a vertical scrollbar to a panel using a WrapSizer? I tried by mixing WrapSizer and ScrolledPanel , but I cannot get the desired layout. class MyPanel(scrolled.ScrolledPanel): def __init__(self, parent): scrolled.ScrolledPanel.__init__

ScrolledPanel with vertical scrollbar only and WrapSizer

拟墨画扇 提交于 2019-12-30 10:22:48
问题 I uses a WrapSizer in order to have an automatic layout (as thumbnail gallery) like this (see screenshot on the left ) : I would like that if there are two many elements, a (vertical only)- ScrollBar is added on the panel (see right screenshot). How to add such a vertical scrollbar to a panel using a WrapSizer? I tried by mixing WrapSizer and ScrolledPanel , but I cannot get the desired layout. class MyPanel(scrolled.ScrolledPanel): def __init__(self, parent): scrolled.ScrolledPanel.__init__

ScrolledPanel with vertical scrollbar only and WrapSizer

倾然丶 夕夏残阳落幕 提交于 2019-12-30 10:22:30
问题 I uses a WrapSizer in order to have an automatic layout (as thumbnail gallery) like this (see screenshot on the left ) : I would like that if there are two many elements, a (vertical only)- ScrollBar is added on the panel (see right screenshot). How to add such a vertical scrollbar to a panel using a WrapSizer? I tried by mixing WrapSizer and ScrolledPanel , but I cannot get the desired layout. class MyPanel(scrolled.ScrolledPanel): def __init__(self, parent): scrolled.ScrolledPanel.__init__

How to capture output of a shell script running in a separate process, in a wxPython TextCtrl?

老子叫甜甜 提交于 2019-12-30 07:42:27
问题 A long running shell script produces stdout and stderr, which I would like to show on a textctrl in a GUI. This is possible using threading and separating the GUI thread from the shell script's thread. However when I implement multiprocessing, I hit a roadblock. Here's my -stripped down- code: #!/usr/bin/env python import wx import sys, subprocess from multiprocessing import Process, Queue from Queue import Empty class MyFrame(wx.Frame): def __init__(self, *args, **kwds): wx.Frame.__init__

Unable to use wx.NotificationMessage properly with wxPython

那年仲夏 提交于 2019-12-30 06:33:21
问题 I recently upgraded to the development release of wxPython (wxPython 2.9.2.4) since I needed the functionality of wx.NotificationMessage within my application. I have been trying unsuccessfully to create notification bubbles on certain user events due to something I think might be a possible bug. Before submitting such bug, I wanted to go ahead and ask the people of the mailing list what they think might be the problem and hopefully find a solution from within my code. Here is the code I have

PyInstaller very big file size

╄→гoц情女王★ 提交于 2019-12-30 04:38:08
问题 I've made simple code editor using wxPython. File size (python files) is 1.3 KB. But when I create executable using PyInstaller, I get 30 MB file ! Is there a way to decrease file size? Btw, I am not importing whole wx library, only components I need (ex from wx import Frame ). Using Linux, Fedora 18 64bit. 回答1: wxPython is a big library so when you create an executable, they tend to end up being between 20 and 30 MB. Also note that Python itself is kind of bulky because Python is an

How to get the width of a string in pixels?

你。 提交于 2019-12-30 04:28:06
问题 I am using wxPython's HyperTreeList and I want to set the column width exactly equal to length of the largest string in it. To accomplish that, I'd like to to convert a python string size into pixels. For Example: If we have a string like str = "python" len(str) = 6 How could I convert the above string length/size into pixels? Is there another way? 回答1: You'll have to do something like (see the documentation of wxWidgets for more info) f = window.GetFont() dc = wx.WindowDC(window) dc.SetFont

Auto-Completion In wxPython wxComboBox

此生再无相见时 提交于 2019-12-29 07:37:27
问题 I've been trying to make a ComboBox which would suggest options as you type, much like an IDE's code suggestions/code-sense, or googles suggestions when you type in a search. The suggestions would be the items from the ComboBox dropdown, which contained the substring typed in the text box of the ComboBox. I've tried to make a ComboBox do it, with no luck, I've tried the masked ComboBoxes, and have even tried to subclass the ComboCrtl, but I've always run into troubles either performance wise

Install wxPython on Mac os Mavericks

浪尽此生 提交于 2019-12-29 05:21:07
问题 I am on a Macbook Air, running Mavericks. Today I downloaded wxPython via their website, however, when I click on the install package I get: wxPython3.0-osx-cocoa-py2.7.pkg” is damaged and can’t be opened. You should eject the disk image. Anyone have any ideas to get around this, thanks. 回答1: According to #14523, the problem is that the package is not signed (and it's an old-style package, which isn't fully supported anymore, which is why you get the wrong error message, and the usual