Ben Finney wrote:
Esmail writes:
What techniques/tools do you recommend for debugging?
I use the Python interactive shell, and code each module so that the
behaviour is easily introspected and tested from outside the module. If
I'm not able to easily introspect the code at an interactive pro
Chris Seymour wrote:
I am working on a python script for my colleague that will walk a
directory and search in the different files for a specific string.
These pieces I am able to do. What my colleague wants is that when
she runs the script the filename is replaced by the current file that
is be
Consider the following module:
class NewDict(dict):
parent = None
def __setitem__(self, key, value):
print "My parent is", self.parent
super(NewDict, self).__setitem__(key, value)
class Zero(object):
children = NewDict()
def
John wrote:
> what i want to do is print a 'waiting' statement while a script is
> working-- the multithreading aspect isn't an issue, the printing on
> the same line is. i want to print something like:
>
> (1sec) working...
> (2sec) working
> (3sec) working.
>
>
> where the 'working' l
"Jp Calderone" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Mon, 28 Mar 2005 03:57:16 GMT, Alex VanderWoude <[EMAIL PROTECTED]>
wrote:
> >Is there a way to override a method on a class whose source you cannot
> > change in such a way that
Is there a way to override a method on a class whose source you cannot
change in such a way that you can hook into that method's code? After doing
some research, it appears that one way to do such a thing is to create a new
(non-class) method, and then assign the new method to the class in questio
"Stephen Thorne" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thu, 24 Mar 2005 06:21:36 GMT, Alex VanderWoude <[EMAIL PROTECTED]>
wrote:
> > I am attempting to save my window's size and position when it closes.
So I
> > figured
I am attempting to save my window's size and position when it closes. So I
figured I'd put some code in the __del__() method:
from wxPython import *
class MyWindow(wxFrame):
def __init__(self, parent, id=wxID_ANY, title=None, style=None):
# Some stuff here.
def __del__(self):