wxpython

Cannot install wxPython on macOS Sierra

依然范特西╮ 提交于 2019-12-19 09:19:25
问题 The package I downloaded was wxPython3.0-osx-cocoa-py2.7.dmg from https://sourceforge.net/projects/wxpython. I clicked on the file but got the following message at the end of the failed installation: The Installer could not install the software because there was no software found to install. I followed the steps by memoselyk on Install wxPython in osx 10.11 but got the following message after calling the command in step 3 in the Terminal: pkgbuild: error: output path "wxPython3.0-osx-cocoa

Problem deploying Python program (packaged with py2exe)

a 夏天 提交于 2019-12-19 04:57:09
问题 I have a problem: I used py2exe for my program, and it worked on my computer. I packaged it with Inno Setup (still worked on my computer), but when I sent it to a different computer, I got the following error when trying to run the application: "CreateProcess failed; code 14001." The app won't run. (Note: I am using wxPython and the multiprocessing module in my program.) I googled for it a bit and found that the the user should install some MS redistributable something, but I don't want to

wxpython 3.0 breaks older apps? (locale error)

回眸只為那壹抹淺笑 提交于 2019-12-19 03:09:43
问题 I had an app that was working properly with old verions of wxpython Now with wxpython 3.0, when trying to run the app, I get the following error File "C:\Python27\lib\site-packages\wx-3.0-msw\wx\_controls.py", line 6523, in __init__ _controls_.DatePickerCtrl_swiginit(self,_controls_.new_DatePickerCtrl(*args, **kwargs)) wx._core.PyAssertionError: C++ assertion "strcmp(setlocale(LC_ALL, NULL), "C") == 0" failed at ..\..\src\common\intl.cpp(1449) in wxLocale::GetInfo(): You probably called

How to tweak my tooltips in wxpython?

会有一股神秘感。 提交于 2019-12-19 02:52:07
问题 I was trying to add a tooltip to show the full content of a truncated ObjectListView, until it turned out it had such a feature built-in: I tried making my own tool tips using wx.TipWindow, wx.PopupWindow and SuperToolTip, but none of them looked as 'native' as this one. While I'm aware of this wiki article that supposedly enables the tooltip for truncated wx.Listrctrls, I didn't really understand how to get it working. I also expect that it only works when something is truncated, whereas I'd

How do I debug a py2exe 'application failed to initialize properly' error?

二次信任 提交于 2019-12-19 02:19:13
问题 I'm very new to Python in general, but I made an app in Python 2.6 / wxPython 2.8 that works perfectly when I run it through Python. But I wanted to go a step further and be able to deploy it as a Windows executable, so I've been trying out py2exe. But I haven't been able to get it to work. It would always compile an exe, but when I actually try to run that it barks some cryptic error message. At first they were simple messages saying it couldn't find certain DLLs, but even after giving it

wxpython icon for task bar

人走茶凉 提交于 2019-12-18 16:57:33
问题 I am trying to set an icon in my wxpython program. So far, after reading many pages and examples, I was able to set an icon at the window, which also works when using alt+tab (I'm working over Windows 7). But the icon at task bar is the usual python default icon. I don't understand why are there so many troubles for such a simple task. Here is my code: class GraphFrame(wx.Frame): """ The main frame of the application """ title = 'My first wxprogram' def __init__(self): wx.Frame.__init__(self,

Python and Matplotlib and Annotations with Mouse Hover

♀尐吖头ヾ 提交于 2019-12-18 12:09:06
问题 I am currently employing this code to have pop up annotatations on a map when i click on a point in a Basemap Matplotlib Plot. dcc = DataCursor(self.figure.gca()) self.figure.canvas.mpl_connect('pick_event',dcc) plot_handle.set_picker(5) self.figure.canvas.draw() class DataCursor(object): import matplotlib.pyplot as plt text_template = 'x: %0.2f\ny: %0.2f' x, y = 0.0, 0.0 xoffset, yoffset = -20 , 20 text_template = 'A: %s\nB: %s\nC: %s' def __init__(self, ax): self.ax = ax self.annotation =

wxPython: Items in BoxSizer don't expand horizontally, only vertically

删除回忆录丶 提交于 2019-12-18 12:04:11
问题 I have several buttons in various sizers and they expand in the way that I want them to. However, when I add the parent to a new wx.BoxSizer that is used to add a border around all the elements in the frame, the sizer that has been added functions correctly vertically, but not horizontally. The following code demonstrates the problem: #! /usr/bin/env python import wx import webbrowser class App(wx.App): def OnInit(self): frame = MainFrame() frame.Show() self.SetTopWindow(frame) return True

How to resize and draw an image using wxpython?

 ̄綄美尐妖づ 提交于 2019-12-18 11:53:16
问题 I want to load an image, resize it to a given size and after draw it in a specific position in a panel. All this using wxpython. How can I do it? Thanks in advance! 回答1: wx.Image has a Scale method that will do the resizing. The rest is normal wx coding. Here's a complete example for you. import wx def scale_bitmap(bitmap, width, height): image = wx.ImageFromBitmap(bitmap) image = image.Scale(width, height, wx.IMAGE_QUALITY_HIGH) result = wx.BitmapFromImage(image) return result class Panel(wx

How to detect motion between two PIL images? (wxPython webcam integration example included)

久未见 提交于 2019-12-18 10:29:47
问题 Does anyone have any suggestions as to how I might do image comparison in python to detect changes within an image? I'm currently working on an app that will monitor my area with my webcam, I would like to figure out how to compare the images taken each frame to see if any motion has been detected. In the long run I would like to setup a sensitivity slider so if you are able to guide me in the direction I'm sure I can figure the rest out. As I have seen a few posts on here asking about