Today' TopicManagerial Values and ethos

2008-12-19 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: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread r
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 for > > it!

Re: encoding problem

2008-12-19 Thread Joe Strout
Marc 'BlackJack' Rintsch wrote: I don't see the shortcoming in Python <3.0. If you want real strings with characters instead of just a bunch of bytes simply use `unicode` objects instead of `str`. Fair enough -- that certainly is the best policy. But working with any other encoding (sometimes

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread rdmurray
Quoth Steven D'Aprano : > Whether using % or format(), I don't see the need to change the code, > only the strings. > > Using positional arguments is not really that different: > > "{0} {1}".format("dead", "parrot") > "{0} {1}".format("perroquet", "mort") This should be something like: _("{0}

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steve Holden
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 for > it! Especially when this breaks code, and the "French Conn

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steve Holden
Steven D'Aprano wrote: > On Fri, 19 Dec 2008 10:25:30 -0700, Michael Torrie wrote: > >> So funny that now that Python 3.0 is actually released we have people >> acting all surprised like they've never seen any of the new features in >> Python 3.0 coming. However these features have been discussed

Re: mod_python resources

2008-12-19 Thread Anjanesh Lekshminarayanan
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 be mod_wsgi binaries for Python 3.0. -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Sat, 20 Dec 2008 01:54:35 +, Steven D'Aprano wrote: > There clearly is a need for a more heavyweight formatting solution than > % and string.Template. There are things that can't be done easily with % > alone, and format() will make them much simpler. I have no objection to > the addition o

Re: Namespaces, multiple assignments, and exec()

2008-12-19 Thread Steven D'Aprano
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 in ['A', 'B', 'C']: ... vars()[na

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread r
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 for it! Especially when this breaks code, and the "French Connection" is not good

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 17:12:00 -0800, r wrote: > 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 remember.

Re: Namespaces, multiple assignments, and exec()

2008-12-19 Thread MRAB
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 identical, but the first argumen

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread rdmurray
Quoth Steven D'Aprano : >The second exception is if the word ends with an S. In British English, >you put the apostrophe after the S: > >Thomas' approach is wholly practical. > >In American English, they often (but not always) add an extra S: > >Thomas's approach is wholly practical. > >which in my

Re: Namespaces, multiple assignments, and exec()

2008-12-19 Thread Terry Reedy
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 the first argument is a string of the

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 19:35:20 -0500, Colin J. Williams wrote: > Steve Holden wrote: >> Thomas Heller wrote: (Fixing broken unicode again) >>> "One of Python's great strengths" >>> ^ >>> "and also teaches Python's functional programming features" >>> ^

Namespaces, multiple assignments, and exec()

2008-12-19 Thread John O'Hagan
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 a string of the name being assigned.

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 16:05:42 -0800, Scott David Daniels wrote: > Ah, but for internationalization, you can change the format string to > take args in a different order if, for example, French messages want > modifiers on one side and English on the other. The code can stay the > same, while only t

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Carl Banks
On Dec 19, 12:10 pm, Christian Heimes wrote: > walterbyrd schrieb: > > > On Dec 19, 9:13 am, "Giampaolo Rodola'" wrote: > >> You can use the old 2.x syntax also in Python 3.x: > > > Yeah, but it's deprecated, and - as I understand it - may be removed > > completely in future versions. Also, in th

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread MRAB
Steven D'Aprano wrote: On Fri, 19 Dec 2008 18:53:22 +0100, Thomas Heller wrote: Steve Holden schrieb: Thomas Heller wrote: Question from a non-native english speaker: is this now valid english? "One of Python’s great strengths" ^ "and also teaches Python’s functional prog

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Carl Banks
On Dec 19, 7:12 pm, 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? You were the one that brought it up, chief. I doubt anyone is arguing that this new formating was added just to make things eas

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 19:10:59 +0100, Christian Heimes wrote about % formatting in Python 3: > It's not going to be removed for many years - if ever. The % string > formatting system is not deprecated in 3.0. For that very reason it must > stay until 3.2. We don't have plans to deprecate it in 3.1

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 19:32:22 -0500, Colin J. Williams wrote: (Fixing broken unicode.) >> Question from a non-native english speaker: is this now valid english? >> >> "One of Python's great strengths" >> ^ >> "and also teaches Python's functional programming features" >>

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 18:53:22 +0100, Thomas Heller wrote: > Steve Holden schrieb: >> Thomas Heller wrote: >>> Question from a non-native english speaker: is this now valid english? >>> >>> "One of Python’s great strengths" >>> ^ >>> "and also teaches Python’s functional program

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Steve Holden
Colin J. Williams wrote: > Steve Holden wrote: >> Thomas Heller wrote: [...] >>> Question from a non-native english speaker: is this now valid english? >>> >>> "One of Python’s great strengths" >>> ^ >>> "and also teaches Python’s functional programming features" >>>

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 10:44:25 -0800, r wrote: > And lets not forget Python forcing of indention, that is Pythons > greatest strength! Oh "r", haven't you heard? Python has braces too. Just start your code with from __future__ import braces and see what happens. -- Steven -- http://mail.pyt

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 10:25:30 -0700, Michael Torrie wrote: > So funny that now that Python 3.0 is actually released we have people > acting all surprised like they've never seen any of the new features in > Python 3.0 coming. However these features have been discussed for > years! And debated! D

Re: Jarow-Winkler algorithm: Measuring similarity between strings

2008-12-19 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Øyvind wrote: > Based on examples and formulas from http://en.wikipedia.org/wiki/Jaro-Winkler. > Useful for measuring similarity between two strings. For example if > you want to detect that the user did a typo. Jaro-Winkler is best when dealing with

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 09:55:01 -0800, bearophileHUGS wrote: > C string formatting is short and a flexible enough, but it's out of > place in a language as high level as Python3. The new syntax allows more > flexibility, and it's better for most people that don't know C already, > like newbies, etc.

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread r
Scott, Oh, so Python 3.0 is an Equal Opportunity Enigma, now i get it :D Steve, Obviously i was referring to the look, not the actuality of a tuple 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 disagr

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Aaron Brady
On Dec 19, 1:43 pm, excord80 wrote: snip cons of Python > But, Python is Python. It's always surprising to me to hear this, but especially so in writing. It speech, it has connotations. A millionaire can say (dismissively), "Two bucks is two bucks." A poor person can say (wondrously), "Two bu

download nero express for free - Free

2008-12-19 Thread mirandasnailvv
download nero express for free . . . ***CLICK HERE http://club247.cn/download-nero-express-for-free * . . . . . . . . . . . . download nero express for free -- http://mail.python.org/mailman/listinfo/python-list

mixed wrestling pantyhose - Free

2008-12-19 Thread mirandasnailvv
mixed wrestling pantyhose . . . ***CLICK HERE http://club247.cn/mixed-wrestling-pantyhose * . . . . . . . . . . . . mixed wrestling pantyhose -- http://mail.python.org/mailman/listinfo/python-list

dancer exotic photography - Free

2008-12-19 Thread mirandasnailvv
dancer exotic photography . . . ***CLICK HERE http://club247.cn/dancer-exotic-photography * . . . . . . . . . . . . dancer exotic photography -- http://mail.python.org/mailman/listinfo/python-list

interracial wife galleries - Free

2008-12-19 Thread mirandasnailvv
interracial wife galleries . . . ***CLICK HERE http://club247.cn/interracial-wife-galleries * . . . . . . . . . . . . interracial wife galleries -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Colin J. Williams
Thomas Heller wrote: Steve Holden schrieb: Thomas Heller wrote: Question from a non-native english speaker: is this now valid english? "One of Python’s great strengths" ^ "and also teaches Python’s functional programming features" ^ "The book

Re: Jarow-Winkler algorithm: Measuring similarity between strings

2008-12-19 Thread John Machin
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 two strings. For example if > you want to detect that the user did a typo. You mean lik

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Colin J. Williams
Steve Holden 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 introduction, the first few pages of the first cha

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Colin J. Williams
Stefan Behnel 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 introduction, the first few pages of the first ch

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Colin J. Williams
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 introduction, the first few pages of the first chapter, the whole of ch

Re: mod_python resources

2008-12-19 Thread Daniel Fetchinson
> Here's my problem (it's a conceptual one). Coming from the world of > mod_php, each file can represent a page with no intervention. I was > not able to achieve the same with mod_python when I tried, and for > that matter, couldn't put the pieces together in a usable way. > > Let me start simply:

Re: IDLE doesn't show stderr output from extension modules

2008-12-19 Thread Scott David Daniels
Brian Cole wrote: I'm importing an extension module created with SWIG. When working with the module interactively in IDLE there should be warning and error messages printed to stderr by the extension module. However, these are not being caught by the IDLE window, they are going directly to the te

Re: setup.py installs modules to a wrong place

2008-12-19 Thread otrajman
Michal, I'm seeing this on fc8 with a custom built python2.6. Not happening with any other packages (e.g. boto). Workaround of course was just to copy the S3 dir to /usr/local/lib/python2.6/site-packages. I poked around a bit but nothing obvious jumped out. Happy to do any debugging if you hav

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Scott David Daniels
excord80 wrote: On Dec 19, 11:01 am, walterbyrd wrote: To me, it seems that this: print "%s=%d" % ('this',99) Is much easier, ... This (if it's right) is much longer, ... print( "{0}={1}".format('this',99)) Yeah, I like the old way better too. It's got this nice elegant simplicity to it (usi

Re: encoding problem

2008-12-19 Thread John Machin
On Dec 20, 10:02 am, Marc 'BlackJack' Rintsch wrote: > On Fri, 19 Dec 2008 15:20:08 -0700, Joe Strout wrote: > > Marc 'BlackJack' Rintsch wrote: > > >>> And because strings in Python, unlike in (say) REALbasic, do not know > >>> their encoding -- they're just a string of bytes.  If they were a > >

Re: IDLE doesn't show stderr output from extension modules

2008-12-19 Thread Robert Kern
Brian Cole wrote: I'm importing an extension module created with SWIG. When working with the module interactively in IDLE there should be warning and error messages printed to stderr by the extension module. However, these are not being caught by the IDLE window, they are going directly to the te

Re: Very Slow PythonWin 2.6.1 Startup on Windows XP SP3

2008-12-19 Thread David Lees
Allan wrote: David Lees writes: PythonWin used to startup in a second or two on my Windows XP desktop. now it takes around 20 seconds. I tried turning off Google Desktop indexing and Norton AV, but it still takes a long time to start. Other random apps such as Firefox 3.0 (which I just updat

Re: encoding problem

2008-12-19 Thread Marc 'BlackJack' Rintsch
On Fri, 19 Dec 2008 15:20:08 -0700, Joe Strout wrote: > Marc 'BlackJack' Rintsch wrote: > >>> And because strings in Python, unlike in (say) REALbasic, do not know >>> their encoding -- they're just a string of bytes. If they were a >>> string of bytes PLUS an encoding, then every string would k

Jarow-Winkler algorithm: Measuring similarity between strings

2008-12-19 Thread Øyvind
Based on examples and formulas from http://en.wikipedia.org/wiki/Jaro-Winkler. Useful for measuring similarity between two strings. For example if you want to detect that the user did a typo. def jarow(s1,s2): """ Returns a number between 1 and 0, where 1 is the most similar examp

Re: Generator slower than iterator?

2008-12-19 Thread Arnaud Delobelle
MRAB writes: > Federico Moreira wrote: >> Great, 2min 34 secs with the open method =) >> >> but why? >> >> ip, sep, rest = line.partition(' ') >>match_counter[ip] += 1 >> >> instead of >> >> match_counter[line.strip()[0]] += 1 >> >> strip really takes more time than partition? >> >> I'm h

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steve Holden
r wrote: [...] > Like Python’s forcing of empty tuple in function calls, that is a good > idea. This allows you to clearly see arguments in source code. I like > in Python there is only one, or a very minimal number of ways to do > something(but usually only one is the best). Ruby is littered with

IDLE doesn't show stderr output from extension modules

2008-12-19 Thread Brian Cole
I'm importing an extension module created with SWIG. When working with the module interactively in IDLE there should be warning and error messages printed to stderr by the extension module. However, these are not being caught by the IDLE window, they are going directly to the terminal that was used

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

2008-12-19 Thread Grant Edwards
On 2008-12-19, Jean-Paul Calderone wrote: > On Fri, 19 Dec 2008 08:47:18 -0800 (PST), Martin wrote: >>Currently I am trying to get used to Python's imaplib and email >>modules. >>I'like to create a webmail client simmilar to GMail. > > I'd suggest using Twisted's IMAP4 client. It's somewhat easi

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Mark Summerfield
On 19 Dec, 19:52, excord80 wrote: > On Dec 4, 2:42 pm, Alan G Isaac wrote: > > > Mark Summerfield wrote: > > > "Programming in Python 3: > > > A Complete Introduction to the Python Language" > > > ISBN 0137129297 > > >http://www.qtrac.eu/py3book.html > > > OMG, you really wrote it in Lout? > > I

Re: encoding problem

2008-12-19 Thread Joe Strout
Marc 'BlackJack' Rintsch wrote: And because strings in Python, unlike in (say) REALbasic, do not know their encoding -- they're just a string of bytes. If they were a string of bytes PLUS an encoding, then every string would know what it is, and things like conversion to another encoding, or co

how to convert pymedia.audio.acodec ACString to ctypes.c_char_p

2008-12-19 Thread sanket
Hello All Experts, I am quite new to Ctypes. I am using one c library and writing python bindings for it. I need to pass a character pointer to one function. I am reading one mp3 file and decoding it to raw pcm using pymedia. Now I need to pass this raw data in to a C function. Here is my code.

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Ben Finney
Michael Torrie writes: > Personally the new string formatter is sorely needed in Python. And > they way it has been implemented is a thing of beauty. Basically the > burden of formatting strings has been moved from the print > statement/function to the objects themselves. This doesn't describe a

Re: encoding problem

2008-12-19 Thread Marc 'BlackJack' Rintsch
On Fri, 19 Dec 2008 08:20:07 -0700, Joe Strout wrote: > Marc 'BlackJack' Rintsch wrote: > >>> The question is why the Python interpreter use the default encoding >>> instead of "utf-8", which I explicitly declared in the source. >> >> Because the declaration is only for decoding unicode literals

Big Tits Big Boobs

2008-12-19 Thread blady
http://yeba.pl/show/movies/6044/pucybutka -- http://mail.python.org/mailman/listinfo/python-list

Re: mod_python resources

2008-12-19 Thread tmallen
Here's my problem (it's a conceptual one). Coming from the world of mod_php, each file can represent a page with no intervention. I was not able to achieve the same with mod_python when I tried, and for that matter, couldn't put the pieces together in a usable way. Let me start simply: If I wanted

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Marc 'BlackJack' Rintsch
On Fri, 19 Dec 2008 10:44:25 -0800, r wrote: > ~Bearophile, > Thanks for your civil approach to this conversation but I must disagree > with you on the new string formatting syntax. You said the new syntax is > suppost to be easier on the n00b , I say it pollutes a students mind. > What is wrong w

Re: PIL on 3.x?

2008-12-19 Thread M�ta-MCI (MVP)
Hi! This info is interesting for many people. IMO, it's a good idea to write the question in this newsgroup. @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

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

2008-12-19 Thread Chris Rebert
On Fri, Dec 19, 2008 at 11:54 AM, Michael Torrie wrote: > Martin wrote: >> Currently I am trying to get used to Python's imaplib and email >> modules. >> I'like to create a webmail client simmilar to GMail. > > This is off-topic, but why on earth would you want to emulate Gmail's > conversation vi

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Carl Banks
On Dec 19, 12:44 pm, r wrote: > ~Michael, > What’s next down this road of self destruction? Hey guys, forget about > about empty parenthesis on a function/method call,  we should not have > to waste are time typing them… Wait forget about them all together and > we will just write Ruby code… > > D

Re: weird dict problem, how can this even happen?

2008-12-19 Thread Scott David Daniels
Joel Hedlund wrote: Scott David Daniels wrote: Perhaps your hash function could be something like: I'm not sure I understand what you're suggesting. /Joel Sorry, a half-thought out idea based on the fact that you wanted a consistent hash for a varying dictionary. The given dictionary subcl

[ANN] Python 2.4.6 and 2.5.3 (final)

2008-12-19 Thread Martin v. Löwis
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.4.6 and 2.5.3 (final). 2.5.3 is the last bug fix release of Python 2.5. Future 2.5.x releases will only include security fixes. According to the release notes, about 80 bugs and patches

Re: Factoring Polynomials

2008-12-19 Thread Scott David Daniels
Tim Rowe wrote: 2008/12/18 Scott David Daniels : def quadsolve(a, b, c): try: discriminant = sqrt(b**2 - 4 * a * c) The discriminant of a quadratic is more usually just the b**2 - 4 * a * c part, not the square root of it. Testing that for negative, zero or positive avoids the need

Re: pymssql for python 2.6 ?

2008-12-19 Thread M�ta-MCI (MVP)
Hi! Look at http://www.mayukhbose.com/python/ado/ado-connection.php That run OK with Python 2.6 @-salutations -- MCI -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL on 3.x?

2008-12-19 Thread John Machin
On Dec 20, 6:55 am, "Daniel Fetchinson" wrote: > Does anyone know if PIL will be ported to the 3.x branch? Have you considered e-mail to the author? -- http://mail.python.org/mailman/listinfo/python-list

Re: Building a web questionnaire, can it be done in Python ?

2008-12-19 Thread excord80
On Dec 19, 11:58 am, Stef Mientki wrote: > hello, > > I'm considering building a web questionnaire in Python. > I've made several desktop applications in Python /  wxPython, > but I've no experience in using Python on a webserver, > and I don't have much knowledge about web applications in general

PIL on 3.x?

2008-12-19 Thread Daniel Fetchinson
Does anyone know if PIL will be ported to the 3.x branch? Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread excord80
On Dec 4, 2:42 pm, Alan G Isaac wrote: > Mark Summerfield wrote: > > "Programming in Python 3: > > A Complete Introduction to the Python Language" > > ISBN 0137129297 > >http://www.qtrac.eu/py3book.html > > OMG, you really wrote it in Lout? > I wish you would add to http://www.qtrac.eu/lout.html >

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

2008-12-19 Thread Michael Torrie
Martin wrote: > Currently I am trying to get used to Python's imaplib and email > modules. > I'like to create a webmail client simmilar to GMail. This is off-topic, but why on earth would you want to emulate Gmail's conversation views? It's horrible and a very broken way of viewing e-mail threads

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Benjamin Kaplan
On Fri, Dec 19, 2008 at 12:53 PM, Thomas Heller wrote: > Steve Holden schrieb: > > Thomas Heller wrote: > >> Question from a non-native english speaker: is this now valid english? > >> > >> "One of Python's great strengths" > >> ^ > >> "and also teaches Python's functional pro

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread excord80
On Dec 19, 11:01 am, walterbyrd wrote: > > To me, it seems that this: > > print "%s=%d" % ('this',99) > > Is much easier, and faster, to type, and is also easier to read and > understand. [snip] > > This (if it's right) is much longer, and requires more special > characters. > > print( "{0}={1}".f

pymssql for python 2.6 ?

2008-12-19 Thread TkNeo
when would pymssql come out with a release that is compatible with python 2.6 ? Thanks -TK -- http://mail.python.org/mailman/listinfo/python-list

Re: best way to code

2008-12-19 Thread eric
On Dec 19, 6:36 pm, eric wrote: > On Dec 19, 5: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

Segmentation fault in PyObjectMalloc on FreeBSD

2008-12-19 Thread youcancallmeal
I have a multithreaded python app running on FreeBSD (both 7.0 and 6.3) that crashes with a segmentation fault coming from PyObjectMalloc. This first happened using Python 2.5 built from Ports. I then pulled down r261 from Subversion and built that so I would have debugging symbols; it still crashe

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread r
~Michael, What’s next down this road of self destruction? Hey guys, forget about about empty parenthesis on a function/method call, we should not have to waste are time typing them… Wait forget about them all together and we will just write Ruby code… Def function arg arg arg arg arg arg “Yea, t

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread MRAB
bearophileh...@lycos.com wrote: r: I always thought of Python as an intuitive way to write C code.< C is a very low level language, not far from assembly, and often it's not intuitive at all. C string formatting is short and a flexible enough, but it's out of place in a language as high level

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Paul Rudin
Thomas Heller writes: > Steve Holden schrieb: >> Thomas Heller wrote: >>> Question from a non-native english speaker: is this now valid english? >>> >>> "One of Python’s great strengths" >>> ^ >>> "and also teaches Python’s functional programming features" >>>

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Christian Heimes
r schrieb: > I was actually looking forward to 3.0, but the more I hear about 3.0, > the more I am turned off. I think there are a lot of other > pythonista's and pythoneers out there who agree but are not saying > anything. This syntax for string formatting is completely ridiculous. No, it's very

RE:change string to unicode

2008-12-19 Thread jyoung79
Hi Steven and Peter, Thank you both very much for taking the time to answer my question. Your solutions work perfect! :-) Thanks again! Jay > How about > > >>> "\\u03b1".encode("ascii").decode("unicode-escape") > 'α' > > Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Christian Heimes
walterbyrd schrieb: > On Dec 19, 9:13 am, "Giampaolo Rodola'" wrote: >> You can use the old 2.x syntax also in Python 3.x: > > Yeah, but it's deprecated, and - as I understand it - may be removed > completely in future versions. Also, in the future, if you are working > with code from another dev

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread bearophileHUGS
r: > I always thought of Python as an intuitive way to write C code.< C is a very low level language, not far from assembly, and often it's not intuitive at all. C string formatting is short and a flexible enough, but it's out of place in a language as high level as Python3. The new syntax allows

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Thomas Heller
Steve Holden schrieb: > Thomas Heller wrote: >> Question from a non-native english speaker: is this now valid english? >> >> "One of Python’s great strengths" >> ^ >> "and also teaches Python’s functional programming features" >> ^ >> "The book’s app

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread r
I was actually looking forward to 3.0, but the more I hear about 3.0, the more I am turned off. I think there are a lot of other pythonista's and pythoneers out there who agree but are not saying anything. This syntax for string formatting is completely ridiculous. What is the purpose of breaking b

Re: Building a web questionnaire, can it be done in Python ?

2008-12-19 Thread Steve Bergman
The most popular choice for web apps, and the one I use myself, would be Django. You might post your question in the Django group: http://groups-beta.google.com/group/django-users The only thing that I see that could be a problem would be the legacy database. But that depends very much upon you

Re: best way to code

2008-12-19 Thread eric
On Dec 19, 5: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-19 Thread Jean-Paul Calderone
On Fri, 19 Dec 2008 10:27:27 -0700, Michael Torrie wrote: walterbyrd wrote: On Dec 19, 9:13 am, "Giampaolo Rodola'" wrote: You can use the old 2.x syntax also in Python 3.x: Yeah, but it's deprecated, and - as I understand it - may be removed completely in future versions. Also, in the futu

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

2008-12-19 Thread Jean-Paul Calderone
On Fri, 19 Dec 2008 08:47:18 -0800 (PST), Martin wrote: Currently I am trying to get used to Python's imaplib and email modules. I'like to create a webmail client simmilar to GMail. I'd suggest using Twisted's IMAP4 client. It's somewhat easier to use than Python's imaplib because it does muc

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Michael Torrie
walterbyrd wrote: > On Dec 19, 9:13 am, "Giampaolo Rodola'" wrote: >> You can use the old 2.x syntax also in Python 3.x: > > Yeah, but it's deprecated, and - as I understand it - may be removed > completely in future versions. Also, in the future, if you are working > with code from another devel

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Michael Torrie
r wrote: > if 3.0 looks like... print( "{0}={1}".format('this',99)) , WTF... > thats retarded and looks like Ruby code. Thats not intuitive thats > madness! What happens when you need a conversion to string from an > integer, more code?? My faith is slipping. Have the python Gods gone > mad??. Plea

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread walterbyrd
On Dec 19, 9:13 am, "Giampaolo Rodola'" wrote: > You can use the old 2.x syntax also in Python 3.x: Yeah, but it's deprecated, and - as I understand it - may be removed completely in future versions. Also, in the future, if you are working with code from another developer, it's likely that develo

Re: If programming languages were religions...

2008-12-19 Thread Brian Allen Vanderburg II
martin.lal...@gmail.com wrote: very interesting http://www.aegisub.net/2008/12/if-programming-languages-were-religions.html "Python would be Humanism: It's simple, unrestrictive, and all you need to follow it is common sense. Many of the followers claim to feel relieved from all the burden impos

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Stefan Behnel
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 introduction, the first few pages of the first chapter,

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Steve Holden
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 introduction, the first few pages of the first chapter,

Re: Generator slower than iterator?

2008-12-19 Thread Federico Moreira
Yep i meant split sorry. Thanks for the answer! -- http://mail.python.org/mailman/listinfo/python-list

Re: How to parsing a sequence of integers

2008-12-19 Thread Joe Strout
Mensanator wrote: from __future__ import division at the top of the file. I put this at the top of all my Python files, whether I expect to be dividing or not. It just saves grief. If you want division to be floating point. If, like me, you rarely do floating point division and want the "/" t

Re: encoding problem

2008-12-19 Thread digisat...@gmail.com
On 12月19日, 下午9时34分, Marc 'BlackJack' Rintsch wrote: > On Fri, 19 Dec 2008 04:05:12 -0800, digisat...@gmail.com wrote: > > The below snippet code generates UnicodeDecodeError. > > #!/usr/bin/env > > python > > #--*-- coding: utf-8 --*-- > > s = 'äöü' > > u = unicode(s) > > > It seems that the syste

Building a web questionnaire, can it be done in Python ?

2008-12-19 Thread Stef Mientki
hello, I'm considering building a web questionnaire in Python. I've made several desktop applications in Python / wxPython, but I've no experience in using Python on a webserver, and I don't have much knowledge about web applications in general. As am quit familiar with Python, therefor it soun

  1   2   >