Search Results

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

Page 7/9 | < Previous Page | 3 4 5 6 7 8 9  | Next Page >

  • Reset selection of wx.lib.calendar.Calendar control?

    - by Joseph
    I have a wx.lib.calendar.Calendar control (not wx.lib.calendar.CalendarCtrl!). I am selecting a number of days using the following function call: self.cal.AddSelect([days], 'green', 'white') This works, and draws the days highlighted. However, I cannot work out how to reverse this (i.e., clear the selection so the days go back to their normal colouring). Any hints, please?

    Read the article

  • about feeding of pythons

    - by djz
    i want to feed python but i cant see them eating live once . do they eat dead one ... and if i feed them a chicken leg piece which is boiled for the python to look like the live pray due to its heat will he eat ??? .. plz answer ....sir.....

    Read the article

  • wxAuiNotebook - preventing certain tabs from closing

    - by Roy Tang
    I'm experimenting with wx.aui.AuiNotebook; is there a way I can prevent particular tabs from being closed? i.e. I have an app that allows the user to create multiple tabs in an AuiNotebook, but the first 2 tabs are system managed and I don't want them to be closed. Also, in a close event, can I get the window object attached to the tab being closed? (to extract data from it)

    Read the article

  • How to set the value of a wx.combobox by posting an event

    - by Adam Fraser
    The code below demonstrates the problem I am running into. I am creating a wx.ComboBox and trying to mimic it's functionality for testing purposes by posting a wxEVT_COMMAND_COMBOBOX_SELECTED event... this event strangely works fine for wx.Choice, but it doesn't do anything to the ComboBox. There doesn't appear to be a different event that I can post to the combobox, but maybe I'm missing something. I'm running this code on Python 2.5 on a Mac OSX 10.5.8 import wx app = wx.PySimpleApp() def on_btn(evt): event = wx.CommandEvent(wx.wxEVT_COMMAND_COMBOBOX_SELECTED,combobox.Id) event.SetEventObject(combobox) event.SetInt(1) event.SetString('bar') combobox.Command(event) app.ProcessPendingEvents() frame = wx.Frame(None) panel = wx.Panel(frame, -1) # This doesn't work combobox = wx.ComboBox(panel, -1, choices=['foo','bar']) # This works #combobox = wx.Choice(panel, -1, choices=['foo','bar']) combobox.SetSelection(0) btn = wx.Button(panel, -1, 'asdf') btn.Bind(wx.EVT_BUTTON, on_btn) sz = wx.BoxSizer() sz.Add(combobox) sz.Add(btn) panel.SetSizer(sz) frame.Show() app.MainLoop()

    Read the article

  • Horizontal scrolling in a wx.RichTextCtrl

    - by Sam
    I have a RichTextCtrl created as follows: self.userlist = wx.richtext.RichTextCtrl(self, style=wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL) It all works fine, except for the wx.HSCROLL style. If I change the RichTextCtrl to a regular TextCtrl, it correctly horizontal scrolls on long lines, rather than wrapping, but on the RichTextCtrl it wraps regardless. Is there an easy way to make it scroll horizontally? (I do, unfortunately, need the RichTextCtrl's featureset for this object.)

    Read the article

  • make a tree based on the key of each element in list.

    - by cocobear
    >>> s [{'000000': [['apple', 'pear']]}, {'100000': ['good', 'bad']}, {'200000': ['yeah', 'ogg']}, {'300000': [['foo', 'foo']]}, {'310000': [['#'], ['#']]}, {'320000': ['$', ['1']]}, {'321000': [['abc', 'abc']]}, {'322000': [['#'], ['#']]}, {'400000': [['yeah', 'baby']]}] >>> for i in s: ... print i ... {'000000': [['apple', 'pear']]} {'100000': ['good', 'bad']} {'200000': ['yeah', 'ogg']} {'300000': [['foo', 'foo']]} {'310000': [['#'], ['#']]} {'320000': ['$', ['1']]} {'321000': [['abc', 'abc']]} {'322000': [['#'], ['#']]} {'400000': [['yeah', 'baby']]} i want to make a tree based on the key of each element in list. result in logic will be: {'000000': [['apple', 'pear']]} {'100000': ['good', 'bad']} {'200000': ['yeah', 'ogg']} {'300000': [['foo', 'foo']]} {'310000': [['#'], ['#']]} {'320000': ['$', ['1']]} {'321000': [['abc', 'abc']]} {'322000': [['#'], ['#']]} {'400000': [['yeah', 'baby']]} perhaps a nested list can implement this or I need a tree type?

    Read the article

  • Infinite recursion trying to check all elements of a TreeCtrl

    - by mavnn
    I have a TreeCtrl in which more than one Item can be assigned the same object as PyData. When the object is updated, I want to update all of the items in the tree which have that object as their PyData. I thought the following code would solve the problem quite neatly, but for some reason the logical test (current != self.GetFirstVisibleItem()) always returns true leading to infinite recursion. Can anyone explain why? def RefreshNodes(self, obj, current=None): print "Entered refresh" current = current or self.GetFirstVisibleItem() if current.IsOk(): print self.GetPyData(current).name if self.GetPyData(current) == obj: self.RefreshNode(current) current = self.GetNextVisible(current) if current != self.GetFirstVisibleItem(): self.RefreshNodes(obj, current) Edit: the above is obviously part of a class based on wx.TreeCtrl

    Read the article

  • How can I refresh wx.Frame?

    - by aF
    Hello, I have 3 panels and I want to make drags on them. The problem is that when I do a drag on one this happens: How can I refresh the frame to happear its color when the panel is no longer there?

    Read the article

  • Python Threading, loading one thread after another

    - by Michael
    Hi, I'm working on a media player and am able to load in a single .wav and play it. As seen in the code below. foo = wx.FileDialog(self, message="Open a .wav file...", defaultDir=os.getcwd(), defaultFile="", style=wx.FD_MULTIPLE) foo.ShowModal() queue = foo.GetPaths() self.playing_thread = threading.Thread(target=self.playFile, args=(queue[0], 'msg')) self.playing_thread.start() But the problem is, when I try to make the above code into a loop for multiple .wav files. Such that while playing_thread.isActive == True, create and .start() the thread. Then if .isActive == False, pop queue[0] and load the next .wav file. Problem is, my UI will lock up and I'll have to terminate the program. Any ideas would be appreciated.

    Read the article

  • Placing elements (panels) within a wx.GridBagSizer

    - by JHarris
    I'm using a gridbagsizer to place two panels within a frame. control_panel = wx.Panel(self, id=ID_CONTROL_PANEL) main_panel = wx.Panel(self, id=ID_MAIN_PANEL) frame_sizer = wx.GridBagSizer(1, 1) frame_sizer.Add(control_panel, (0, 0), (2, 5), flag=wx.EXPAND) frame_sizer.Add(main_panel, (2, 0), (5, 5), flag=wx.EXPAND) frame_sizer.AddGrowableRow(0) frame_sizer.AddGrowableCol(0) self.SetSizer(frame_sizer) I want the control_panel to be above the main_panel (as you can see above). However this is the output I get: I don't know why the top panel is so much larger than the bottom panel, when I've specified the opposite. (2, 5) for the top and (5, 5) for the bottom. It also has a strange behaviour when I resize it smaller, it basically gives me what I want (see image below), but I don't know how to maintain the ratio when I make it larger again. However when you start resizing larger (even by a small amount) you can see (below) the shapes and ratio change dramatically in the other direction (with the bottom becoming much smaller and the top much larger). Still trying to learn this sizers and can't really find this problem with any of the examples I've seen. Also tried experimenting with all the parameters and doing some tests and I can't figure out what's going on here. Any help would be much appreciated.

    Read the article

  • How to use `wx.ProgressDialog` with my own method?

    - by user1401950
    How can I use the wx.ProgressDialog to time my method called imgSearch? The imgSearch method finds image files on the user's pc. How can I make the wx.ProgressDialog run while imgSearch is still running and display how long the imgSearch is taking? Here's my code: def onFind (self,event)# triggered by a button click max = 80 dlg = wx.ProgressDialog("Progress dialog example","An informative message",parent=self, style = wx.PD_CAN_ABORT| wx.PD_APP_MODAL| wx.PD_ELAPSED_TIME| wx.PD_REMAINING_TIME) keepGoing = True count = 0 imageExtentions = ['*.jpg', '*.jpeg', '*.png', '*.tif', '*.tiff'] selectedDir = 'C:\\' imgSearch.findImages(imageExtentions, selectedDir)# my method while keepGoing and count < max: count += 1 wx.MilliSleep(250) if count >= max / 2: (keepGoing, skip) = dlg.Update(count, "Half-time!") else: (keepGoing, skip) = dlg.Update(count) dlg.Destroy()

    Read the article

  • How do I make C++/wxWidgets code accessible to a wxPython app?

    - by Jon Cage
    I have a code library which is written in C++ and makes extensive use of the wxWidgets library. I'm now trying to wrap my library (currently using SWIG) so that it's callable from wxPython, but I've hit a wall: ------ Build started: Project: MyLibLib, Configuration: Release_SWIG_OutputForBin Win32 ------ Performing Custom Build Step In order to function correctly, please ensure the following environment variables are correctly set: PYTHON_INCLUDE: C:\Python26\include PYTHON_LIB: C:\Python26\libs\python26.lib d:\MyProject\Software\MyLib\trunk\MyLib>C:\swigwin-2.0.0\swig.exe -python d:\MyProject\Software\MyLib\trunk\MyLibLib\MyLib.i d:\MyProject\Software\MyLib\trunk\MyLib>if errorlevel 1 goto VCReportError d:\MyProject\Software\MyLib\trunk\MyLib>goto VCEnd Compiling... MyLib_wrap.c C:\wxWidgets-2.8.10\include\wx/wxchar.h(886) : warning C4273: '_snprintf' : inconsistent dll linkage c:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(358) : see previous definition of '_snprintf' C:\wxWidgets-2.8.10\include\wx/buffer.h(127) : error C2061: syntax error : identifier 'wxCharBuffer' C:\wxWidgets-2.8.10\include\wx/buffer.h(127) : error C2059: syntax error : ';' C:\wxWidgets-2.8.10\include\wx/buffer.h(127) : error C2449: found '{' at file scope (missing function header?) C:\wxWidgets-2.8.10\include\wx/buffer.h(127) : error C2059: syntax error : '}' C:\wxWidgets-2.8.10\include\wx/buffer.h(127) : error C2059: syntax error : ')' C:\wxWidgets-2.8.10\include\wx/buffer.h(129) : error C2061: syntax error : identifier 'wxWritableCharBuffer' C:\wxWidgets-2.8.10\include\wx/buffer.h(129) : error C2059: syntax error : ';' C:\wxWidgets-2.8.10\include\wx/buffer.h(129) : error C2059: syntax error : ':' C:\wxWidgets-2.8.10\include\wx/buffer.h(134) : error C2061: syntax error : identifier 'wxWCharBuffer' C:\wxWidgets-2.8.10\include\wx/buffer.h(134) : error C2059: syntax error : ';' C:\wxWidgets-2.8.10\include\wx/buffer.h(134) : error C2449: found '{' at file scope (missing function header?) C:\wxWidgets-2.8.10\include\wx/buffer.h(134) : error C2059: syntax error : '}' C:\wxWidgets-2.8.10\include\wx/buffer.h(134) : fatal error C1004: unexpected end-of-file found Build log was saved at "file://d:\MyProject\Software\MyLib\trunk\MyLib\Release_SWIG_OutputForBin\BuildLog.htm" MyLibLib - 13 error(s), 1 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Is there a particular way I should be going about this? I spent some time googling for similar errors, but got none which suggests I'm probably barking up the wrong tree here...? [Edit] Is a dll and ctypes the answer?

    Read the article

  • Reverse engineering to get answers

    - by cornjuliox
    So I've spent the last few days looking for a way to create a simple image drawing app with wxPython, and I think the key to doing just that is understanding how to use Device Contexts. The problem is that the wxPython demo program doesn't demonstrate DCs, and the docs for both wxPython and wxWidgets don't explain as much as I'd like to know so I've decided to try and 'reverse engineer' an existing app to see how its done. The first problem I have is that I don't know of any drawing apps written in wxPython (or any written in Python for that matter o.o), and the second is I don't know how I'd go about doing it. Am I right in saying that I'm going to need a copy of an application's Python source and something like Winpdb? What do professional programmers do when they find themselves in a situation like mine, needing answers that the docs don't provide?

    Read the article

  • Can one Python project use both 2.x and 3.x code?

    - by Begbie00
    Hi all - I'm going to start on a long (~1-year) programming project in Python. I want to use wxPython for my GUI (supports 2.6), but I also want to use 3.1 for the rest of the project (to start using the 3.x syntax). Is there any way for me to design a project that mixes 2.x and 3.x modules? Or should I just bite the bullet and use either 2.x (preferred, since I really want to learn wxPython) or 3.x throughout? Thanks, Mike

    Read the article

  • Problem trying to install PyCurl on Mac Snow Leopard

    - by Ldn
    Hi, My app needs to use PyCurl, so i tried to install it on my Mac but i found a lot of problems and error :( Requirement: First of all i've to say that the version of Python working on my Mac is 32 bit based, because i need to use WxPython, that needs 32 bit Python. For doing this i used: defaults write com.apple.versioner.python Prefer-32-Bit -bool yes To install PyCurl i used: sudo env ARCHFLAGS="-arch x86_64" easy_install setuptools pycurl And the terminal returned: Best match: setuptools 0.6c11 Processing setuptools-0.6c11-py2.6.egg setuptools 0.6c11 is already the active version in easy-install.pth Installing easy_install script to /usr/local/bin Installing easy_install-2.6 script to /usr/local/bin Using /Library/Python/2.6/site-packages/setuptools-0.6c11-py2.6.egg Processing dependencies for setuptools Finished processing dependencies for setuptools Searching for pycurl Best match: pycurl 7.16.2.1 Processing pycurl-7.16.2.1-py2.6-macosx-10.6-universal.egg pycurl 7.16.2.1 is already the active version in easy-install.pth Using /Library/Python/2.6/site-packages/pycurl-7.16.2.1-py2.6-macosx-10.6-universal.egg Processing dependencies for pycurl Finished processing dependencies for pycurl so i thought that pycurl was correctly installed and working. But... But when i started my app, python return me an error: python /Users/lorenzodenobili/Desktop/Python/AGGIORNATORE_PY/Dropbox/wxPython/test.py Traceback (most recent call last): File "/Users/lorenzodenobili/Desktop/Python/AGGIORNATORE_PY/Dropbox/wxPython/test.py", line 20, in <module> import pycurl File "build/bdist.macosx-10.6-universal/egg/pycurl.py", line 7, in <module> File "build/bdist.macosx-10.6-universal/egg/pycurl.py", line 6, in __bootstrap__ ImportError: dlopen(/Users/lorenzodenobili/.python-eggs/pycurl-7.16.2.1-py2.6-macosx-10.6-universal.egg-tmp/pycurl.so, 2): no suitable image found. Did find: /Users/lorenzodenobili/.python-eggs/pycurl-7.16.2.1-py2.6-macosx-10.6-universal.egg-tmp/pycurl.so: mach-o, but wrong architecture Yep, there is something quite big that goes wrong. I really don't have any idea on how to solve this error, so i really need your help! thank you so much!!

    Read the article

  • Lightweight Live Linux Image

    - by MA1
    I am working on an application which is being developed in wxPython and C plus using linux core utilities and network support. To be more specific, I only need the following support for following packages/softwares/components. wxPython C Network Support Linux Utilities Vi File System(fdisk/parted, ntfsprogs etc) Basic(cp, mount/umount, mkdir etc) The application will run from a live CD. Currently i am using Fedora 12 with Gnome for live CD. Currently the size of live image is around 350 MB. The size of application is hardly 1 MB. I don't need anything else except above mentioned. Just my application and supporting packages, no desktop etc. So, I need a Lightweight Linux image as smaller as possible providing all the above mentioned packages/components. I am considering the following distributions: Xfce LXDE Fluxbox Enlightenment Any ideas/suggestions?

    Read the article

  • Redirect logging output using custom logging handler

    - by mridang
    Hi Guys, I'm using a module in my python app that writes a lot a of messages using the logging module. Initially I was using this in a console application and it was pretty easy to get the logging output to display on the console using a console handler. Now I've developed a GUI version of my app using wxPython and I'd like to display all the logging output to a custom control — a multi-line textCtrl. Is there a way i could create a custom logging handler so i can redirect all the logging output there and display the logging messages wherever/however I want — in this case, a wxPython app. Thanks

    Read the article

  • How can I load an MP3 or similar music file for display and analysis in wxWidgets?

    - by Jon Cage
    I'm developing a GUI in wxPython which allows a user to generate sequences of colours for some toys I'm building. Part of the program needs to load an MP3 (and potentially other formats further down the line) and display it to the user. That should be sufficient to get started but later I'd like to add features like identifying beats and some crude frequency analysis. Is there any simple way of loading / understanding an MP3's contents to display a plot of its amplitudes to the screen using wxWidgets? I later intend to port to C++/wxWidgets for speed and to avoid having to distribute wxPython.

    Read the article

  • How can I load an MP3 or similar music file for display and anaysis in wxWdigets?

    - by Jon Cage
    I'm developing a GUI in wxPython which allows a user to generate sequences of colours for some toys I'm building. Part of the program needs to load an MP3 (and potentially other formats further down the line) and display it to the user. That shuold be sufficient to get started but later I'd like to add features like identifying beats and some crude frequency analysis. Is there any simple way of loading / understanding an MP3's contents to display a plot of it's amplitudes to the screen using wxWidgets? I later intend to port to C++/wxWidgets for speed and to avoid having to distribute wxPython.

    Read the article

  • any basic app packaging gui for a newbie?

    - by Hairo
    i've made an app using wxpython, i have some .py files and some icons, how can i package it for uploading it to launchpad?? i've already set a ppa and it seems like i need to organize my files before packaging, i mean the debian file structure needed to make a tar.gz source package and how to upload it... i've read some guides (that have an already made tar.gz source package) but as this is my first app i do not understand most of the things... any help?

    Read the article

< Previous Page | 3 4 5 6 7 8 9  | Next Page >