Is there a OrderedDict which can perform an iteritems() in order?

2010-11-04 Thread Jo Chan
Hello all, I have working on a program which need a ordered dictionary that could perform iteritems() sequentially. I found a package on : http://www.voidspace.org.uk/python/odict.html#creating-an-ordered-dictionary

Re: Hi, friends. I wanna ask if there is a function which is able to take a list as argument and then return its top-k maximums?

2010-04-22 Thread Jo Chan
Yeah... but actually I need something more efficient, like heap. Thank you for your help though. Best regards, Songjian On Thu, Apr 22, 2010 at 10:04 PM, Tim Golden wrote: > On 22/04/2010 14:57, Jo Chan wrote: > > Hi,friends. > > > > I wanna ask if there is a function

Re: Hi, friends. I wanna ask if there is a function which is able to take a list as argument and then return its top-k maximums?

2010-04-22 Thread Jo Chan
Cool! Thanks a lot! That's exactly what I want. Best regards, Songjian On Thu, Apr 22, 2010 at 10:04 PM, Chris Rebert wrote: > 2010/4/22 Jo Chan : > > Hi,friends. > > I wanna ask if there is a function which is able to take a list as > argument > > and then ret

Hi, friends. I wanna ask if there is a function which is able to take a list as argument and then return its top-k maximums?

2010-04-22 Thread Jo Chan
Hi,friends. I wanna ask if there is a function which is able to take a list as argument and then return its top-k maximums? I only know about max which is poorly a top-1 maximum function, now I want more yet I am lazy enough that don't want to write one by myself. So please tell me if there is o

Re: Hi, Everyone: what's the most popular xml parser module on python?

2010-04-15 Thread Jo Chan
I want to say I just have to deal with some regular text input (the input file is as XML format) so I need to read all the nodes out and get what they are. Thanks for your great help though. I should have made my point clearer. :) On Thu, Apr 15, 2010 at 6:52 PM, Stefan Behnel wrote: > Jo C

Re: Hi, Everyone: what's the most popular xml parser module on python?

2010-04-15 Thread Jo Chan
On Thu, Apr 15, 2010 at 6:52 PM, Stefan Behnel wrote: > Jo Chan, 15.04.2010 10:52: > > I just want to get the content from a XML. > > That's not a very specific description of what you want to do. What's "the > content"? The plain text content? Or do yo

Hi,Everyone: what's the most popular xml parser module on python?

2010-04-15 Thread Jo Chan
Hi, everyone~~~ I am new. What is the most popular xml parser module used on python? Thanks for answering... -- -- Best Regards 陈松坚 信息科学与技术学院 中山大学 广州大学城 510006 Chen Songjian School of Information Science & Technology Sun Yat-sen(Zhongshan) University, Guangzhou Higher Education