Search Results

Search found 203 results on 9 pages for 'wxpython'.

Page 1/9 | 1 2 3 4 5 6 7 8 9  | Next Page >

  • High Usage of RAM by wxPython's GUI and need some advice to reduce it

    - by user67024
    I've recently developed a GUI in wxPython for windows platform. It contains a five tabs, 4 of them are just richTextCtrl boxes and the other one has controls for uploading files, buttons, textctrls, a slider etc.. As I was new to GUI development in Python, I used wxFormBuilder to generate some of the code using a good amount of sizers. So, now the problem is that the GUI starts off with a initial memory of around 40MB which is too much for such a simple application (Or so I think) . Also, when the functions handling the functions use huge lists as the program is for debugging large data logs and identifying the problems in'em implying that I can't afford memory for GUI. So, how can I reduce that start working memory size? Is it a general issue in wxPython? And currently trying use profilers but not sure if it's going to help.

    Read the article

  • Easy_install of wxpython has "setup script" error.

    - by vgm64
    I have an install of python 2.5 that fink placed in /sw/bin/. I use the easy install command sudo /sw/bin/easy_install wxPython to try to install wxpython and I get an error while trying to process wxPython-src-2.8.9.1.tab.bz2 that there is not setup script. Easy-install has worked for several other installations until this one. Any help on why it's busting now? EDIT: The error occurs before dumping back to shell prompt. Reading http://wxPython.org/download.php Best match: wxPython src-2.8.9.1 Downloading http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.9.1.tar.bz2 Processing wxPython-src-2.8.9.1.tar.bz2 error: Couldn't find a setup script in /tmp/easy_install-tNg6FG/wxPython-src-2.8.9.1.tar.bz2

    Read the article

  • Need Help with wxPython & pyGame

    - by Xavier
    Hi Guys, I'm actually in need of your help and advice here on my assignment that I am working on. First of all, I was task to do a program that runs langton's ant simulation. For that, I've managed to get the source code (from snippets.dzone.com/posts/show/5143) and edited it accordingly to my requirements. This was done and ran in pygame module extension. In addition, my task requires a GUI to interface for users to run and navigate through the screens effectively with the langton's ant program running. I used wxPython with the help of an IDE called BOA constructor to create the frames, buttons, textboxes, etc. Basically, all the stuff needed in the interfaces. However, I've ran into some problems listed below: Found problem integrating pyGame with wxPython. On this note, I've research the internet for answers and tutorials where I found out from website: wiki.wxpython.org/IntegratingPyGame & aspn.activestate.com/ASPN/Mail/Message/wxpython-users/3178042. I understand from the sites that integrating pyGame with wxPython will be a difficult task where it has caused common problems like the inability to placing other controls into the frames as the pyGame application will cover the entire panel. I really hope that you can clarify my doubts on this and advise me on the path that I should take from here. Therefore, I ask the following questions: Is it feasible to integrate pyGame with wxPython? If it is not feasible to integrate pyGame with wxPython, what other alternatives do I have to create a GUI interface integrating pyGame into it. If so how do I go about? If it is possible to go about integrating pyGame with wxPython, how do I go about doing so? Really need you guys opinion on this.

    Read the article

  • Configuring Eclipse with wxPython

    - by Alex
    Hi, I've been browsing documentation, but haven't been able to find a straightforward tutorial, so I apologize if this is a really simple question. Anyway, I have eclipse with pydev installed on MAC OSX, and I want configure wxPython to work with eclipse, how do I do this? Once I've downloaded wxpython, what steps do I take to allow wxPython development from eclipse? Thanks!

    Read the article

  • Python: wxpython wx.media.MediaCtrl - millisecond seek capability

    - by PPTim
    I've been searching for a media player that can display sub-second resolution in videos. Some pointed me to the Frame stepping functionality in MPC, but I'd like even more than that. I know from previous experience with wxPython that the wx.media.MediaCtrl both displays and (as fast as i can click with the mouse anyway) stops the video with millisecond-precision. The code is here, and runs no-problem with python +wxpython module. Has anyone come across other video players that handle this functionality, or has seen a more robust/developed video player written with wxPython that allows for this level of precision? This is possibily a one-off task so I'd like to use existing solutions if possible. Thanks.

    Read the article

  • How to use py2exe icon_resources in wxPython application?

    - by Soviut
    I have a wxPython application I'm bundling into an exe using py2exe. I've defined an icon in the setup.py file using the following: setup( windows=[ { 'script': 'myapp.py', 'icon_resources': [(1, 'myicon.ico')] }, ], ) This works, but I'd like to be able to access that icon from my wxPython application and use it as the window icon that appears in the top right. Currently I'm using the following to load the icon from the file system: icon = wx.Icon('myicon.ico', wx.BITMAP_TYPE_ICO, 16, 16) self.SetIcon(icon) Which works, but requires that the icon sit beside the EXE, rather than bundled inside it.

    Read the article

  • Should I mix wxpython and pyobjc ?

    - by Anurag Uniyal
    I have a wxPython based app which I am porting to Mac OS X, in that I need to show some alerts which should look like native mac alerts, so I am using pyobjc for that e.g. import Cocoa import wx app = wx.PySimpleApp() frame = wx.Frame(None, title="mac alert test") app.SetTopWindow(frame) frame.Show() def onclick(event): Cocoa.CFUserNotificationDisplayAlert(0, 3, 0, 0, 0, "Should i mix wxpython and objc", "hmmm...", "Cool", "Not Cool", "Whatever") frame.Bind(wx.EVT_LEFT_DOWN, onclick) app.MainLoop() Is there any thing wrong in such mixing of wx and objc code, any failure points ?

    Read the article

  • Drag button between panels in wxPython.

    - by Orjanp
    Does anyone know of an example where it is shown how to drag a button from one panel to another in wxPython? I have created a bitmap button in a panel, and I would like to be able to drag it to a different panel and drop I there. I haven't found any examples using buttons, just text and files. I am using the latest version of Python and wxPython.

    Read the article

  • Automatically adjustment of wxPython Frame Size

    - by MA1
    Hi All How to adjust the wxPython Frame Size automatically when screen resolution change? Actually, i have just written a wxPython application, currently Frame size is fixed. Due to this application/frame size is very large on some screen resolutions. So, how to resize/adjust automatically depending on the screen resolution size? Regards,

    Read the article

  • Undefined variable from import when using wxPython in pydev

    - by Bibendum
    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(wx.Frame): """ We simply derive a new class of Frame. """ def __init__(self, parent, title): wx.Frame.__init__(self, parent, title=title, size=(200,100)) self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE) self.Show(True) app = wx.App(False) frame = MyFrame(None, 'Small editor') app.MainLoop() The program, however, compiles and runs perfectly. I haven't made any significant modifications to pydev or eclipse, and the wxPython install is fresh.

    Read the article

  • wxPython: Sending a signal to several widgets

    - by cool-RR
    I am not even sure how to ask this question. I want something that is like the wxPython event system, but a bit different. I'll try to explain. When there is a certain change in my program (a "tree change", never mind what that is,) I want to send a signal to all the widgets in my program, notifying them that a "tree change" has occurred, and they should change their display in response. How do I do this? It sounds a little bit like wxPython events, but not really, since events don't spread to all widgets, as far as I know. What would be a good way to do this?

    Read the article

  • Python - wxPython What's wrong?

    - by Wallter
    I am trying to write a simple custom button in wx.Python. My code is as follows,(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 Traceback (most recent call last): File "D:\Documents\Python2\Button\src\Custom_Button.py", line 10, in <module> class Custom_Button(wx.PyControl): File "D:\Documents\Python2\Button\src\Custom_Button.py", line 13, in Custom_Button Mouse_over_bmp = wx.Bitmap(0) # When the mouse is over File "C:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\_gdi.py", line 561, in __init__ _gdi_.Bitmap_swiginit(self,_gdi_.new_Bitmap(*args, **kwargs)) TypeError: String or Unicode type required Main.py class MyFrame(wx.Frame): def __init__(self, parent, ID, title): wxFrame.__init__(self, parent, ID, title, wxDefaultPosition, wxSize(400, 400)) self.CreateStatusBar() self.SetStatusText("Program testing custom button overlays") menu = wxMenu() menu.Append(ID_ABOUT, "&About", "More information about this program") menu.AppendSeparator() menu.Append(ID_EXIT, "E&xit", "Terminate the program") menuBar = wxMenuBar() menuBar.Append(menu, "&File"); self.SetMenuBar(menuBar) self.Button1 = Custom_Button(self, parent, -1, "D:/Documents/Python/Normal.bmp", "D:/Documents/Python/Clicked.bmp", "D:/Documents/Python/Over.bmp", "None", wx.Point(200,200), wx.Size(300,100)) EVT_MENU(self, ID_ABOUT, self.OnAbout) EVT_MENU(self, ID_EXIT, self.TimeToQuit) def OnAbout(self, event): dlg = wxMessageDialog(self, "Testing the functions of custom " "buttons using pyDev and wxPython", "About", wxOK | wxICON_INFORMATION) dlg.ShowModal() dlg.Destroy() def TimeToQuit(self, event): self.Close(true) class MyApp(wx.App): def OnInit(self): frame = MyFrame(NULL, -1, "wxPython | Buttons") frame.Show(true) self.SetTopWindow(frame) return true app = MyApp(0) app.MainLoop() Custom Button import wx from wxPython.wx import * class Custom_Button(wx.PyControl): ############################################ ##THE ERROR IS BEING THROWN SOME WHERE IN HERE ## ############################################ # The BMP's Mouse_over_bmp = wx.Bitmap(0) # When the mouse is over Norm_bmp = wx.Bitmap(0) # The normal BMP Push_bmp = wx.Bitmap(0) # The down BMP Pos_bmp = wx.Point(0,0) # The posisition of the button def __init__(self, parent, NORM_BMP, PUSH_BMP, MOUSE_OVER_BMP, pos, size, text="", id=-1, **kwargs): wx.PyControl.__init__(self,parent, id, **kwargs) # Set the BMP's to the ones given in the constructor self.Mouse_over_bmp = wx.Bitmap(MOUSE_OVER_BMP) self.Norm_bmp = wx.Bitmap(NORM_BMP) self.Push_bmp = wx.Bitmap(PUSH_BMP) self.Pos_bmp = pos ############################################ ##THE ERROR IS BEING THROWN SOME WHERE IN HERE ## ############################################ self.Bind(wx.EVT_LEFT_DOWN, self._onMouseDown) self.Bind(wx.EVT_LEFT_UP, self._onMouseUp) self.Bind(wx.EVT_LEAVE_WINDOW, self._onMouseLeave) self.Bind(wx.EVT_ENTER_WINDOW, self._onMouseEnter) self.Bind(wx.EVT_ERASE_BACKGROUND,self._onEraseBackground) self.Bind(wx.EVT_PAINT,self._onPaint) self._mouseIn = self._mouseDown = False def _onMouseEnter(self, event): self._mouseIn = True def _onMouseLeave(self, event): self._mouseIn = False def _onMouseDown(self, event): self._mouseDown = True def _onMouseUp(self, event): self._mouseDown = False self.sendButtonEvent() def sendButtonEvent(self): event = wx.CommandEvent(wx.wxEVT_COMMAND_BUTTON_CLICKED, self.GetId()) event.SetInt(0) event.SetEventObject(self) self.GetEventHandler().ProcessEvent(event) def _onEraseBackground(self,event): # reduce flicker pass def _onPaint(self, event): dc = wx.BufferedPaintDC(self) dc.SetFont(self.GetFont()) dc.SetBackground(wx.Brush(self.GetBackgroundColour())) dc.Clear() dc.DrawBitmap(self.Norm_bmp) # draw whatever you want to draw # draw glossy bitmaps e.g. dc.DrawBitmap if self._mouseIn: # If the Mouse is over the button dc.DrawBitmap(self, self.Mouse_over_bmp, self.Pos_bmp, useMask=False) if self._mouseDown: # If the Mouse clicks the button dc.DrawBitmap(self, self.Push_bmp, self.Pos_bmp, useMask=False)

    Read the article

  • Python - Polymorphism in wxPython, What's wrong?

    - by Wallter
    I am trying to wright 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, PUSH_BMP, MOUSE_OVER_BMP, **kwargs): SyntaxError: non-default argument follows default argument Main.py class MyFrame(wx.Frame): def __init__(self, parent, ID, title): wxFrame.__init__(self, parent, ID, title, wxDefaultPosition, wxSize(400, 400)) self.CreateStatusBar() self.SetStatusText("Program testing custom button overlays") menu = wxMenu() menu.Append(ID_ABOUT, "&About", "More information about this program") menu.AppendSeparator() menu.Append(ID_EXIT, "E&xit", "Terminate the program") menuBar = wxMenuBar() menuBar.Append(menu, "&File"); self.SetMenuBar(menuBar) self.Button1 = Custom_Button(self, parent, -1, "D:/Documents/Python/Normal.bmp", "D:/Documents/Python/Clicked.bmp", "D:/Documents/Python/Over.bmp", "None", wx.Point(200,200), wx.Size(300,100)) EVT_MENU(self, ID_ABOUT, self.OnAbout) EVT_MENU(self, ID_EXIT, self.TimeToQuit) def OnAbout(self, event): dlg = wxMessageDialog(self, "Testing the functions of custom " "buttons using pyDev and wxPython", "About", wxOK | wxICON_INFORMATION) dlg.ShowModal() dlg.Destroy() def TimeToQuit(self, event): self.Close(true) class MyApp(wx.App): def OnInit(self): frame = MyFrame(NULL, -1, "wxPython | Buttons") frame.Show(true) self.SetTopWindow(frame) return true app = MyApp(0) app.MainLoop() Custom Button import wx from wxPython.wx import * class Custom_Button(wx.PyControl): ############################################ ##THE ERROR IS BEING THROWN SOME WHERE IN HERE ## ############################################ # The BMP's Mouse_over_bmp = wx.Bitmap(0) # When the mouse is over Norm_bmp = wx.Bitmap(0) # The normal BMP Push_bmp = wx.Bitmap(0) # The down BMP Pos_bmp = wx.Point(0,0) # The posisition of the button def __init__(self, parent, id=-1, NORM_BMP, PUSH_BMP, MOUSE_OVER_BMP, text="", pos, size, **kwargs): wx.PyControl.__init__(self,parent, id, **kwargs) # Set the BMP's to the ones given in the constructor self.Mouse_over_bmp = wx.Bitmap(MOUSE_OVER_BMP) self.Norm_bmp = wx.Bitmap(NORM_BMP) self.Push_bmp = wx.Bitmap(PUSH_BMP) self.Pos_bmp = pos ############################################ ##THE ERROR IS BEING THROWN SOME WHERE IN HERE ## ############################################ self.Bind(wx.EVT_LEFT_DOWN, self._onMouseDown) self.Bind(wx.EVT_LEFT_UP, self._onMouseUp) self.Bind(wx.EVT_LEAVE_WINDOW, self._onMouseLeave) self.Bind(wx.EVT_ENTER_WINDOW, self._onMouseEnter) self.Bind(wx.EVT_ERASE_BACKGROUND,self._onEraseBackground) self.Bind(wx.EVT_PAINT,self._onPaint) self._mouseIn = self._mouseDown = False def _onMouseEnter(self, event): self._mouseIn = True def _onMouseLeave(self, event): self._mouseIn = False def _onMouseDown(self, event): self._mouseDown = True def _onMouseUp(self, event): self._mouseDown = False self.sendButtonEvent() def sendButtonEvent(self): event = wx.CommandEvent(wx.wxEVT_COMMAND_BUTTON_CLICKED, self.GetId()) event.SetInt(0) event.SetEventObject(self) self.GetEventHandler().ProcessEvent(event) def _onEraseBackground(self,event): # reduce flicker pass def _onPaint(self, event): dc = wx.BufferedPaintDC(self) dc.SetFont(self.GetFont()) dc.SetBackground(wx.Brush(self.GetBackgroundColour())) dc.Clear() dc.DrawBitmap(self.Norm_bmp) # draw whatever you want to draw # draw glossy bitmaps e.g. dc.DrawBitmap if self._mouseIn: # If the Mouse is over the button dc.DrawBitmap(self, self.Mouse_over_bmp, self.Pos_bmp, useMask=False) if self._mouseDown: # If the Mouse clicks the button dc.DrawBitmap(self, self.Push_bmp, self.Pos_bmp, useMask=False)

    Read the article

  • Load resources? - wxPython / Python

    - by Francisco Aleixo
    Hello everyone. I am using wxPython and Py2exe to create my application and my only problem is loading for example bitmaps. Ok so lets say I want to add an image to my application, and thats fairly easy using wxPython, and lets say it is on the same directory of my .py so for example: image = wx.StaticBitmap(self, -1, wx.Bitmap('image.bmp') Now, this works obviously fine, problem is when I convert to Py2exe, I would like to use the resources from the dlls that I included in the Py2Exe compilation. So basically what I want to do is to instead of including the images on the same folder as my application in order to work, I would like to use it from the resources so people won't see the images on the folder.

    Read the article

  • Sizers... - wxPython

    - by Francisco Aleixo
    Ok, so I'm learning about sizers in wxPython and I was wondering if it was possible to do something like: ============================================== |WINDOW TITLE _ [] X| |============================================| |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |xxxxxxxxxxxxxxxxxxNOTEBOOKxxxxxxxxxxxxxxxxxx| |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx| |________ ___________| |IMAGE | |LoginForm | |________| |___________| ============================================== NOTE:Yeah, I literally got this from http://stackoverflow.com/questions/1892110/wxpython-picking-the-right-sizer-to-use-in-an-application With NOTEBOOK expanded to left and bottom, IMAGE to align to left and bottom and loginform align to right and bottom and I managed to do almost everything but now I have a problem.. The problem is that I can't align Loginform and Image separately (im using Box Sizers), and I would like to. This is the code I'm using that is causing the problem at the moment, any help is appreciated. NOTE:The code might be (HUGELY) sloppy as I'm still learning box sizers. sizer = wx.BoxSizer(wx.VERTICAL) sizer1 = wx.BoxSizer(wx.HORIZONTAL) sizer1.Add(self.nb,1, wx.EXPAND) sizer.Add(sizer1,1, wx.LEFT | wx.RIGHT | wx.EXPAND, 10) sizer.Add((-1, 25)) sizer2 = wx.BoxSizer(wx.VERTICAL) sizer2.Add(self.userLabel, 0) sizer2.Add(self.userText, 0) sizer2.Add(self.pwdLabel, 0) sizer2.Add(self.pwdText, 0) sizer2.Add(self.rem, 0) sizer3 = wx.BoxSizer(wx.HORIZONTAL) sizer3.Add(self.login, 0) sizer3.Add(self.sair,0, wx.LEFT, 5) sizer2.Add(sizer3, 0) sizer4 = wx.BoxSizer(wx.HORIZONTAL) sizer4.Add(image, 1, wx.LEFT | wx.BOTTOM) sizer4.Add(sizer2,0, wx.RIGHT | wx.BOTTOM , 5) sizer.Add(sizer4,0, wx.ALIGN_RIGHT | wx.RIGHT, 10)

    Read the article

  • wxpython GUI and multiprocessing - how to send data back from the long running process

    - by wxpydon
    Hello everyone, Trying to run a time consuming task from a wxpython GUI. The basic idea is to start the long time task from the GUI (pressing a button) and then, a static text on the dialog should be updated from it. First I tried some threading (http://wiki.wxpython.org/LongRunningTasks and many other resourses seen), and I want to show back the messages using Publisher.class. It didn't went so well, after a message or two, the GUI seems to frozen. Now I want to achieve that with multiprocessing. I have this method inside my 'GUI' class: def do_update(self, e): self.txt_updatemsg.SetLabel("Don't stop this \n") ... pub = Publisher() # i tried also calling directly from dbob object # Publisher() is a singleton so this must be useless? pub.subscribe(self.__update_txt_message, ('updatedlg', 'message')) dbob = dbutils.DBUtils() # DBUtils is the class with 'long time' tasks dbob.publisher = pub p = Process(target=self.do_update_process, args=(dbob,)) p.start() while p.is_alive: wx.Yield def do_update_process(self, dbob): dbob.do_update() __update_txt_message is a simple function what sets the static text on dialog. Question is: how can I send back some text messages from this Process (just simple text, that's all I need) Thanks guys!

    Read the article

  • Simple wxPython Frame Contents Resizing - Ratio?

    - by Wes
    I have a wxPython app with one frame and one panel. On that panel are a number of static boxes, each of which has buttons and textboxes. I have just begun reading about sizers, but they seem like they might be more than what I need, or it could that they are exactly what I need but I don't know how to use them correctly! The frame currently opens at 1920 x 1080. If the user drags the bottom right corner to resize the app, I just want everything to get smaller or larger as needed to keep the same size ratio. Is this possible? Thank you! edit: additional info: I used wxPython 2.8 and Boa to construct the GUI. I am contemplating trying another gui ide. So after reading some more about sizers, I am thinking about doing the following: add a gridsizer and basically divide my window's elements into rows and columns, then set each row and column's size as necessary until I achieve the original layout. Then I guess set the rows and columns to resize correctly? Is this a decent idea?

    Read the article

  • Problem inserting Pygames on a wxPython panel using Boa Constructor

    - by Kohwalter
    Hello, im new in Python so im hoping to to get some help to figure out what is going wrong. Im trying to run a Pygames from within wxPython panel (made on Boa Constructor). To do that i followed the instructions on the http://wiki.wxpython.org/IntegratingPyGame but still it isn't working. Here is the Panel code that was used to make the integration: class PG_panel(wx.Panel): def __init__(self, ID, name, parent, mypos, mysize): # pygame is imported in this class # make it globally available global pygame #self.Fit() wx.Panel.__init__(self, id=wxID_FRMMAINPANELTABULEIRO, name='panelTabuleiro', parent=self, pos=(16, 96), size=mysize) # pygame uses SDL, set the environment variables os.environ['SDL_WINDOWID'] = str(self.GetHandle()) os.environ['SDL_VIDEODRIVER'] = 'windib' # do the pygame stuff after setting the environment variables import pygame pygame.display.init() # create the pygame window/screen screen = pygame.display.set_mode(464, 464) #(424,450) # start the thread instance self.thread = PG_thread(screen) self.thread.start() def __del__(self): self.thread.stop() And im trying to use that panel on an interface from Boa Constructor, here is the code: class frmMain(wx.Frame): def _init_ctrls(self, prnt): # generated method, don't edit wx.Frame.__init__(self, id=wxID_FRMMAIN, name='frmMain', parent=prnt, pos=wx.Point(660, 239), size=wx.Size(815, 661), style=wx.DEFAULT_FRAME_STYLE, title='Grupo 1 - Jogo de Damas') self._init_utils() self.SetClientSize(wx.Size(799, 623)) self.SetBackgroundColour(wx.Colour(225, 225, 225)) self.SetMinSize(wx.Size(784, 650)) self.Center(wx.BOTH) self.SetMenuBar(self.menuBar1) #here begins my code mysize = (464, 464) mypos = (16, 96) self.panelTabuleiro = PG_panel(wxID_FRMMAINPANELTABULEIRO, 'panelTabuleiro', self, mypos, mysize) The original that was auto-made by the Boa Constructor is the following: self.panelTabuleiro = wx.Panel(id=wxID_FRMMAINPANELTABULEIRO, name='panelTabuleiro', parent=self, pos=wx.Point(16, 96), size=wx.Size(464, 464), style=wx.TAB_TRAVERSAL) self.panelTabuleiro.SetBackgroundColour(wx.Colour(232, 249, 240)) self.panelTabuleiro.SetThemeEnabled(True) self.panelTabuleiro.SetHelpText('Tabuleiro') The error that it gives is: Type error: in method 'new_Panel', expected argument 1 of type 'wxWindow*1 Exception AttributeError: "'PG_panel' object has no attribute 'thread' in ignored Any thoughts ? I appreciate any help. Thank you.

    Read the article

  • wxpython - Running threads sequentially without blocking GUI

    - by ryantmer
    I've got a GUI script with all my wxPython code in it, and a separate testSequences module that has a bunch of tasks that I run based on input from the GUI. The tasks take a long time to complete (from 20 seconds to 3 minutes), so I want to thread them, otherwise the GUI locks up while they're running. I also need them to run one after another, since they all use the same hardware. (My rationale behind threading is simply to prevent the GUI from locking up.) I'd like to have a "Running" message (with varying number of periods after it, i.e. "Running", "Running.", "Running..", etc.) so the user knows that progress is occurring, even though it isn't visible. I'd like this script to run the test sequences in separate threads, but sequentially, so that the second thread won't be created and run until the first is complete. Since this is kind of the opposite of the purpose of threads, I can't really find any information on how to do this... Any help would be greatly appreciated. Thanks in advance! gui.py import testSequences from threading import Thread #wxPython code for setting everything up here... for j in range(5): testThread = Thread(target=testSequences.test1) testThread.start() while testThread.isAlive(): #wait until the previous thread is complete time.sleep(0.5) i = (i+1) % 4 self.status.SetStatusText("Running"+'.'*i) testSequences.py import time def test1(): for i in range(10): print i time.sleep(1) (Obviously this isn't the actual test code, but the idea is the same.)

    Read the article

  • wxPython - Running built in event prior to custom bound event

    - by jhaukur
    I'm trying to figure out how I can specify that the mouse_down event in wxPython (StyledTextCtrl) is first handled by the built in event listener, which changes the caret position, and then handled by my own custom event handler. To bind the custom event handler I use wx.EVT_LEFT_DOWN(self.styCtrl, self.OnMouseClick) def OnMouseClick(self, evt): evt.Skip() foo() I want the built in event handler to fire and complete prior to foo().

    Read the article

  • wxPython and localisation

    - by terabytest
    I'd like to write a wxPython application that would run in different languages, updating itself automatically (with no need to close it and open it back) whenever I change the language. Is it possible to make a system that recognises and edits every widget that needs to be updated?

    Read the article

  • SplashScreen covers any MessageBoxes in wxPython?

    - by Kevin
    I have a SplashScreen shown while my application loads in the background. Unfortunately, if any errors occur during the application's initialisation a MessageBox is shown - but is behind the splash. This prevents the user from seeing the message, and from dismissing it (the only way to quit is through task manager). Q: Is there any way of hiding the SplashScreen if any errors occur, or allowing MessageBoxes to display above it? I am using wxPython 2.8.10.1 with Python 2.6.5 on Windows.

    Read the article

1 2 3 4 5 6 7 8 9  | Next Page >