Re: howto overload with a NOP (empty statement)

2007-01-06 Thread Vasily Sulatskov
class Power_Supply (device): def execute (self): pass Stef Mientki wrote: > How should I overload / disable a method ? > In the example below I have defined the class "Power_Supply", derived > from baseclass "device". > The baseclass has a method "execute", which will be implemented in

Re: Adding functions to classes after definition

2007-01-08 Thread Vasily Sulatskov
A nice guide to descriptors http://users.rcn.com/python/download/Descriptor.htm -- http://mail.python.org/mailman/listinfo/python-list

Re: Read/write 2D data from/to file..?

2007-02-11 Thread Vasily Sulatskov
On Feb 12, 6:47 am, "mech point" <[EMAIL PROTECTED]> wrote: > I was able to read the data from file into a two dimensional array > (lists) > > rows=[map(float,line.split())for line in file("data")] > > but How to write them back into the file. Using matplotlib it will be: import pylab rows = pyla

Re: Help with Optimization of Python software: real-time audio controller

2007-02-11 Thread Vasily Sulatskov
Perhaps boosting priorities for time critical threads will help. I don't know about MacOS but for Win32 something like that helps: thread = win32api.GetCurrentThread() win32process.SetThreadPriority(thread, win32process.THREAD_PRIORITY_TIME_CRITICAL) current_process = win32pr

Re: Saving PyOpenGl figures as ps

2007-02-11 Thread Vasily Sulatskov
On Feb 12, 3:11 am, "Frank" <[EMAIL PROTECTED]> wrote: > Hi, > > I installed pyopengl (opengl for python) on my linux box and > everything works fine. But now I want to save the generated images as, > e.g., ps or eps. How can I do that and how can I adjust the resolution > (if necessary)? This is p