ANN: lfm v2.1

2008-12-20 Thread Iñigo Serna
Hi there, As a present for Christmas I announce here a new version of 'lfm'. Description: = Last File Manager is a simple but powerful file manager for the UNIX console. It's written in Python, using curses module. Licensed under GNU Public License version 3. Some of the features you

Check file is

2008-12-20 Thread Harish
Hi Friends Is there any utility in python which will help me to read any pdf files? Regards Harish -- http://mail.python.org/mailman/listinfo/python-list

Re: Jarow-Winkler algorithm: Measuring similarity between strings

2008-12-20 Thread Øyvind
Thanks for the useful comments. On 20 Des, 01:38, John Machin sjmac...@lexicon.net wrote: On Dec 20, 10:02 am, Øyvind oyvin...@gmail.com wrote: Based on examples and formulas fromhttp://en.wikipedia.org/wiki/Jaro-Winkler. For another Python implementation, google febrl. Useful for

Today' Topic Managerial Values and ethos

2008-12-20 Thread matdata.d...@gmail.com
Delhi Institute of Management Services Dear friends, We are extremely happy to welcome you to the world of Management... We are in the process of preparing some 5 minutes revision Q A type lessons for management students. They are in no way, a replacement for the classroom lectures, textbooks

Re: mod_python resources

2008-12-20 Thread Graham Dumpleton
On Dec 20, 2:47 pm, Anjanesh Lekshminarayanan m...@anjanesh.net wrote: Same requirement here. But isnt there any mod_python for Python 3.0 ? Or do we need to build it from source ourselves ? I was hoping there would bemod_wsgibinaries for Python 3.0. At this stage it looks like there will

Re: Check file is

2008-12-20 Thread Banibrata Dutta
AFAI can tell... (from a quick google search), there is only a commercial product that can read PDF... i.e. PageCatcher from ReportLabs.http://www.reportlab.org/devfaq.html (look at item 2.1.5) http://www.reportlab.org/devfaq.html BTW, an apparently, non platform-neutral way may be described

Re: Namespaces, multiple assignments, and exec()

2008-12-20 Thread Arnaud Delobelle
John O'Hagan resea...@johnohagan.com writes: I have a lot of repetitive assignments to make, within a generator, that use a function outside the generator: var1 = func(var1, args) var2 = func(var2, args) var3 = func(var3, args) etc... In each case the args are identical, but the first

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Jeremiah Dodds
On Sat, Dec 20, 2008 at 12:30 AM, r rt8...@gmail.com wrote: Why could't we improve on what we had instead of making radical changes? Thats all i am asking. -- http://mail.python.org/mailman/listinfo/python-list Often times improving on what you have involves radical changes, especially if

Re: Check file is

2008-12-20 Thread gardsted
Harish wrote: Hi Friends Is there any utility in python which will help me to read any pdf files? Regards Harish Not sure, what you're after exactly, but I tried googling 'python read pdf' and found this, so maybe 'reportlab' is what you're looking for: Re: Reading PDF files #2 Dec 20th,

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Stefan Behnel
Steven D'Aprano wrote: I have no objection to the addition of the format() method (although I wonder whether it might have been better as a function). I actually learned about the String.format() method in Java a while after having read about str.format() in Python, and my first reaction was

Re: ANN: New Book: Programming in Python 3

2008-12-20 Thread Mark Summerfield
On 20 Dec, 00:32, Colin J. Williams c...@ncf.ca wrote: Thomas Heller wrote: Mark Summerfield schrieb: Just a follow-up to say that the book has now been published in the U.S. It is now in stock at InformIT, and should reach other stores, e.g., Amazon, in a week or so. Also, the

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Marc 'BlackJack' Rintsch
On Fri, 19 Dec 2008 17:12:00 -0800, r wrote: Marc, Why move away from a concise and widely accepted way of sting formatting, just to supposedly make it a little easier for n00bs? (which i disagree this is easier) In turn, creating more syntactical clutter. (%s %f %d) is all you need to

check whether a JPG is completed?

2008-12-20 Thread oyster
there are some pics(most of them are JPGs) on my disk, but some are not completed, that is to say, if I view it in irfanview, the bottom is displayed as a gray block. so I want to check where they are completed. but how to do that in python? (No, I am not saying how to tell the fileszie when I

Re: Jarow-Winkler algorithm: Measuring similarity between strings

2008-12-20 Thread John Machin
On Dec 20, 7:07 pm, Øyvind oyvin...@gmail.com wrote: Thanks for the useful comments. On 20 Des, 01:38, John Machin sjmac...@lexicon.net wrote: On Dec 20, 10:02 am, Øyvind oyvin...@gmail.com wrote: Based on examples and formulas fromhttp://en.wikipedia.org/wiki/Jaro-Winkler. For

Re: PIL on 3.x?

2008-12-20 Thread Diez B. Roggisch
Méta-MCI (MVP) schrieb: Hi! This info is interesting for many people. IMO, it's a good idea to write the question in this newsgroup. Which only makes sense if the author of PIL reads it. Which he seems not to (or at least doesn't answer here, as he used to). Diez --

[OT] Re: IMAP: How to implement GMail-like threaded conversations view

2008-12-20 Thread Diez B. Roggisch
snip/ Anything else is madness. And the fact the Outlook doesn't do proper referral fields just infuriates me. Sigh. I'm overjoyed about the opaque winmail.dat attachments I get. Which seem to appear randomly from the same sender sending the same stuff (like a meeting invitation) to me -

Re: encoding problem

2008-12-20 Thread Marc 'BlackJack' Rintsch
On Fri, 19 Dec 2008 16:50:39 -0700, Joe Strout wrote: Marc 'BlackJack' Rintsch wrote: And does REALbasic really use byte strings plus an encoding!? You betcha! Works like a dream. IMHO a strange design decision. I get that you don't grok it, but I think that's because you haven't

Re: Jarow-Winkler algorithm: Measuring similarity between strings

2008-12-20 Thread bearophileHUGS
John Machin: This paper by Heikki Hyyrö is well worth reading, and refers to a whole lot of previous work, including Ukkonen's: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.6.2242 This is the site of the author: http://www.cs.uta.fi/~helmu/pubs/pubs.html There you can find updates

Re: ANN: New Book: Programming in Python 3

2008-12-20 Thread Steve Holden
Mark Summerfield wrote: [...] With two dozen postings on my use of English I'm now rather nervous about the feeback I'll get on my Python 3! There is no such thing as bad publicity. Quick, make a blog post about how there have been over twenty comments about your use of English (though don't

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Steve Holden
Stefan Behnel wrote: [...] I think '...'.format() makes sense given that we already have '...'.join(). Sure it does, but that doesn't stop a lot of people disliking str.join() regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Steve Holden
r wrote: On Dec 19, 10:04 pm, Steve Holden st...@holdenweb.com wrote: r wrote: Thanks Steven, We need a real Pepsi challenge here to show the insignificance of this change. I am not against change. But when we lose something as - compact- as %formating i'm going to want to see a damn good

Re: Namespaces, multiple assignments, and exec()

2008-12-20 Thread John O'Hagan
On Sat, 20 Dec 2008, Arnaud Delobelle wrote: John O'Hagan resea...@johnohagan.com writes: I have a lot of repetitive assignments to make, within a generator, that use a function outside the generator: var1 = func(var1, args) var2 = func(var2, args) var3 = func(var3, args) etc...

WAGs on when django will use Python 3.0?

2008-12-20 Thread walterbyrd
Will Django be primarily using Python 3.0 one year from now? Two years from now? Any WAGs? -- http://mail.python.org/mailman/listinfo/python-list

Re: Namespaces, multiple assignments, and exec()

2008-12-20 Thread John O'Hagan
On Sat, 20 Dec 2008, Steven D'Aprano wrote: On Sat, 20 Dec 2008 02:53:16 +, MRAB wrote: If you're sure you want to use the current namespace then: for name in namelist: vars()[name] = func(name, args) Doesn't work inside a function: def parrot(): ... for name

Re: Namespaces, multiple assignments, and exec()

2008-12-20 Thread John O'Hagan
On Sat, 20 Dec 2008, Terry Reedy wrote: John O'Hagan wrote: I have a lot of repetitive assignments to make, within a generator, that use a function outside the generator: var1 = func(var1, args) var2 = func(var2, args) var3 = func(var3, args) etc... In each case the args are

Re: Namespaces, multiple assignments, and exec()

2008-12-20 Thread Luis M . González
On Dec 19, 11:34 pm, John O'Hagan resea...@johnohagan.com wrote: I have a lot of repetitive assignments to make, within a generator, that use a function outside the generator: var1 = func(var1, args) var2 = func(var2, args) var3 = func(var3, args) etc... In each case the args are

Re: WAGs on when django will use Python 3.0?

2008-12-20 Thread Steve Holden
walterbyrd wrote: Will Django be primarily using Python 3.0 one year from now? Two years from now? I doubt they will drop 2.X support in the next two years. 3.0 will likely be supported fairly fully in the next year. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119

teenflood - Free

2008-12-20 Thread vkseashoremack
teenflood . . . ***CLICK HERE http://club247.cn/teenflood * . . . . . . . . . . . . teenflood -- http://mail.python.org/mailman/listinfo/python-list

foot domme - Free

2008-12-20 Thread vkseashoremack
foot domme . . . ***CLICK HERE http://club247.cn/foot-domme * . . . . . . . . . . . . foot domme -- http://mail.python.org/mailman/listinfo/python-list

sapphic er - Free

2008-12-20 Thread vkseashoremack
sapphic er . . . ***CLICK HERE http://club247.cn/sapphic-er * . . . . . . . . . . . . sapphic er -- http://mail.python.org/mailman/listinfo/python-list

lesbo land - Free

2008-12-20 Thread vkseashoremack
lesbo land . . . ***CLICK HERE http://club247.cn/lesbo-land * . . . . . . . . . . . . lesbo land -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL on 3.x?

2008-12-20 Thread M�ta-MCI (MVP)
Hi! Fredrik Lundh (Pythonware ; the author of PIL (and ElementTree, and many other things)) had, in the past, often give answers. To me, like to others people. @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: check whether a JPG is completed?

2008-12-20 Thread M�ta-MCI (MVP)
Hi! Sometimes, PIL give an error. With try: Except:, you can get info. Sometimes, non error, but the Jpeg is not correct. Difficult, in this case, to get info. Therefore, the answer is: not in all cases. @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Generator slower than iterator?

2008-12-20 Thread Federico Moreira
Wow, thanks again =) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow

2008-12-20 Thread cm_gui
Seriously cm_gui, you're a fool. Python is not slow. --JamesMills haha, getting hostile? python fans sure are a nasty crowd. Python is SLOW. when i have the time, i will elaborate on this. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow

2008-12-20 Thread Steve Holden
cm_gui wrote: Seriously cm_gui, you're a fool. Python is not slow. --JamesMills haha, getting hostile? python fans sure are a nasty crowd. Python is SLOW. Two lies in one posting! when i have the time, i will elaborate on this. Save your time, go somewhere else. Nobody here is

Re: ANN: New Book: Programming in Python 3

2008-12-20 Thread Jim
I too will be interested in seeing the book. Nothing wrong with Lout -- and you can choose what suits you best, of course -- but just a couple of comments on the alternative. On Dec 19, 5:21 pm, Mark Summerfield l...@qtrac.plus.com wrote: : - I can't draw but I can tell lout to draw for me

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread walterbyrd
On Dec 19, 12:43 pm, excord80 excor...@gmail.com wrote: Also, I like having only *one* special symbol (`%') to worry about in my strings instead of two (`{' and `}'). Actually the new way has, at least three special symbols: ( '{', '}' , '.') as well as the method name format so %s=%s % (k,

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread walterbyrd
On Dec 19, 10:25 am, Michael Torrie torr...@gmail.com wrote: Personally the new string formatter is sorely needed in Python.   Really? You know, it's funny, but when I read problems that people have with python, I don't remember seeing that. Loads of people complain about the white space issue.

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread r
Walter, Would you be kind enough to translate this code to the new syntax? s = 'python' n = 12 f = 1.3 '%s %05d %0.2f' %(s,n,f) 'python 00012 1.33' i want to see how casting is handled. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread walterbyrd
On Dec 19, 10:55 am, bearophileh...@lycos.com wrote: Regarding the speed of Python3 programs, they will go faster The net result of the 3.0 generalizations is that Python 3.0 runs the pystone benchmark around 10% slower than Python 2.5. http://docs.python.org/dev/3.0/whatsnew/3.0.html

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread walterbyrd
On Dec 20, 4:34 pm, r rt8...@gmail.com wrote: Walter, Would you be kind enough to translate this code to the new syntax? I am sorry, but I just don't know the new syntax well enough. I am not sure if the examples that I have posted, so far, are correct. --

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread r
Thanks, i understand. Maybe some of the pro new syntax guys will show a translation -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread MRAB
walterbyrd wrote: On Dec 19, 12:43 pm, excord80 excor...@gmail.com wrote: Also, I like having only *one* special symbol (`%') to worry about in my strings instead of two (`{' and `}'). Actually the new way has, at least three special symbols: ( '{', '}' , '.') as well as the method name

ANN: lfm v2.1

2008-12-20 Thread Iñigo Serna
Hi there, As a present for Christmas I announce here a new version of 'lfm'. Description: = Last File Manager is a simple but powerful file manager for the UNIX console. It's written in Python, using curses module. Licensed under GNU Public License version 3. Some of the features you

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread r
Just to be on record, i am OK with adding a new way to do this as long as the old C style str format does not ever go away. I don't like 20 ways to do the same thing, but i really like the compact way of %formating now. My complaint is the deprecation of %formating. Maybe i'll use the new syntax

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Roy Smith
In article b58f588a-e8db-41df-a488-f7df62d56...@w39g2000prb.googlegroups.com, walterbyrd walterb...@iname.com wrote: On Dec 19, 10:25 am, Michael Torrie torr...@gmail.com wrote: Personally the new string formatter is sorely needed in Python.   Really? You know, it's funny, but when I

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread r
On Dec 20, 5:27 pm, walterbyrd walterb...@iname.com wrote: On Dec 19, 10:25 am, Michael Torrie torr...@gmail.com wrote: Personally the new string formatter is sorely needed in Python.   Really? You know, it's funny, but when I read problems that people have with python, I don't remember

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread MRAB
r wrote: Walter, Would you be kind enough to translate this code to the new syntax? s = 'python' n = 12 f = 1.3 '%s %05d %0.2f' %(s,n,f) 'python 00012 1.33' i want to see how casting is handled. Thanks '{0} {1:05} {2:.2}'.format(s, n, f) 'python 00012 1.3' --

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread r
On Dec 20, 6:05 pm, Roy Smith r...@panix.com wrote: In article b58f588a-e8db-41df-a488-f7df62d56...@w39g2000prb.googlegroups.com,  walterbyrd walterb...@iname.com wrote: On Dec 19, 10:25 am, Michael Torrie torr...@gmail.com wrote: Personally the new string formatter is sorely needed in

Re: best way to code

2008-12-20 Thread miya
On Dec 19, 2:35 pm, Peter Otten __pete...@web.de wrote: eric wrote: hi, I need to find a good design pattern to instanciate, and add specific code all in one. Let me explain it : I need to define some code, better be in a class, something like class LinkA(object):     def

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread r
Thanks MRAB, except the float is not 2 decimal places, but its there Come on... They did this for the interpreter not us. It's easer to parse this string with positional arguments and a dict of format descriptions. Come on pydev, at least be honest about it! --

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread bearophileHUGS
walterbyrd: As I understand it, that may have been true at one time. But, Ruby 1.9 very significantly sped up the language. While Python has been made slower, Ruby has been made much faster. I have already answered regarding Python3 in this thread. Regarding Ruby you are right, in computer

Re: subprocess.Popen inheriting

2008-12-20 Thread Aaron Brady
On Dec 18, 7:21 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Thu, 18 Dec 2008 19:46:45 -0200, Aaron Brady castiro...@gmail.com   escribió: snip On Windows, file handles are the real OS stuff, the true reference to an   open file. File descriptors are not, they exist only to please

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Roy Smith
In article 6b4176c3-49ce-4e7c-bced-07d8d19bc...@s20g2000yqh.googlegroups.com, r rt8...@gmail.com wrote: You can't just blindly Parrot off.. well CPU's get faster every year. Sure you can :-) There was a nice treatment of this on slashdot today

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread MRAB
r wrote: Thanks MRAB, except the float is not 2 decimal places, but its there Oops! '{0} {1:05} {2:.2f}'.format(s, n, f) 'python 00012 1.33' '{0:s} {1:05d} {2:.2f}'.format(s, n, f) 'python 00012 1.33' -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL on 3.x?

2008-12-20 Thread Daniel Fetchinson
Does anyone know if PIL will be ported to the 3.x branch? Have you considered e-mail to the author? No, I haven't because in my experience open source software authors prefer to keep discussion of their software on mailing lists, forums, etc, where others can benefit from the answers too.

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Steven D'Aprano
On Sat, 20 Dec 2008 16:20:38 -0800, r wrote: On Dec 20, 6:05 pm, Roy Smith r...@panix.com wrote: I had an interesting experience with this recently.  I was giving a co-worker quick python into.  He's an experienced programer in various languages, but this was his first exposure to python.

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Steven D'Aprano
On Sat, 20 Dec 2008 15:27:43 -0800, walterbyrd wrote: On Dec 19, 10:25 am, Michael Torrie torr...@gmail.com wrote: Personally the new string formatter is sorely needed in Python. Really? You know, it's funny, but when I read problems that people have with python, I don't remember seeing

a small doubt

2008-12-20 Thread Piyush Anonymous
i wrote this code -- class Person(object): instancesCount = 0 def __init__(self, title=): Person.instancesCount += 1 self.id = tempst def testprint(self): print blah blah def __getattribute__(self, name): print in get attribute a = Person()

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread r
On Dec 20, 7:38 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sat, 20 Dec 2008 16:20:38 -0800, r wrote: On Dec 20, 6:05 pm, Roy Smith r...@panix.com wrote: I had an interesting experience with this recently.  I was giving a co-worker quick python into.  He's an

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Aaron Brady
On Dec 20, 7:38 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Instead of just whinging, how about making a suggestion to fix it? Go on, sit down for an hour or ten and try to work out how a BINARY OPERATOR like % (that means it can only take TWO arguments) can deal with an

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Steven D'Aprano
On Sat, 20 Dec 2008 16:01:58 -0800, r wrote: Just to be on record, i am OK with adding a new way to do this as long as the old C style str format does not ever go away. I don't like 20 ways to do the same thing, but i really like the compact way of %formating now. % formatting isn't compact

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Steven D'Aprano
On Sat, 20 Dec 2008 17:54:09 -0800, r wrote: Would you like to elaborate on -why- escaped backslashes are needed in strings... i waiting??? If you can't escape backslashes in strings, how do you create a string containing a backslash? -- Steven --

Re: subprocess.Popen inheriting

2008-12-20 Thread Aaron Brady
On Dec 20, 7:06 pm, Aaron Brady castiro...@gmail.com wrote: On Dec 18, 7:21 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Thu, 18 Dec 2008 19:46:45 -0200, Aaron Brady castiro...@gmail.com   escribió: snip Will it take calling 'CreatePipe' from ctypes directly if on

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread MRAB
bearophileh...@lycos.com wrote: walterbyrd: As I understand it, that may have been true at one time. But, Ruby 1.9 very significantly sped up the language. While Python has been made slower, Ruby has been made much faster. I have already answered regarding Python3 in this thread. Regarding

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread r
Answering a question with a question, that leaves me with a question of my own?? Instead of just whinging, how about making a suggestion to fix it? Go on, sit down for an hour or ten and try to work out how a BINARY OPERATOR like % (that means it can only take TWO arguments) can deal with an

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Steven D'Aprano
On Sat, 20 Dec 2008 17:55:35 -0800, Aaron Brady wrote: On Dec 20, 7:38 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Instead of just whinging, how about making a suggestion to fix it? Go on, sit down for an hour or ten and try to work out how a BINARY OPERATOR like % (that

Re: PIL on 3.x?

2008-12-20 Thread John Machin
On Dec 21, 12:32 pm, Daniel Fetchinson fetchin...@googlemail.com wrote: Does anyone know if PIL will be ported to the 3.x branch? Have you considered e-mail to the author? No, I haven't because in my experience open source software authors prefer to keep discussion of their software on

Re: a small doubt

2008-12-20 Thread MRAB
Piyush Anonymous wrote: i wrote this code -- class Person(object): instancesCount = 0 def __init__(self, title=): Person.instancesCount += 1 self.id http://self.id = tempst def testprint(self): print blah blah def __getattribute__(self, name):

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread MRAB
Aaron Brady wrote: On Dec 20, 7:38 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Instead of just whinging, how about making a suggestion to fix it? Go on, sit down for an hour or ten and try to work out how a BINARY OPERATOR like % (that means it can only take TWO arguments)

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Steven D'Aprano
On Sat, 20 Dec 2008 18:23:00 -0800, r wrote: Answering a question with a question, that leaves me with a question of my own?? Instead of just whinging, how about making a suggestion to fix it? Go on, sit down for an hour or ten and try to work out how a BINARY OPERATOR like % (that means

linecache vs egg - reading line of a file in an egg

2008-12-20 Thread R. Bernstein
Does linecache work with source in Python eggs? If not, is it contemplated that this is going to be fixed or is there something else like linecache that currently works? Right now, I think pdb and pydb (and probably other debuggers) are broken when they try to trace into code that is part of an

Re: linecache vs egg - reading line of a file in an egg

2008-12-20 Thread Robert Kern
R. Bernstein wrote: Does linecache work with source in Python eggs? If not, is it contemplated that this is going to be fixed or is there something else like linecache that currently works? linecache works with eggs and other zipped Python source, but it had to extend the API in order to do

Re: linecache vs egg - reading line of a file in an egg

2008-12-20 Thread Chris Rebert
On Sat, Dec 20, 2008 at 7:18 PM, R. Bernstein ro...@panix.com wrote: Does linecache work with source in Python eggs? If not, is it contemplated that this is going to be fixed or is there something else like linecache that currently works? I believe it already does. FYI, eggs are just zip files

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread walterbyrd
On Dec 20, 5:05 pm, Roy Smith r...@panix.com He got really hung up on the % syntax. I guess it's good to know that there is, at least, one person in the world doesn't like the % formatting. As least the move was not entirely pointless. But, you must admit, of all the things people complain

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Kay Schluehr
On 20 Dez., 02:54, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Debated by who? The entire Python-using community? Every single Python programmer? Or just the small proportion of Python developers who are also core developers? If I'd asked people what they wanted, they would

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread r
On Dec 20, 11:11 pm, walterbyrd walterb...@iname.com wrote: On Dec 20, 5:05 pm, Roy Smith r...@panix.com He got really hung up on the % syntax. I guess it's good to know that there is, at least, one person in the world doesn't like the % formatting. As least the move was not entirely

Question: Evaluate an string variable's value to a variable

2008-12-20 Thread Mir Nazim
Just a quick question. For example I have class X pass Then I do x = X() x.name = 'Nazim Now my question is whether something like below is possible and how y = 'name' print x.y # How can x.y can be evaluated to x.name PS: In PHP this can be done by a $x-$y. I sure there is some

Re: Question: Evaluate an string variable's value to a variable

2008-12-20 Thread Chris Rebert
On Sat, Dec 20, 2008 at 10:49 PM, Mir Nazim mirna...@gmail.com wrote: Just a quick question. For example I have class X pass Then I do x = X() x.name = 'Nazim Now my question is whether something like below is possible and how y = 'name' print x.y # How can x.y can be

Re: Question: Evaluate an string variable's value to a variable

2008-12-20 Thread Mir Nazim
On Dec 21, 11:56 am, Chris Rebert c...@rebertia.com wrote: On Sat, Dec 20, 2008 at 10:49 PM, Mir Nazim mirna...@gmail.com wrote: Just a quick question. For example I have class X pass Then I do x = X() x.name = 'Nazim Now my question is whether something like below is

trapping all method calls in a class...

2008-12-20 Thread Piyush Anonymous
hi, i need to trap all method calls in a class in order to update a counter which is increased whenever a method is called and decreased whenever method returns. in order to that i am trying to write a decorator for all the methods. see the code here with error. ---

Re: trapping all method calls in a class...

2008-12-20 Thread Chris Rebert
On Sat, Dec 20, 2008 at 11:12 PM, Piyush Anonymous piyush.subscript...@gmail.com wrote: hi, i need to trap all method calls in a class in order to update a counter which is increased whenever a method is called and decreased whenever method returns. in order to that i am trying to write a

[issue4701] range objects becomes hashable after attribute access

2008-12-20 Thread Hagen Fürstenau
Hagen Fürstenau hfuerste...@gmx.net added the comment: I don't believe there is any driving reason for them not to be hashable. On the other hand, what is the use case for hashing objects whose equality is defined as object identity? Python 3.0 (r30:67503, Dec 4 2008, 06:47:38) [GCC 4.3.2]

[issue4704] Update pybench for python 3.0

2008-12-20 Thread Mark Dickinson
New submission from Mark Dickinson dicki...@gmail.com: pybench needs to be updated for Python 3.0, in particular to remove use of cmp. Here's a patch, against the py3k branch. Questions (mainly for Marc-André Lemburg): 1. Should the version number be bumped for *all* tests, or just for

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Still to do: pybench needs updating to remove a cmp reference; since the changes required for pybench are a little bit more substantial than simple cmp replacement, I've broken this out into a separate issue: issue 4704. There are many

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Should Py_CmpToRich (in object.c) disappear? It's currently used in longobject.c, but nowhere else as far as I can tell. It shouldn't be too hard to update longobject.c to remove the use. ___ Python

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I also think we should consider hard adding more modules that are loaded at startup time to py3k already huge list. My patch uses tokenize modules in setup.py bootstrap. But it doesn't affect Python classic usage python or

[issue4704] Update pybench for python 3.0

2008-12-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: On 2008-12-20 11:54, Mark Dickinson wrote: New submission from Mark Dickinson dicki...@gmail.com: pybench needs to be updated for Python 3.0, in particular to remove use of cmp. Here's a patch, against the py3k branch. Questions

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It shouldn't be too hard to update longobject.c to remove the use. I'll do that one. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1717 ___

[issue4565] io write() performance very slow

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: We can't solve this for 3.0.1, downgrading to critical. -- priority: release blocker - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4565

[issue4561] Optimize new io library

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: We can't solve this for 3.0.1, downgrading to critical. -- priority: release blocker - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4561

[issue4533] 3.0 file.read dreadfully slow

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Since it is solved for 3.x and only needs to be bacported to 2.x (where the io module isn't the default), downgrading to critical. -- nosy: +pitrou priority: release blocker - critical ___ Python

[issue3618] possible deadlock in IO library (Lib/io.py)

2008-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I hope that this issue will be fixed by io-c (io library rewritten in C language). ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3618

[issue3106] speedup some comparisons

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I committed the patch, which will also help #1717. Thanks! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3106

[issue1717] Get rid of more refercenes to __cmp__

2008-12-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It shouldn't be too hard to update longobject.c to remove the use. I'll do that one. Done in r67871, r67873. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1717

[issue4705] python3.0 -u: unbuffered stdout

2008-12-20 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: I like and I need an unbuffered standard output which was provided by -u command line option (or PYTHONUNBUFFERED environment variable). Current status of -u option in Python3: the option exists and change the buffer size

[issue1068268] subprocess is not EINTR-safe

2008-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: naufraghi there are a lot of other places where EINTR naufraghi can cause and error. Can you write a list of these places? ___ Python tracker rep...@bugs.python.org

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: In the ZIP file format, a filename is a byte string because we don't know the encoding. You can not guess the encoding because it's not stored in the ZIP file and it depends on the OS and the OS configuration. So t1.filename have

[issue4621] zipfile returns string but expects binary

2008-12-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, I see that zipfile.py uses the following code to choose the filename encoding: if flags 0x800: # UTF-8 file names extension filename = filename.decode('utf-8') else:

  1   2   >