wxpython

got “libatk-1.0.so.0: undefined symbol” when I tried ipython --pylab in Ubuntu 13.10

微笑、不失礼 提交于 2019-12-23 01:58:26
问题 I am currently using Ubuntu 13.10 and applied all the system updates. I have installed the Enthought Canopy (Version: 1.1.1.1452). And today when I tried to plot, I got nothing. After googling, I have run 'ipython --pylab' in command line but got the following message: Matplotlib backend_wx and backend_wxagg require wxPython >=2.8 I could get into the interactive ipython shell but I still couldn't plot. Then I follow the tips from user forum and I tried 'import wx' and got: /usr/lib/x86_64

Look of the app - Py2exe / wxPython

Deadly 提交于 2019-12-22 18:38:20
问题 So my problem is the look and feel from my application, as it looks like an old look app. It is an wxPython application, and on python it runs fine and looks fine, but when I convert it to .exe using py2exe, the look is just bad. Now I know that if you are using XP you need some manifest to correct it but I am in other circumstances. I'm using Windows 7, and I'm using Python 2.6 (Yes, I am including the DLL's and the Microsoft.VC90.CRT.manifest). So my question is how can I solve this under

wx.TreeCtrl drag and drop, copy and move

∥☆過路亽.° 提交于 2019-12-22 18:20:09
问题 I'm trying to implement drag and drop on a wx.TreeCtrl and I need to handle both "copy" and "move" operations (if the user keeps CTRL pressed). First of all, I searched the wiki for an example and I'm confused as to which method to use.. Should I use DropSource/DropTarget or just handle EVT_TREE_BEGIN_DRAG and EVT_TREE_END_DRAG? If the latter, how can I tell if the user is requesting a "move" operation? (wxPython 2.8.9.1 on Ubuntu Jaunty) 回答1: Reading the relevant paragraph from Cross

Implement “Save as” in save dialog wxpython

旧街凉风 提交于 2019-12-22 18:12:43
问题 I have a saving routine that should prompt the user in the following way: If the currently selected file name exists, prompt for overwrite If the currently selected file name is empty (i.e. ""), set up a dialog to ask user to insert file name If the currently selected file name does not exist, save it! My code is currently like below, but I feel like there should be a better way of doing this. As it is now the user is prompted with a dialog with choices "Yes, No, Cancel", but I would want it

Python: Calling method A from class A within class B?

ⅰ亾dé卋堺 提交于 2019-12-22 17:55:36
问题 There are a number of questions that are similar to this, but none of the answers hits the spot - so please bear with me. I am trying my hardest to learn OOP using Python, but i keep running into errors (like this one) which just make me think this is all pointless and it would be easier to just use methods. Here is my code: class TheGUI(wx.Frame): def __init__(self, title, size): wx.Frame.__init__(self, None, 1, title, size=size) # The GUI is made ... textbox.TextCtrl(panel1, 1, pos=(67,7),

wxpython ogl package drag event

微笑、不失礼 提交于 2019-12-22 14:59:30
问题 I'm testing the ogl package in wxpython. I want to drag a shape. And when I do drag it, I want a second shape to move at the same time. The problem is that I have not found a move/drag event. Only pre and post move events. The only solution I can think of is to hide the second shape, and redraw it at the new position when the dragging is done. And is the ogl package no longer maintained? Oerjan Pettersen 回答1: OGL was part of the contrib directory in wxWidgets up until version 2.8; contrib has

wxWidgets: How to catch left-click on wxListCtrl?

一曲冷凌霜 提交于 2019-12-22 12:54:20
问题 I want to add checkboxes to a wxListCtrl, and this works fine except there doesn't appear to be an EVT_LIST_ITEM_CLICK or EVT_LIST_ITEM_LEFT_CLICK event to catch when the mouse is clicked on the item so the image can be toggled. There are events for right and middle click, just not left click - which means you have to middle or right click to tick/untick the items in the list. Does anyone know whether there is a left-click event you can use? I tried the item selected and item activated events

Auto wrap and newlines in wxPython grid

感情迁移 提交于 2019-12-22 10:43:45
问题 I want to implement a grid with the cells that have the following behaviour: cell text should be wrapped if it doesn't fit to the cell newlines (\n) in the cell text should be processed as well i.e. the same behaviour as in table editors like MS Excel, OO Calc, etc. when you enable the 'wrap words' option for cells. I'm trying to do this as follows: import wx import wx.grid class MyGrid(wx.grid.Grid): def __init__(self, parent = None, style = wx.WANTS_CHARS): wx.grid.Grid.__init__(self,

How to make something like a log box in wxPython

a 夏天 提交于 2019-12-22 05:57:13
问题 I'm assuming this is possible with a multiline text box, but not sure how to do it. What I'm looking to do is make a log box in my wxPython program, where I can write messages to it when certain actions happen. Also, i need to write the messages not only when an event happens, but certain times in the code. How would i get it to redraw the window so the messages appear at that instant? 回答1: I wrote an article on this sort of thing a couple years ago: http://www.blog.pythonlibrary.org/2009/01

Mouse Events of WxPython TaskBarIcon on Mac OSX are not triggering

你说的曾经没有我的故事 提交于 2019-12-22 04:12:43
问题 We are using TaskBarIcon of WxPython 2.9 on Mac OSX 10.8.5 , currently we have a requirement to grab all Left, Right and Double Click Events when user clicks on TaskBarIcon of our Application. The problem we are having is that these events are not being triggered. Any help in this regard would be much appreciable. This is the code we are using import os import sys import wx __author__ = 'Ammar Hasan' CURRENT_ABSOLUTE_PATH = os.path.dirname(sys.argv[0]) TRAY_ICON = CURRENT_ABSOLUTE_PATH + "