Re: imports in __init__.py

2009-12-26 Thread lotrpy
On Dec 18, 12:34 pm, Ben Finney wrote: > Phil writes: > > From an arbitrary python module, I 'import packagename'. > > At that point, you have all the names that were defined within > ‘packagename’, available inside the namespace ‘packagename’. Since > ‘modulename’ is a module in that package, th

Re: Freesoftware for auto/intelligent code completing in Python

2008-07-02 Thread lotrpy
On 7月1日, 上午5时46分, Ali Servet Dönmez <[EMAIL PROTECTED]> wrote: > I don't want to be so mean here, but how hard it could be be writing a > freesoftware which would automatically/intelligently auto complete > Python code? (I mean something that really does the job, like > Microsoft's Visual Studio or

Re: IDE on the level of Eclipse or DEVc++?

2008-06-23 Thread lotrpy
On 6月24日, 上午7时31分, Tim Cook <[EMAIL PROTECTED]> wrote: > signature.asc > 1K下载 > > I highly recommend Winghttp://www.wingware.com. There are various > licensing levels and even one for open source only developers. The > support is AWESOME!. > > --Tim +1 for WingIDE, My favorite Python IDE. Code I

Re: How to make py2.5 distutil to use VC2005?

2008-06-11 Thread lotrpy
On 6月4日, 下午9时47分, "David Cournapeau" <[EMAIL PROTECTED]> wrote: > On Wed, Jun 4, 2008 at 11:38 AM, 甜瓜 <[EMAIL PROTECTED]> wrote: > >Well, IMO, the format of binary files generated by VC2003 and > > VC2005 is compatible in most cases. > > Problem arise with the C runtime, not with object file fo

Re: about sort a list with integer key

2008-01-13 Thread lotrpy
On 1月13日, 下午8时32分, Hrvoje Niksic <[EMAIL PROTECTED]> wrote: > Use lambda when it works better for you, the speed difference is > marginal in practice anyway. itemgetter is not (and was never > intended to be) a general substitute for functions, as you've > discovered. > > The marginal speed differ

about sort a list with integer key

2008-01-13 Thread lotrpy
hi, if I want sort each line ,by the last part,of a file, below is the source. from operator import itemgetter content = (line.split() for line in file('foo.txt', 'rb')) for cursor, line in enumerate(sorted(content, key = itemgetter(-1), reverse = True)): print cursor, ' '.join(line) the conten