ANN: eGenix pyOpenSSL Distribution 0.8.0-0.9.8i-1

2008-12-19 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com pyOpenSSL Distribution Version 0.8.0-0.9.8i-1 An easy to install and use repackaged distribution of the pyOpenSSL Python

ikaaro 0.50.0 released

2008-12-19 Thread J. David Ibáñez
This is a Content Management System built on Python itools, among other features ikaaro provides: - content and document management (indexsearch, metadata, etc.) - multilingual user interfaces and content - high level modules: wiki, forum, tracker, etc. This release has seen the major

[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

Re: Tkinter unbinding

2008-12-19 Thread Bad Mutha Hubbard
Roger wrote: I've done a lot of googling for this topic and I fear that it's not possible. I have a widget that is overloaded with several bindings. I want to be able to unbind one method form the same Event without destroying all the other bindings to the same event that's associated to

Re: Minor Typo in doc

2008-12-19 Thread Kurt Mueller
Steve Holden schrieb: Kurt Mueller wrote: Hi There is a minor typo in the new doc in: http://www.python.org/doc/2.6/library/signal.html -- signal.SIG_DFL¶ This is one of two standard signal handling options; it will simply

Re: Tkinter unbinding

2008-12-19 Thread Bad Mutha Hubbard
Bad Mutha Hubbard wrote: Roger wrote: I've done a lot of googling for this topic and I fear that it's not possible. I have a widget that is overloaded with several bindings. I want to be able to unbind one method form the same Event without destroying all the other bindings to the same

Re: Python for amd64 and mingw-w64

2008-12-19 Thread David Cournapeau
On Fri, Dec 19, 2008 at 3:30 PM, Martin v. Löwis mar...@v.loewis.de wrote: It's a mistake if libpython26.a gets included in the Win64 installer at all; this library is only provided for 32-bit systems. My copy of mingw doesn't support Win64 at all. Please ignore that last point: it looks

If programming languages were religions...

2008-12-19 Thread gene
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 imposed by other languages, and that

Re: eval() and global variables

2008-12-19 Thread Peter Otten
Juan Pablo Romero Méndez wrote: The hack given by Peter works fine, except in this case: def (fn): ... f2 = lambda x,y:(x,y,fn(x,y)) ... function = type(f2) ... f3 = function(f2.func_code,dict()) ... print f3 ... (lambda x,y:x+y) Traceback (most recent call

Re: C API and memory allocation

2008-12-19 Thread Stefan Behnel
Aaron Brady wrote: Otherwise you can't know its length or change its reference count. The internal representation of Python byte strings is 0 terminated, so strlen() will work. As MRAB said, Python strings can contain null bytes, Sure, they can. Most byte strings I've seen didn't, though.

Online INTERNET JOBS

2008-12-19 Thread hotkatrina4u
Start Your Own INTERNET JOBS AT http://megalinesolutions.googlepages.com/ No Fee Required -- http://mail.python.org/mailman/listinfo/python-list

ANN: eGenix pyOpenSSL Distribution 0.8.0-0.9.8i-1

2008-12-19 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com pyOpenSSL Distribution Version 0.8.0-0.9.8i-1 An easy to install and use repackaged distribution of the pyOpenSSL Python

Re: importing csv file into sqlite

2008-12-19 Thread Peter Otten
James Mills wrote: values = ,.join([\%s\ % x for x in line]) print INSERT INTO %s %s VALUES (%s); % (table, fields, values) http://xkcd.com/327/ -- http://mail.python.org/mailman/listinfo/python-list

List comprehension in if clause of another list comprehension

2008-12-19 Thread vedr...@vedranf.mine.nu
Hi! In [69]: a = 'a b c' In [70]: b = 'a b, c d' In [74]: [i for i in a.split() if i not in b.split()] Out[74]: ['b'] Everything ok. In [77]: b.split() == [i for i in b.split()] Out[77]: True As expected. Now, put this in the first list comprehension: In [80]: [i for i in a.split() if i not

Re: Generator slower than iterator?

2008-12-19 Thread Raymond Hettinger
FedericoMoreirawrote: Hi all, Im parsing a 4.1GB apache log to have stats about how many times an ip request something from the server. The first design of the algorithm was for line in fileinput.input(sys.argv[1:]):     ip = line.split()[0]     if match_counter.has_key(ip):    

Re: Factoring Polynomials

2008-12-19 Thread Tim Rowe
2008/12/18 Scott David Daniels scott.dani...@acm.org: 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

[Pyrex] Compiling via setuptools

2008-12-19 Thread Kless
When I use the next command in my home system: $ python setup.py develop Pyrex compiles the '.pyx' file without any problem. But after of uploading it to Pypi, and when is installed via 'easy_install' it doesn't builds any more. (I had to upload the '.c' file compiled on my system) You can

Re: Removing None objects from a sequence

2008-12-19 Thread Raymond Hettinger
On Dec 12, 7:51 am, Marco Mariani ma...@sferacarta.com wrote: Filip Gruszczyński wrote: I am not doing it, because I need it. I can as well use if not elem is None, I suggest if elem is not None, which is not quite the same. They are semantically the same. In theory, Filip's would run

Re: List comprehension in if clause of another list comprehension

2008-12-19 Thread Peter Otten
Vedran Furac( wrote: Hi! In [69]: a = 'a b c' In [70]: b = 'a b, c d' In [74]: [i for i in a.split() if i not in b.split()] Out[74]: ['b'] Everything ok. In [77]: b.split() == [i for i in b.split()] Out[77]: True As expected. Now, put this in the first list comprehension: In

Re: importing csv file into sqlite

2008-12-19 Thread James Mills
On Fri, Dec 19, 2008 at 8:32 PM, Peter Otten __pete...@web.de wrote: James Mills wrote: values = ,.join([\%s\ % x for x in line]) print INSERT INTO %s %s VALUES (%s); % (table, fields, values) http://xkcd.com/327/ It's a tool! Not one meant to be used publicly from untrusted users. Free

15000$ per month

2008-12-19 Thread sapanapa...@gmail.com
1500$ per month… MAKE MONEY 24 HOUR, THE REAL ONLINE JOB, http://labnol.homestead.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: List comprehension in if clause of another list comprehension

2008-12-19 Thread vedr...@vedranf.mine.nu
Peter Otten wrote: The problem is that list comprehensions do not introduce a new namespace. So the inner and the outer list comp share the same i. You can either rename the inner i [i for i in a if i not in [k for k in b]] ['b'] or use a generator expression which does give a new

encoding problem

2008-12-19 Thread digisat...@gmail.com
The below snippet code generates UnicodeDecodeError. #!/usr/bin/env python #--*-- coding: utf-8 --*-- s = 'äöü' u = unicode(s) It seems that the system use the default encoding- ASCII to decode the utf8 encoded string literal, and thus generates the error. The question is why the Python

Re: importing csv file into sqlite

2008-12-19 Thread klia
John Machin wrote: On Dec 18, 6:20 pm, klia alwaseem307s...@yahoo.com wrote: klia wrote: hey guys, i have a hug .csv file which i need to insert it into sqlite database using python. my csv data looks like this Birthday2,12/5/2008,HTC,this is my birthday Sea,12/3/2008,kodak,sea

Re: encoding problem

2008-12-19 Thread Bruno Desthuilliers
digisat...@gmail.com a écrit : The below snippet code generates UnicodeDecodeError. #!/usr/bin/env python #--*-- coding: utf-8 --*-- s = 'äöü' u = unicode(s) It seems that the system use the default encoding- ASCII to decode the utf8 encoded string literal, and thus generates the error.

Re: List comprehension in if clause of another list comprehension

2008-12-19 Thread bearophileHUGS
Peter Otten: The problem is that list comprehensions do not introduce a new namespace. I think Python3 fixes this bug. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

How to parsing a sequence of integers

2008-12-19 Thread Steven Woody
Hi, I am a newbie and is reading the python book. Could anyone tell me, how to parsing the following string 123 100 12 37 ... into a list of integers on which I can then apply max()/min()? In additional to max/min, is there something like average()? Thanks in advance. - narke --

Subclassing standard class: how to write my own __init__?

2008-12-19 Thread kpalamartchouk
Dear All, I am trying to create a class that would extend functionality of datetime.date by implementing some functions I need, for example an optional initialisation by (year, day_of_year) instead of (year, month, day). I would like the class constructor to behave in the datetime's default way

Re: Generator slower than iterator?

2008-12-19 Thread Federico Moreira
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 having the same results with both of them right now. --

Re: How to parsing a sequence of integers

2008-12-19 Thread Bruno Desthuilliers
Steven Woody a écrit : Hi, I am a newbie and is reading the python book. Could anyone tell me, how to parsing the following string 123 100 12 37 ... into a list of integers on which I can then apply max()/min()? source = 123 100 12 37 list_of_ints = [int(part) for part in

Re: How to parsing a sequence of integers

2008-12-19 Thread Marc 'BlackJack' Rintsch
On Fri, 19 Dec 2008 21:20:48 +0800, Steven Woody wrote: Hi, I am a newbie and is reading the python book. Could anyone tell me, how to parsing the following string 123 100 12 37 ... into a list of integers on which I can then apply max()/min()? In [376]: '123 100 12 37'.split()

Re: encoding problem

2008-12-19 Thread Marc 'BlackJack' Rintsch
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 system use the default encoding- ASCII to decode the utf8 encoded string

Re: List comprehension in if clause of another list comprehension

2008-12-19 Thread Marc 'BlackJack' Rintsch
On Fri, 19 Dec 2008 04:26:16 -0800, bearophileHUGS wrote: Peter Otten: The problem is that list comprehensions do not introduce a new namespace. I think Python3 fixes this bug. Or removes that feature. ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to parsing a sequence of integers

2008-12-19 Thread John Machin
On Dec 20, 12:33 am, Bruno Desthuilliers bruno. 42.desthuilli...@websiteburo.invalid wrote: Steven Woody a écrit : Hi, I am a newbie and is reading the python book.  Could anyone tell me, how to parsing the following string    123 100 12 37 ...   into a list of integers on which I can

Re: How to parsing a sequence of integers

2008-12-19 Thread Steven Woody
On Fri, Dec 19, 2008 at 9:33 PM, Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid wrote: Steven Woody a écrit : Hi, I am a newbie and is reading the python book. Could anyone tell me, how to parsing the following string 123 100 12 37 ... into a list of integers on which I

Re: importing csv file into sqlite

2008-12-19 Thread Peter Otten
klia wrote: John Machin wrote: On Dec 18, 6:20 pm, klia alwaseem307s...@yahoo.com wrote: klia wrote: hey guys, i have a hug .csv file which i need to insert it into sqlite database using python. my csv data looks like this Birthday2,12/5/2008,HTC,this is my birthday

Re: Subclassing standard class: how to write my own __init__?

2008-12-19 Thread Bruno Desthuilliers
kpalamartch...@gmail.com a écrit : Dear All, I am trying to create a class that would extend functionality of datetime.date by implementing some functions I need, for example an optional initialisation by (year, day_of_year) instead of (year, month, day). If that's all you want, then you

Re: importing csv file into sqlite

2008-12-19 Thread John Machin
On Dec 19, 11:17 pm, klia alwaseem307s...@yahoo.com wrote: [ancient screed snipped] hey guys i took all of your suggestion but my goal ain't yet achieved :-(( these are the codes after changes, john i couldn't really catch what do you mean by renaming input, is it just normal renaming.

Re: How to parsing a sequence of integers

2008-12-19 Thread Bruno Desthuilliers
John Machin a écrit : On Dec 20, 12:33 am, Bruno Desthuilliers bruno. 42.desthuilli...@websiteburo.invalid wrote: Steven Woody a écrit : Hi, I am a newbie and is reading the python book. Could anyone tell me, how to parsing the following string 123 100 12 37 ... into a list of integers

Re: How to parsing a sequence of integers

2008-12-19 Thread Peter Otten
Bruno Desthuilliers wrote: Steven Woody a écrit : In additional to max/min, is there something like average()? Not AFAIK, but it's really trivial def average(lst): assume lst is a list of numerics return sum(lst) / len(lst) If you are using Python 2.x: def average(lst): ...

Re: importing csv file into sqlite

2008-12-19 Thread John Machin
On Dec 18, 5:17 pm, James Mills prolo...@shortcircuit.net.au wrote: def readCSV(file):   if type(file) == str: Stiff cheese if the file path is a unicode object, eh?      fd = open(file, rU)   else:      fd = file -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter unbinding

2008-12-19 Thread Roger
Note that I took out the lambdas and gave event arguments to the functions; if you did that on purpose, because you need to call the same functions without events, then just ignore that... SO, the other workaround, which I've used, is to bind the event to a generic function, and have that

Re: Tkinter unbinding

2008-12-19 Thread Peter Otten
Roger wrote: Note that I took out the lambdas and gave event arguments to the functions; if you did that on purpose, because you need to call the same functions without events, then just ignore that... SO, the other workaround, which I've used, is to bind the event to a generic function, and

How to read stdout from subprocess as it is being produced

2008-12-19 Thread Alex
Hi, I have a Pyhon GUI application that launches subprocess. I would like to read the subprocess' stdout as it is being produced (show it in GUI), without hanging the GUI. I guess threading will solve the no-hanging issue, but as far as I searched for now, I've only seen how to read the stdout

Re: Tkinter unbinding

2008-12-19 Thread Roger
either. I'd suggest a plain-python workaround along the lines of Wow. You just blew my mind. I'm going to play with this. Thanks a lot, I've really learned a lot in just that small bit. I don't have much experience in playing with a lot of the 'private' calls such as __call__. I need to do

Re: How to read stdout from subprocess as it is being produced

2008-12-19 Thread anthony . tolle
On Dec 19, 9:34 am, Alex alex.pul...@gmail.com wrote: Hi, I have a Pyhon GUI application that launches subprocess. I would like to read the subprocess' stdout as it is being produced (show it in GUI), without hanging the GUI. I guess threading will solve the no-hanging issue, but as far as

Re: How to read stdout from subprocess as it is being produced

2008-12-19 Thread Albert Hopkins
On Fri, 2008-12-19 at 06:34 -0800, Alex wrote: Hi, I have a Pyhon GUI application that launches subprocess. I would like to read the subprocess' stdout as it is being produced (show it in GUI), without hanging the GUI. I guess threading will solve the no-hanging issue, but as far as I

Tix.Balloon crashes in Python 2.61 Windows

2008-12-19 Thread andrew . gregory
I've found that Tix GUI applications crash after switching to Python 2.6.1 (Windows XP) when Balloons are used. IDLE gives this error message: Traceback (most recent call last): File D:\PyFiles\InstrumentSetup\Automenu.py, line 217, in module else: displayedwidget=MainWidget(root, CS)

change string to unicode

2008-12-19 Thread jyoung79
If I have a string like so: a = '\\u03B1' and I want to make it display a Greek alpha character, is there a way to convert it to unicode ('\u03B1')? I tried concatenating it like this: '\u' + '03B1' but that didn't work. I'm working in Python 3.0 and was curious if this could be done.

Re: Tkinter unbinding

2008-12-19 Thread Peter Otten
Roger wrote: either. I'd suggest a plain-python workaround along the lines of Wow. You just blew my mind. I'm going to play with this. Thanks a lot, I've really learned a lot in just that small bit. I don't have much experience in playing with a lot of the 'private' calls such as

Re: encoding problem

2008-12-19 Thread Joe Strout
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 in that very source file. And because strings in Python, unlike in

Re: How to parsing a sequence of integers

2008-12-19 Thread Joe Strout
Peter Otten wrote: If you are using Python 2.x: ... So you better throw in a float(...): Or, add 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. Cheers, - Joe --

Re: change string to unicode

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 09:19:28 -0600, jyoung79 wrote: If I have a string like so: a = '\\u03B1' and I want to make it display a Greek alpha character, is there a way to convert it to unicode ('\u03B1')? I tried concatenating it like this: '\u' + '03B1' but that didn't work. I'm

Re: How to parsing a sequence of integers

2008-12-19 Thread Mensanator
On Dec 19, 9:23�am, Joe Strout j...@strout.net wrote: Peter Otten wrote: If you are using Python 2.x: ... So you better throw in a float(...): Or, add � �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

Re: change string to unicode

2008-12-19 Thread Peter Otten
jyoun...@kc.rr.com wrote: If I have a string like so: a = '\\u03B1' and I want to make it display a Greek alpha character, is there a way to convert it to unicode ('\u03B1')? I tried concatenating it like this: '\u' + '03B1' but that didn't work. I'm working in Python 3.0 and was

HTTP://WWW.STREETCANDY.ORG

2008-12-19 Thread nikeshoe.nik...@gmail.com
Get Nike Shoes at Super Cheap Prices Discount Nike air jordans (www.streetcandy.org) Discount Nike Air Max 90 Sneakers (www.streetcandy.org) Discount Nike Air Max 91 Supplier (www.streetcandy.org) Discount Nike Air Max 95 Shoes Supplier (www.streetcandy.org) Discount Nike Air Max 97 Trainers

New Python 3.0 string formatting - really necessary?

2008-12-19 Thread walterbyrd
I have not worked with Python enough to really know. But, it seems to me that more I look at python 3.0, the more I wonder if it isn't a step backwards. 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. It also

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Mark Summerfield
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 chapter 12 (regular expressions), and the index are

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Giampaolo Rodola'
On 19 Dic, 17:01, walterbyrd walterb...@iname.com wrote: I have not worked with Python enough to really know. But, it seems to me that more I look at python 3.0, the more I wonder if it isn't a step backwards. To me, it seems that this: print %s=%d % ('this',99) Is much easier, and

Re: Generator slower than iterator?

2008-12-19 Thread MRAB
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 having the same results with both of them right

best way to code

2008-12-19 Thread eric
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 mystuff(self): do something different class LinkB(object): def

mailbox.mbox.add() appears to set both access and modification times

2008-12-19 Thread tinnews
I'm using mailbox in Python 2.5.2 to filter incoming mail into separate mailboxes. I prefer mbox for various reasons and so I have used that format. It would appear then when I do:- dest = mailbox.mbox(destDir, factory=None) dest.add(m) it sets both the access and modification times of

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

2008-12-19 Thread Joel Hedlund
Joel Hedlund wrote: First off, please note that I consider my problem to be solved, many thanks to c.l.p and especially Duncan Booth. But of course continued discussion on this topic can be both enlightening and entertaining as long as people are interested. So here goes: heh, nothing like a

Re: best way to code

2008-12-19 Thread Peter Otten
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 mystuff(self): do something different class

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Thomas Heller
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 chapter 12

IMAP: How to implement GMail-like threaded conversations view

2008-12-19 Thread Martin
Currently I am trying to get used to Python's imaplib and email modules. I'like to create a webmail client simmilar to GMail. My Questions: a) Is there any feature hidden in Python's built-in modules (imaplib, email) that already can group all my mails into threads? b) If not a... what would be

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread r
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??. Please tell me i am

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread MRAB
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

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

Re: encoding problem

2008-12-19 Thread digisat...@gmail.com
On 12月19日, 下午9时34分, Marc 'BlackJack' Rintsch bj_...@gmx.net 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 system

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

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: 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, the whole

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, the whole

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

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread walterbyrd
On Dec 19, 9:13 am, Giampaolo Rodola' gne...@gmail.com 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

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??. Please

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' gne...@gmail.com 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

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 mr...@gmx.de 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

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 torr...@gmail.com wrote: walterbyrd wrote: On Dec 19, 9:13 am, Giampaolo Rodola' gne...@gmail.com 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

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

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

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

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 approach is wholly

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

2008-12-19 Thread Christian Heimes
walterbyrd schrieb: On Dec 19, 9:13 am, Giampaolo Rodola' gne...@gmail.com 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

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
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: ANN: New Book: Programming in Python 3

2008-12-19 Thread Paul Rudin
Thomas Heller thel...@python.net 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 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: 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,

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

Re: best way to code

2008-12-19 Thread eric
On Dec 19, 6:36 pm, eric e...@ericaro.net 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 a class,

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

2008-12-19 Thread excord80
On Dec 19, 11:01 am, walterbyrd walterb...@iname.com 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(

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 thel...@python.net 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

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 excord80
On Dec 4, 2:42 pm, Alan G Isaac ais...@american.edu 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

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: Building a web questionnaire, can it be done in Python ?

2008-12-19 Thread excord80
On Dec 19, 11:58 am, Stef Mientki stef.mien...@gmail.com 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

  1   2   3   >