wxpython

Python - Polymorphism in wxPython, What's wrong?

喜欢而已 提交于 2020-01-05 10:26:55
问题 I am trying to write a simple custom button in wx.Python. My code is as follows, an error is thrown on line 19 of my "Custom_Button.py" - What is going on? I can find no help online for this error and have a suspicion that it has to do with the Polymorphism. (As a side note: I am relatively new to python having come from C++ and C# any help on syntax and function of the code would be great! - knowing that, it could be a simple error. thanks!) Error def __init__(self, parent, id=-1, NORM_BMP,

wxpython threading display images as they are loaded

筅森魡賤 提交于 2020-01-05 09:12:55
问题 I am writing a GUI to display a few images (book covers from amazon) from a defined list of URLs, I have been able to load them in a panel successfully, but in spite of using threads, the GUI seems to wait till all the loop is over and then all the images show up at once, how can I achieve the GUI to display each images as they are fetched run time..the GUI is basically frozen till the images are fetched...Thanks! the question again is to ensure I get to display each image on the GUI as they

What's needed to get BeautifulSoup4+lxml to work with cx_freeze?

怎甘沉沦 提交于 2020-01-05 08:51:50
问题 Summary: I have a wxPython/bs4 app that I'm building into an exe with cx_freeze. There build succeeds with no errors, but trying to run the EXE results a FeatureNotFound error from BeautifulSoup4. It's complaining that I don't have my lxml library installed. I've since stripped the program down to it's minimal state and still get the error. Has anyone else had success building a bs4 app with cx_freeze? Please take a look at the details below and let me know of any ideas you may have. Thanks,

What's needed to get BeautifulSoup4+lxml to work with cx_freeze?

强颜欢笑 提交于 2020-01-05 08:51:09
问题 Summary: I have a wxPython/bs4 app that I'm building into an exe with cx_freeze. There build succeeds with no errors, but trying to run the EXE results a FeatureNotFound error from BeautifulSoup4. It's complaining that I don't have my lxml library installed. I've since stripped the program down to it's minimal state and still get the error. Has anyone else had success building a bs4 app with cx_freeze? Please take a look at the details below and let me know of any ideas you may have. Thanks,

wxPython: text alignment does not work

一曲冷凌霜 提交于 2020-01-05 08:45:13
问题 For some reasons the wx.ALIGN_* does not align anything on Ubuntu, while it works on Mac OS X: self.static_text = wx.StaticText(self, -1, 'hello, world', pos=(0,0), size=(300,30), style=wx.ALIGN_CENTER) Any idea, what could it be? Update: This was tried with wxPython 2.8.12.1 on Mac OS X 10.7.2. wxPython 2.8.11.0 on Ubuntu 11.10. Update 2: Does not work either on Debian 6.0.3 with wxPython 2.8.12.1 Update 3: All of the above was tested with Python 2.6 回答1: I have test this code snippet in Win

OK/CANCEL order in “custom” dialogs created with wxglade

核能气质少年 提交于 2020-01-05 08:09:25
问题 I've noticed that standard dialogs some CANCEL and OK buttons in different order under Windows and under Linux. Under Linux, you get "[CANCEL] [OK]", and under Windows, "[OK] [CANCEL]". I have no problem with the standard dialogs, but then my "custom dialogs" must be tweaked to match the same order, dependent of the O.S. My doubts: 1.- It seems to exist a class called wx.StdDialogButtonSizer , but I'm not sure how it should be used. Can somebody post any working simple / working example? And

OK/CANCEL order in “custom” dialogs created with wxglade

时光毁灭记忆、已成空白 提交于 2020-01-05 08:07:42
问题 I've noticed that standard dialogs some CANCEL and OK buttons in different order under Windows and under Linux. Under Linux, you get "[CANCEL] [OK]", and under Windows, "[OK] [CANCEL]". I have no problem with the standard dialogs, but then my "custom dialogs" must be tweaked to match the same order, dependent of the O.S. My doubts: 1.- It seems to exist a class called wx.StdDialogButtonSizer , but I'm not sure how it should be used. Can somebody post any working simple / working example? And

“wxPython in Action” book program works direct but not from notepad++

自古美人都是妖i 提交于 2020-01-05 07:58:26
问题 Im following the book "wxPython in Action" and it gives the example below when I run the program from my "notepad++" I get a pile of errors (see bottom) however when I run the program direct by double clicking it works! just tried "Idle" - it works! Any points please! Cheers #!/usr/bin/env python """Hello, wxPython! program.""" import wx class Frame(wx.Frame): """Frame class that displays an image.""" def __init__(self, image, parent=None, id=-1, pos=wx.DefaultPosition, title='Hello, wxPython

“wxPython in Action” book program works direct but not from notepad++

霸气de小男生 提交于 2020-01-05 07:58:14
问题 Im following the book "wxPython in Action" and it gives the example below when I run the program from my "notepad++" I get a pile of errors (see bottom) however when I run the program direct by double clicking it works! just tried "Idle" - it works! Any points please! Cheers #!/usr/bin/env python """Hello, wxPython! program.""" import wx class Frame(wx.Frame): """Frame class that displays an image.""" def __init__(self, image, parent=None, id=-1, pos=wx.DefaultPosition, title='Hello, wxPython

How do I make Find dialog use selections instead of SetStyles?

帅比萌擦擦* 提交于 2020-01-05 06:56:50
问题 How do I make my text editor's Find function use selections instead of SetStyles? It's interfering with the Lexer and the self.tc.SetLexer(stc.STC_LEX_NULL) in this question. I don't wanna use SetStyles because I feel like it will interfere with other SetStyles in the future, so I wanna use selections instead, how do I do this? PS: I am using Windows Link to whats happening: imgur.com/a/oeLImVQ Code: import wx import wx.stc as stc import keyword class MyFrame(wx.Frame): def __init__(self,