Does only emacs and idle support symbolic debugging?

2006-11-23 Thread Victor Ng
Subject line pretty much says it all - are those the only two editors that support running the symbolic debugger from inside the editor? vic -- "Never attribute to malice that which can be adequately explained by stupidity." - Hanlon's Razor -- http://mail.python.org/mailman/listinfo/python-li

py.test and HTML output

2006-09-19 Thread Victor Ng
Is there documentation anywhere on how to get py.test to emit nice HTML output like the kind that they have for the PyPy project here: http://codespeak.net/~hpk/pypy-testresult/ ? Should I just redirect the stdout to a StringIO and parse the output and generate the HTML myself? I see that there's

Re: build problems with Python 2.4.3 under Solaris 10

2006-07-28 Thread Victor Ng
*easy* compared to Solaris. :) vic On 7/28/06, Victor Ng <[EMAIL PROTECTED]> wrote: > > How do I enable readline support for Python under Solaris 10? > > I've got CSWreadline installed in /opt/csw from blastwave, but I'm not having > any luck getting the readli

build problems with Python 2.4.3 under Solaris 10

2006-07-28 Thread Victor Ng
How do I enable readline support for Python under Solaris 10?  I've got CSWreadline installed in /opt/csw from blastwave, but I'm not having any luck getting the readline.so module compiled.I'm using: CPPFLAGS="-I/opt/csw/include" LDFLAGS="-L/opt/csw/lib" ./configure --prefix=/opt/python/2.4.3 --en

Re: Web frameworks and credit cards

2006-05-24 Thread Victor Ng
Ed, Its very simple to add credit card processing to your app. I have personally used moneris , worldpay and debitech with no issues. Sometimes you need to do a little ctypes or pyrex but overall - its easy. On 5/24/06, Ed Leafe <[EMAIL PROTECTED]> wrote: > I may have an opportunity to devel

Re: Web frameworks and credit cards

2006-05-24 Thread Victor Ng
Ed, On 5/24/06, Ed Leafe <[EMAIL PROTECTED]> wrote: > I may have an opportunity to develop an online ordering system for a > client, and will have the ability to develop using any tool I choose. > Given the fact that there are more web frameworks in Python than > keywords ;-) , what I need

Re: calling a dylib in python on OS X

2005-10-23 Thread Victor Ng
You can use Pyrex which will generate a C module for you. vic On 22 Oct 2005 23:40:17 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi > > Is there something similar to python's windll for calling DLLs on win32 > but meant for calling dylib's on OS X? > > thanks, > > r.s. > > -- > http://

Re: Metaclasses, decorators, and synchronization

2005-09-25 Thread Victor Ng
Hmmm well that's obvious enough.  This is why I shouldn't write code off the cuff on c.l.p :)OTOH - if I just assign the RLock in the base classes initializer, is there any problem?vic On 9/26/05, Jp Calderone <[EMAIL PROTECTED]> wrote: On Sun, 25 Sep 2005 23:30:21 -0400, V

Re: Metaclasses, decorators, and synchronization

2005-09-25 Thread Victor Ng
You could do it with a metaclass, but I think that's probably overkill. It's not really efficient as it's doing test/set of an RLock all the time, but hey - you didn't ask for efficient. :) 1 import threading 2 3 def synchronized(func): 4 def innerMethod(self, *args,

Preserving the argspec of a function after generating a closure

2005-03-11 Thread Victor Ng
Is there a way to preserve the argspec of a function after wrapping it in a closure? I'm looking for a general way to say "wrap function F in a closure", such that inspect.getargspec on the closure would return the same (args, varargs, varkw, defaults) tuple ass the enclosed function. The typica

Re: Is there way to determine which class a method is bound to?

2005-03-04 Thread Victor Ng
So I went digging through the documentation more and found the following: http://docs.python.org/ref/types.html There's a section titled "User-defined methods" which covers all the im_self, im_class attributes and what they are responsible for. vic On 25 Feb 2005 10:42:06 -0800, [EMAIL PROTECTE

Re: Is there way to determine which class a method is bound to?

2005-02-25 Thread Victor Ng
Awesome! I didn't see the getmro function in inspect - that'll do the trick for me. I should be able to just look up the methodname in each of the class's __dict__ attributes. vic On Fri, 25 Feb 2005 16:29:25 +0100, Peter Otten <[EMAIL PROTECTED]> wrote: > Victor Ng

Re: Is there way to determine which class a method is bound to?

2005-02-25 Thread Victor Ng
No - that doesn't work, im_class gives me the current class - in the case of inheritance, I'd like to get the super class which provides 'bar'. I suppose I could walk the __bases__ to find the method using the search routine outlined in: http://www.python.org/2.2/descrintro.html but I was hoping

Is there way to determine which class a method is bound to?

2005-02-25 Thread Victor Ng
I'm doing some evil things in Python and I would find it useful to determine which class a method is bound to when I'm given a method pointer. For example: class Foo(object): def somemeth(self): return 42 class Bar(Foo): def othermethod(self): return 42 Is there some wa