Re: help to make program better
On Aug 17, 9:27 am, yadin <[EMAIL PROTECTED]> wrote: > hi! > Can any one tell me why is it that i can't see my second frame and why > is the value of freq not Appended in the First frame ...thanks > I know it is wx python but it has to do with passing variables.thanks > > import wx > > def create(parent): > return Frame1(parent) > > [wxID_FRAME1, wxID_FRAME1FREQ, wxID_FRAME1FREQDISP, > wxID_FRAME1STATICTEXT1, > ] = [wx.NewId() for _init_ctrls in range(4)] > > class Frame1(wx.Frame): > def _init_ctrls(self, prnt): > # generated method, don't edit > wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt, > pos=wx.Point(380, 179), size=wx.Size(241, 133), > style=wx.DEFAULT_FRAME_STYLE, title='Frame1') > self.SetClientSize(wx.Size(233, 99)) > > self.staticText1 = wx.StaticText(id=wxID_FRAME1STATICTEXT1, > label='frequency disp', name='staticText1', parent=self, > pos=wx.Point(24, 32), size=wx.Size(71, 13), style=0) > > self.freqdisp = wx.TextCtrl(id=wxID_FRAME1FREQDISP, > name='freqdisp', > parent=self, pos=wx.Point(104, 24), size=wx.Size(100, > 21), > style=0, value='') > > self.freq = wx.Button(id=wxID_FRAME1FREQ, label='get freq', > name='freq', > parent=self, pos=wx.Point(24, 56), size=wx.Size(184, > 23), > style=0) > self.freq.Bind(wx.EVT_BUTTON, self.OnButton1Button, > id=wxID_FRAME1FREQ) > > def __init__(self, parent): > self._init_ctrls(parent) > > def OnButton1Button(self, event): > > def create(parent): > return Frame2(parent) > [wxID_FRAME2, wxID_FRAME2FREQ, wxID_FRAME2FREQDISP, > wxID_FRAME2STATICTEXT1,] = [wx.NewId() for _init_ctrls in range(4)] > > class Frame2: ~~~should be class Frame2(wx.Frame): > def __init__(self): > # > wx.Frame.__init__(self, id=wxID_FRAME2, name='', > parent=prt, > pos=wx.Point(400, 179), size=wx.Size(300, 133), > style=wx.DEFAULT_FRAME_STYLE, title='Frame2') > self.SetClientSize(wx.Size(233, 99)) > > self.staticText1 = > wx.StaticText(id=wxID_FRAME2STATICTEXT1, > label='frequency goes here first', > name='staticText2', parent=self, > pos=wx.Point(24, 32), size=wx.Size(71, 13), > style=0) > > self.freqdisp2 = wx.TextCtrl(id=wxID_FRAME2FREQDISP, > name='freqdisp2', > parent=self, pos=wx.Point(104, 24), > size=wx.Size(100, 21), > style=0, value=' ') > > self.freq = wx.Button(id=wxID_FRAME2FREQ, label='get > freq', name='freq', > parent=self, pos=wx.Point(24, 56), > size=wx.Size(184, 23), > style=0) > self.freq.Bind(wx.EVT_BUTTON, self.OnButton2Button, > id=wxID_FRAME2FREQ) > > def __init__(self, parent): > self._init_ctrls(parent) > def OnButton2Button(self, event): > freqdisp.Append('this is it 24HZ!') > Show() should be create(self).Show() > > if __name__ == '__main__': > app = wx.PySimpleApp() > frame = create(None) > frame.Show() > > app.MainLoop() Hi, I found two errors in your program. one is that class Frame2 must be inherited from wx.Frame, the other is Show() must belong a object. -- http://mail.python.org/mailman/listinfo/python-list
How to setup pyOpenGL3.0.a6 for window xp?
Hi, I've already download the pyOpenGL3..0.a6 for python2.4 and installed python2.4, Is it necessary to install OpenGL? And if need, which version of OpenGL should be installed? Thanks! -- http://mail.python.org/mailman/listinfo/python-list
Re: How to setup pyOpenGL3.0.a6 for window xp?
On Aug 17, 5:42 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Aug 17, 8:07 pm, math2life <[EMAIL PROTECTED]> wrote: > > > Hi, > > I've already download the pyOpenGL3..0.a6 for python2.4 and installed > > python2.4, > > > Is it necessary to install OpenGL? And if need, which version of > > OpenGL should be > > installed? > > Windows comes with OpenGL libraries. However, before you can use > OpenGL you'll need a package that can provide an OpenGL context, which > PyOpenGL doesn't do (easily). > > PyGame is the typical choice for most uses. If all you need is a > simple window to draw on, this is the package you want. > > However, it doesn't (easily) work with common GUIs like GTK and Wx. > If you want to use use OpenGL in a GUI app, then you'll want to find > an "OpenGL canvas widget" for that GUI. > > Carl Banks ye!I made it. The OpenGL context should be pre-installed. I want PyOpenGL can work with Wx, but it is good idea to start with PyGame for the newbie to OpenGL. Thank you , Carl -- http://mail.python.org/mailman/listinfo/python-list
Re: python video editing libs
On Aug 17, 5:55 pm, DavidM <[EMAIL PROTECTED]> wrote: > Hi, > > Does anyone know of any python or python-wrapped libs for video editing? > > My requirements: > - open video files in any of the popular containers (avi, mov, ogg, flv >etc) and all the popular codecs (mpeg3, theora, mpeg2 etc) and audio >codecs (raw, wav, mp3 etc) > - get an abstract video clip object on opening such a file > - query the clip object to determine stuff like length, framerate, size >etc > - iterate through all the frames, and get a frame object with each frame > - with a frame object, be able to access individual pixels, add graphic >images (eg, via PIL), export frame to graphics file (eg jpeg) > - with video clip object, be able to change framerate, insert/remove >frames etc, and render out with desired a-v codecs and container > - good well-documented API, preferably some usage examples > > Does anything like this exist? > > Cheers > David Python OpenCV wrapper will meet most of your need, but I am not sure , plz check it out. -- http://mail.python.org/mailman/listinfo/python-list
Re: Hot subject: a good python editor and/or IDE?
On Aug 19, 2:47 am, Sébastien <[EMAIL PROTECTED]> wrote: > Hi folks, > > I am currently using Eclipse+PyDev when developping Python projects but > I lack a fast, simple editor for tiny bit of scripts. So here is my > question: what is, for you, the current best ( but still kind of light! > ) Python editor/IDE ? A tiny precision, I am on Ubuntu so I am looking > for a linux compatible editor. > > Cheers, > > Sébastien I use SPE which is simple. -- http://mail.python.org/mailman/listinfo/python-list
Call for advice on how to start PyOpenGL!
I work with python for two years, are familiar with image processing, but beginner on PyOpenGL and OpenGL. Any advice appreciated! -- http://mail.python.org/mailman/listinfo/python-list