How to do this?

2005-07-30 Thread flyaflya
the codes as follow: class Base: def fun(self): print "base_fun" def fun2(self): print "base_fun2" class Foo: def __init__(self, base): self.__base = base def fun3(self): print "foo_fun3" b = Base() foo = Foo(b) my aim is:when "foo.fun3()" be called,it run as usu

how to do this?

2005-09-03 Thread Justin Straube
umn=0, columnspan=3) set_info() # example to show what will be displayed. ROOT.mainloop() End Example Can anyone point me in the right direction for how to do this? Regards, Justin -- http://mail.python.org/mailman/listinfo/python-list

Re: How to do this?

2005-07-30 Thread Dan Sommers
On Fri, 29 Jul 2005 22:34:23 +0800, "flyaflya" <[EMAIL PROTECTED]> wrote: > the codes as follow: > class Base: > def fun(self): > print "base_fun" > def fun2(self): > print "base_fun2" > class Foo: > def __init__(self, base): > self.__base = base > def fun3(self): >

Re: how to do this?

2005-09-03 Thread Steve Holden
=SUNKEN, anchor=W) > iLab.grid(row=2, column=0, columnspan=3) > > set_info() # example to show what will be displayed. > ROOT.mainloop() > End Example > > Can anyone point me in the right direction for how to do this? > The key here is to bind keystroke events to

Re: how to do this?

2005-09-03 Thread Peter Otten
='Quit', command=ROOT.quit) > qBut.grid(row=1, column=2, pady=2, padx=2, sticky=E) > iLab = Label(ROOT, textvariable=infVar, width=21, > relief=SUNKEN, anchor=W) > iLab.grid(row=2, column=0, columnspan=3) > > set_info() # example to show what will be di

Re: how to do this?

2005-09-04 Thread Justin Straube
Thanks Steve and Peter, these two methods are a lot of help. Ill have to play with each in my actual app to find which works best. I found more info on trace_variable() at http://effbot.org/tkinterbook/variable.htm and also some more info on events and bindings at http://effbot.org/tkinterb

suggestions on how to do this

2005-04-27 Thread chris
I have yet to code this but I was hoping for some ideas on how to do this reasonably. I figure I can compute each b(k) and store the numeric value(s) and associated powers of A. Then collect coefficients for like powers of A. Finally I have a set of polynomial coefficients in A which I can pass

Re: suggestions on how to do this

2005-04-27 Thread Terry Reedy
"chris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a recursive function b(k) > > b(k) = -(A/k**2)*(b(k-2) - b(k-5)) This is specifically called a recurrence relation/ [snip] > When this is expanded I get a polynomial F(A). I want to determine the > coefficients of the

Re: suggestions on how to do this

2005-04-27 Thread Bengt Richter
is expanded I get a polynomial F(A). I want to determine the >coefficients of the polynomial so that I can find the roots of the function >F up to a specified order of A. > > >I have yet to code this but I was hoping for some ideas on how to do this >reasonably. > >I figure I c

Re: suggestions on how to do this

2005-04-27 Thread Kay Schluehr
Seems You are looking for a generating function of a recurrence relation. There is a standard text about this topic written by Herbert S. Wilf downloadable from his homapage: http://www.cis.upenn.edu/~wilf/ Regards, Kay -- http://mail.python.org/mailman/listinfo/python-list

Re: suggestions on how to do this

2005-04-27 Thread cfriedl
Hi Terry I apprecaite the advice. Briefly I'm familiar with the math (its an eigenvalue problem in fluid flow) but not so much with python (3 months on and off), hence my post here. I'm looking for python advice on how to implement this effectively. I love python and would like to use it well. As

Re: suggestions on how to do this

2005-04-27 Thread cfriedl
Hi Bengt OK, that's right. So I'm curious how you did this. And any comments on how to collect coefficients of like powers in your result. Be Well and Happy Always Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: suggestions on how to do this

2005-04-27 Thread bgs
You could probably use scipy.base.polynomial, but it's easy enough to implement a polynomial yourself. Just use a dict-- each key represents the power and each value the coefficient of the polynomial. You didn't say exactly how efficient you need this. It takes only a couple seconds to sum 100 o

Re: suggestions on how to do this

2005-04-27 Thread bwaha
Hi bgs Many thanks. This generates the correct coefficients. I am studying your implementation now. I've not used a dictionary of dictionaries before so there's a bit of a learning curve going on right now. However I can see that b[k] holds the relevant info (coefficients and powers) so I can eas

Anyone know how to do this in pyOpenSSL

2005-08-30 Thread Scott Chapman
The pyOpenSSL list is _very_ quiet. I'm hoping somebody here knows how to do this: openssl smime -sign -in $tempfile -signer /path/to/my_cert -inkey /path/to/my_key -outform der -nodetach -binary | openssl smime -encrypt -des3 -binary -outform pem /path/to/paypal_public_cert ...

Any idea how to do this in Python?

2006-10-17 Thread Lad
In a web application users can post some information. I would like to link each posting with a "weight of importance" for a user, depending on a keywords in the posting. For example, I know that a user A is interested in Nokia mobiles while user B in Siemens mobiles. So, if a user A is signed, he w

Re: Any idea how to do this in Python?

2006-10-17 Thread Lad
Dennis, Thank you for your reply You say: >Pretend you are the computer/application/etc. How would YOU > perform such a ranking? That is what I do not know , how to perform such ranking. Do you have any idea? Regards, Lad. -- http://mail.python.org/mailman/listinfo/python-list

Re: Any idea how to do this in Python?

2006-10-17 Thread jmdeschamps
Lad wrote: > Dennis, > Thank you for your reply > You say: > >Pretend you are the computer/application/etc. How would YOU > > perform such a ranking? > That is what I do not know , how to perform such ranking. > Do you have any idea? > > Regards, > Lad. take a piece of paper to *play* the use-cas

Re: Any idea how to do this in Python?

2006-10-17 Thread Theerasak Photha
On 17 Oct 2006 02:56:45 -0700, Lad <[EMAIL PROTECTED]> wrote: > > Dennis, > Thank you for your reply > You say: > >Pretend you are the computer/application/etc. How would YOU > > perform such a ranking? > That is what I do not know , how to perform such ranking. > Do you have any idea? The detail

RE: Any idea how to do this in Python?

2006-10-17 Thread Matthew Warren
> On 17 Oct 2006 02:56:45 -0700, Lad <[EMAIL PROTECTED]> wrote: > > > > Dennis, > > Thank you for your reply > > You say: > > >Pretend you are the computer/application/etc. How would YOU > > > perform such a ranking? > > That is what I do not know , how to perform such ranking. > > Do you have any

How to do this in python with regular expressions

2007-05-25 Thread Jia Lu
Hi all I'm trying to parsing html with re module. html = """ DATA1DATA2DATA3DATA4 DATA5DATA6DATA7DATA8 """ I want to get DATA1-8 from that string.(DATA maybe not english words.) Can anyone tell me how to do it with regular expression in python? Thank you very much. -- http://mail.py

Re: How to do this in python with regular expressions

2007-05-25 Thread Thorsten Kampe
* Jia Lu (25 May 2007 04:51:35 -0700) > I'm trying to parsing html with re module. > [...] > Can anyone tell me how to do it with regular expression in python? Just don't. Use an HTML parser like BeautifulSoup -- http://mail.python.org/mailman/listinfo/python-list

Re: How to do this in python with regular expressions

2007-05-25 Thread Mattia Gentilini
Thorsten Kampe ha scritto: >> I'm trying to parsing html with re module. > Just don't. Use an HTML parser like BeautifulSoup Or HTMLParser/htmllib -- |\/|55: Mattia Gentilini e 55 = log2(che_palle_sta_storia) (by mezzo) |/_| ETICS project at CNAF, INFN, Bologna, Italy |\/| www.getfirefox.com ww

Re: How to do this in python with regular expressions

2007-05-25 Thread Mattia Gentilini
Thorsten Kampe ha scritto: >> I'm trying to parsing html with re module. > Just don't. Use an HTML parser like BeautifulSoup Or HTMLParser/htmllib. of course you can mix those and re, it'll be easier than re only. -- |\/|55: Mattia Gentilini e 55 = log2(che_palle_sta_storia) (by mezzo) |/_| ETI

Re: How to do this in python with regular expressions

2007-05-27 Thread snorble
On May 25, 6:51 am, Jia Lu <[EMAIL PROTECTED]> wrote: > Hi all > > I'm trying to parsing html with re module. > > html = """ > > > > DATA1DATA2DATA3 HT>DATA4 > > > DATA5DATA6DATA7DATA8 > > > """ > > I want to get DATA1-8 from that string.(DATA maybe not english words.) > Can anyone tell me h

How to do this with groupby (or otherwise)? (Was: iterblocks cookbook example)

2007-06-04 Thread Gerard Flanagan
On Jun 2, 10:47 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > On Jun 2, 10:19 am, Steve Howell <[EMAIL PROTECTED]> wrote: > > > George Sakkis produced the following cookbook recipe, > > which addresses a common problem that comes up on this > > mailing list: > > ISTM, this is a common mailing

Re: How to do this with groupby (or otherwise)? (Was: iterblocks cookbook example)

2007-06-04 Thread Gerard Flanagan
On Jun 4, 1:52 pm, Gerard Flanagan <[EMAIL PROTECTED]> wrote: > On Jun 2, 10:47 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > > > > On Jun 2, 10:19 am, Steve Howell <[EMAIL PROTECTED]> wrote: > > > > George Sakkis produced the following cookbook recipe, > > > which addresses a common problem