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 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 decorator for all the > method

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. --- http://codepad.org/2w7JVvDB

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" wrote: > On Sat, Dec 20, 2008 at 10:49 PM, Mir Nazim 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 possi

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 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 ca

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

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread r
On Dec 20, 11:11 pm, walterbyrd wrote: > On Dec 20, 5:05 pm, Roy Smith > > > 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 adm

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Kay Schluehr
On 20 Dez., 02:54, Steven D'Aprano 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 have asked for a better horse." He

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread walterbyrd
On Dec 20, 5:05 pm, Roy Smith > 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 about with Python

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 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 with a certa

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 so

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 eg

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

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 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 arbitrary number of a

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 = "tempst" def testprint(self): print "blah blah" def __getattribute__(self, name):

Re: PIL on 3.x?

2008-12-20 Thread John Machin
On Dec 21, 12:32 pm, "Daniel Fetchinson" 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 mailing lists, fo

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 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 ca

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 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 Rub

Re: subprocess.Popen inheriting

2008-12-20 Thread Aaron Brady
On Dec 20, 7:06 pm, Aaron Brady wrote: > On Dec 18, 7:21 pm, "Gabriel Genellina" > wrote: > > > > > En Thu, 18 Dec 2008 19:46:45 -0200, Aaron Brady   > > escribió: > snip > > > Will it take calling > > > 'CreatePipe' from ctypes directly if on Windows?  Or can 'os.pipe' be > > > made to abstract

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 -- http://mail.python.org/mailman/listinfo/p

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 compa

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Aaron Brady
On Dec 20, 7:38 pm, Steven D'Aprano 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 > arbitrary number of arguments, *wit

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread r
On Dec 20, 7:38 pm, Steven D'Aprano wrote: > On Sat, 20 Dec 2008 16:20:38 -0800, r wrote: > > On Dec 20, 6:05 pm, Roy Smith 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, b

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() a

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 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

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 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. >> >> He g

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 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: 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 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 (http://www.codinghorror.com/blog/archives/001198.html).

Re: subprocess.Popen inheriting

2008-12-20 Thread Aaron Brady
On Dec 18, 7:21 pm, "Gabriel Genellina" wrote: > En Thu, 18 Dec 2008 19:46:45 -0200, Aaron Brady   > 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 the C   > runtime library. Programs n

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 s

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! -- http://mail.python.org/mailman/listi

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):

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread r
On Dec 20, 6:05 pm, Roy Smith wrote: > In article > , > >  walterbyrd wrote: > > On Dec 19, 10:25 am, Michael Torrie 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 d

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' -- http://mail.pytho

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread r
On Dec 20, 5:27 pm, walterbyrd wrote: > On Dec 19, 10:25 am, Michael Torrie 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 > com

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread Roy Smith
In article , walterbyrd wrote: > On Dec 19, 10:25 am, Michael Torrie 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 > compl

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 to

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 cou

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread MRAB
walterbyrd wrote: On Dec 19, 12:43 pm, excord80 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" %

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 walterbyrd
On Dec 20, 4:34 pm, r 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. -- http://mail.python.org/mailman/listinfo/python-lis

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 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:25 am, Michael Torrie 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. Some people comp

Re: New Python 3.0 string formatting - really necessary?

2008-12-20 Thread walterbyrd
On Dec 19, 12:43 pm, excord80 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, v) for k, v

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 wrote: : > - I can't draw but I can tell lout to draw for me and that works well >

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. Nob

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: Generator slower than iterator?

2008-12-20 Thread Federico Moreira
Wow, thanks again =) -- 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-li

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

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

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

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

teenflood - Free

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

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 H

Re: Namespaces, multiple assignments, and exec()

2008-12-20 Thread Luis M . González
On Dec 19, 11:34 pm, 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 identical, but th

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 ea

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(): > > ..

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, Arnaud Delobelle wrote: > John O'Hagan 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... > > >

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 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 reason

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 http://www.holde

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 do

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 updat

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 yo

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

2008-12-20 Thread Diez B. Roggisch
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 - depend

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 -- http://mail.python.org

Re: Jarow-Winkler algorithm: Measuring similarity between strings

2008-12-20 Thread John Machin
On Dec 20, 7:07 pm, Øyvind wrote: > Thanks for the useful comments. > > On 20 Des, 01:38, John Machin wrote: > > > On Dec 20, 10:02 am, Øyvind wrote: > > > > Based on examples and formulas > > > fromhttp://en.wikipedia.org/wiki/Jaro-Winkler. > > > For another Python implementation, google "febr

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 do

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 r

Re: ANN: New Book: Programming in Python 3

2008-12-20 Thread Mark Summerfield
On 20 Dec, 00:32, "Colin J. Williams" 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,

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 w

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, 20

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 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 the goals of

Re: Namespaces, multiple assignments, and exec()

2008-12-20 Thread Arnaud Delobelle
John O'Hagan 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 argument is

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) BTW, an apparently, non platform-neutral way may be described h

Re: mod_python resources

2008-12-20 Thread Graham Dumpleton
On Dec 20, 2:47 pm, "Anjanesh Lekshminarayanan" 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 not be a mod_

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: Jarow-Winkler algorithm: Measuring similarity between strings

2008-12-20 Thread Øyvind
Thanks for the useful comments. On 20 Des, 01:38, John Machin wrote: > On Dec 20, 10:02 am, Øyvind wrote: > > > Based on examples and formulas > > fromhttp://en.wikipedia.org/wiki/Jaro-Winkler. > > For another Python implementation, google "febrl". > > > Useful for measuring similarity between

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