Re: wsgi, ajax, and multiple requests

2011-02-09 Thread Frank Millman
Frank Millman wrote: Hi all I have a question about wsgi. As far as I can tell from the spec and from the reference implementation, wsgi requires that each request from the client is responded to by one or more headers, followed by the response body. It is then ready to handle the next req

Re: Markdown to reStructuredText

2011-02-09 Thread Daniel Stender
http://johnmacfarlane.net/pandoc/ Greetings, DS On 10.02.2011 06:38, Michele Simionato wrote: > Do you know if there is any converter from the Markdown syntax to the > rst syntax? Googling for markdown2rst > did not help. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy function, please help.

2011-02-09 Thread Terry Reedy
On 2/9/2011 6:00 PM, Rikishi42 wrote: numeric types. I would have defined the flaw to be use of '/' for the integer division. Guido agreed, and hence changed it (after much contentious discussion!). -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: OO Python

2011-02-09 Thread Terry Reedy
On 2/9/2011 4:50 PM, Paul Symonds wrote: Are there any good resources to learn OO Python from? I learned some from classes in stdlib modules. -- Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy function, please help.

2011-02-09 Thread Steven D'Aprano
On Wed, 09 Feb 2011 22:53:27 -0800, drygal wrote: > I guess it needs: > > def num_digits(n): >return len(str(n)) -1 I don't think so. >>> num_digits(9) 0 -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: How to Write grep in Emacs Lisp (tutorial)

2011-02-09 Thread Petter Gustad
r...@rpw3.org (Rob Warnock) writes: > invocation was given only one arg!! IT FOUND THE PATTERN, BUT DIDN'T > TELL ME WHAT !@^%!$@#@! FILE IT WAS IN!! :-{ Sounds frustrating, but grep -H will always print the filename, even when given a single filename on the command line. //Petter -- .sig remo

Re: Trying to decide between PHP and Python

2011-02-09 Thread Benjamin J. Racine
Cython/Sage is no small undertaking, but I have no idea how to measure relative success between that and hiphop. Ben On Jan 6, 2011, at 11:11 AM, John Nagle wrote: > On 1/4/2011 12:20 PM, Google Poster wrote: >> >> About once a year, I have to learn yet another programming language. >> Given a

Problem with giant font sizes in tkinter

2011-02-09 Thread Steven D'Aprano
I have a tkinter application under Python 2.6 which is shows text in a giant font, about twenty(?) times larger than expected. The fonts are set using: titlefont = '-Adobe-Helvetica-Bold-R-Normal-*-180-*' buttonfont = '-Adobe-Helvetica-Bold-R-Normal-*-140-*' labelfont = '-Adobe-Helvetica-Bold-R-

Re: Easy function, please help.

2011-02-09 Thread drygal
On 9 Lut, 06:29, Michael Hrivnak wrote: > Your function only works if n is an integer.  Example: > > >>> num_digits(234) > 3 > >>> num_digits(23.4) > > 325 > > When doing integer division, python will throw away the remainder and > return an int.  Using your example of n==44, 44/10 == 4 and 4/10 =

Markdown to reStructuredText

2011-02-09 Thread Michele Simionato
Do you know if there is any converter from the Markdown syntax to the rst syntax? Googling for markdown2rst did not help. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy function, please help.

2011-02-09 Thread Jason Swails
On Wed, Feb 9, 2011 at 8:16 PM, Ethan Furman wrote: > Jason Swails wrote: > >> However, as surprising as this may be I'm actually with RR on this one >> (for a little) -- for code readability's sake, you should make your >> conditional more readable (i.e. don't depend on the fact that the iterati

Re: Easy function, please help.

2011-02-09 Thread Jason Swails
On Wed, Feb 9, 2011 at 5:34 PM, MRAB wrote: > On 09/02/2011 21:42, Jason Swails wrote: > >> You've gotten several good explanations, mainly saying that 0 -> False >> and not 0 -> True, which is why the while loop exits. You've also >> gotten advice about how to make your method more robust (i.e.

Re: How to Write grep in Emacs Lisp (tutorial)

2011-02-09 Thread Thomas L. Shinnick
At 09:39 PM 2/9/2011, Rob Warnock wrote: Harald Hanche-Olsen wrote: [snip] Years & years ago, right after I learned about "xargs", I got burned several times on "find | xargs grep pat" when the file list was long enough that "xargs" fired up more than one "grep"... and the last invocation was

Re: inheritance, multiple inheritance and the weaklist and instance dictionaries

2011-02-09 Thread Rouslan Korneychuk
On 02/09/2011 08:40 PM, Carl Banks wrote: I explained why in my last post; there's a bunch of reasons. Generally you can't assume someone's going to go through the type structure to find the object's dict, nor can you expect inherited methods to always use the derived class's type structure (some

Re: How to Write grep in Emacs Lisp (tutorial)

2011-02-09 Thread Rob Warnock
Harald Hanche-Olsen wrote: +--- | [Icarus Sparry ] | > The 'modern' way to do this is | > find . -maxdepth 2 -name '*.html' -exec grep whatever {} + | | Actually, I think it should be | find . -maxdepth 2 -name '*.html' -exec grep whatever /dev/null {} + \; | because grep behaves d

Re: How to Write grep in Emacs Lisp (tutorial)

2011-02-09 Thread Rob Warnock
Harald Hanche-Olsen wrote: +--- | [Icarus Sparry ] | > The 'modern' way to do this is | > find . -maxdepth 2 -name '*.html' -exec grep whatever {} + | | Actually, I think it should be | find . -maxdepth 2 -name '*.html' -exec grep whatever /dev/null {} + | because grep behaves diff

Re: Python subprocesses experience mysterious delay in receiving stdin EOF

2011-02-09 Thread Yang Zhang
On Thu, Feb 10, 2011 at 12:28 AM, Jean-Michel Pichavant wrote: > Yang Zhang wrote: >> >> On Wed, Feb 9, 2011 at 11:01 AM, MRAB wrote: >> >>> >>> On 09/02/2011 01:59, Yang Zhang wrote: >>> I reduced a problem I was seeing in my application down into the following test case. In this

Re: inheritance, multiple inheritance and the weaklist and instance dictionaries

2011-02-09 Thread Carl Banks
On Feb 9, 3:11 pm, Rouslan Korneychuk wrote: > On 02/09/2011 04:58 PM, Carl Banks wrote: > > On Feb 9, 1:14 pm, Rouslan Korneychuk  wrote: > >> On 02/09/2011 02:42 PM, Carl Banks wrote: > >>> This is the only case I can think of where the > >>> layout conflict would be caused by a type setting tp_

Re: Easy function, please help.

2011-02-09 Thread Ethan Furman
Jason Swails wrote: However, as surprising as this may be I'm actually with RR on this one (for a little) -- for code readability's sake, you should make your conditional more readable (i.e. don't depend on the fact that the iterations will take your test value down to 0 which conveniently in

Re: EPD 7.0 released

2011-02-09 Thread Eric Stechmann
Hi, son. Don't know if this would be of any interest to you. Well, I suppose it does provide some interesting. I hope your physical get-together will help out. Love you, David. Dad On Feb 9, 2011, at 8:13 AM, Ilan Schnell wrote: > Hello, > > I am pleased to announce that EPD (Enthought

Re: Easy function, please help.

2011-02-09 Thread alex23
rantingrick wrote: > Well, the only way to reply is to paraphrase an anecdotes my mother > would tell me often as a young lad... > > Mother: "Just because other language developers choose to jump off the > cliffs of implicit-ey should we jump also?" You think of yourself as a _language developer_

Re: Easy function, please help.

2011-02-09 Thread Littlefield, Tyler
Uh oh, I think we found RR's evil twin: another python to the modern day visionary. >Example 1 is not explicit enough. Too much guessing is required by the >reader! if list is empty, bla. if not, bla. it's not all that hard, and there's no guessing that needs to take place, honest. -- http://m

Re: Easy function, please help.

2011-02-09 Thread Westley Martínez
On Wed, 2011-02-09 at 06:51 -0800, rantingrick wrote: > On Feb 9, 1:08 am, Paul Rudin wrote: > > Nanderson writes: > > > loop would be infinite. I get what is happening in the function, and I > > > understand why this would work, but for some reason it's confusing me > > > as to how it is exitin

Re: OO Python

2011-02-09 Thread Ben Finney
Paul Symonds writes: > Are there any good resources to learn OO Python from? The first resource to use is the Python tutorial http://docs.python.org/tutorial/>. Work through the whole thing: read the text and run the examples yourself, then experiment until you understand the points before movi

Re: Easy function, please help.

2011-02-09 Thread Steven D'Aprano
On Thu, 10 Feb 2011 00:00:48 +0100, Rikishi42 wrote: > I would have defined the flaw to be use of '/' for the integer division. Well, it was a long time ago, when it seemed like a good idea. Now, Python has // for integer division. -- Steven -- http://mail.python.org/mailman/listinfo/python

Re: Easy function, please help.

2011-02-09 Thread rantingrick
On Feb 9, 5:00 pm, Rikishi42 wrote: [...] > Using 0 as false and any other value as true is hardly unique to python. Lots > of languages have been doing this long before Python even existed. Well, the only way to reply is to paraphrase an anecdotes my mother would tell me often as a young lad..

Re: Easy function, please help.

2011-02-09 Thread Rikishi42
On 2011-02-09, rantingrick wrote: > On Feb 9, 1:08�am, Paul Rudin wrote: >> Nanderson writes: >> > loop would be infinite. I get what is happening in the function, and I >> > understand why this would work, but for some reason it's confusing me >> > as to how it is exiting the loop after a certa

Re: Easy function, please help.

2011-02-09 Thread Rikishi42
On 2011-02-09, Michael Hrivnak wrote: > Your function only works if n is an integer. Example: > num_digits(234) > 3 num_digits(23.4) > 325 > > When doing integer division, python will throw away the remainder and > return an int. Using your example of n==44, 44/10 == 4 and 4/10 == 0 >

Re: inheritance, multiple inheritance and the weaklist and instance dictionaries

2011-02-09 Thread Rouslan Korneychuk
On 02/09/2011 05:02 PM, Carl Banks wrote: On Feb 9, 1:14 pm, Rouslan Korneychuk wrote: Each Python class is a wrapper for a C++ class. Also, if you want my opinion (you probably don't after you've already gone to so much trouble, but here it is anyway): No, your opinion is quite welcome.

Re: inheritance, multiple inheritance and the weaklist and instance dictionaries

2011-02-09 Thread Rouslan Korneychuk
On 02/09/2011 04:58 PM, Carl Banks wrote: On Feb 9, 1:14 pm, Rouslan Korneychuk wrote: On 02/09/2011 02:42 PM, Carl Banks wrote: This is the only case I can think of where the layout conflict would be caused by a type setting tp_dictoffset. No, actually I have code that is roughly equivalent

Re: OO Python

2011-02-09 Thread Corey Richardson
On 02/09/2011 04:50 PM, Paul Symonds wrote: > Are there any good resources to learn OO Python from? > To my knowledge, all Python is OO. What specifically about OOP do you want to know? http://www.alan-g.me.uk/tutor/tutclass.htm I've always liked Alan's site. Come over to the Tutor list if you

Re: [python-list] - what do you think ?

2011-02-09 Thread Kushal Kumaran
- Original message - > On 2011-02-08, przemol...@poczta.fm wrote: > > > I have just subscribed to this python-list@ and this is my N list. > > Usually many mailing lists use square brackets to identify its name > > when you have e-mails from different forums. > > Would you consider adding

Re: Easy function, please help.

2011-02-09 Thread MRAB
On 09/02/2011 21:42, Jason Swails wrote: You've gotten several good explanations, mainly saying that 0 -> False and not 0 -> True, which is why the while loop exits. You've also gotten advice about how to make your method more robust (i.e. force integer division). However, as surprising as this

Re: inheritance, multiple inheritance and the weaklist and instance dictionaries

2011-02-09 Thread Carl Banks
On Feb 9, 1:14 pm, Rouslan Korneychuk wrote: > Each Python class is a wrapper for a C++ class. Also, if you want my opinion (you probably don't after you've already gone to so much trouble, but here it is anyway): It's not worth it to mimic the C++ type hierarchy in Python. Just wrap each C++ c

Re: inheritance, multiple inheritance and the weaklist and instance dictionaries

2011-02-09 Thread Carl Banks
On Feb 9, 1:14 pm, Rouslan Korneychuk wrote: > On 02/09/2011 02:42 PM, Carl Banks wrote: > > This is the only case I can think of where the > > layout conflict would be caused by a type setting tp_dictoffset. > > No, actually I have code that is roughly equivalent to the following > pseudocode: >

OO Python

2011-02-09 Thread Paul Symonds
Are there any good resources to learn OO Python from? -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy function, please help.

2011-02-09 Thread Jason Swails
You've gotten several good explanations, mainly saying that 0 -> False and not 0 -> True, which is why the while loop exits. You've also gotten advice about how to make your method more robust (i.e. force integer division). However, as surprising as this may be I'm actually with RR on this one (f

Re: Programmatic Parsing of ps

2011-02-09 Thread Dan Stromberg
On Wed, Feb 9, 2011 at 11:15 AM, Emile van Sebille wrote: > On 2/9/2011 10:58 AM octopusgrabbus said... >> >> I have Python 2.6.6. I would like to get this output >> >> ps -ef | grep 'fglgo csm' >> >> into a list. What is the best way to do that? I've been reading the >> documentation, and am lost

Re: inheritance, multiple inheritance and the weaklist and instance dictionaries

2011-02-09 Thread Rouslan Korneychuk
On 02/09/2011 02:42 PM, Carl Banks wrote: On Feb 9, 10:54 am, Rouslan Korneychuk wrote: I'm working on a program that automatically generates C++ code for a Python extension and I noticed a few limitations when using the weaklist and instance dictionaries (tp_weaklistoffset and tp_dictoffset).

Re: frequency of values in a field

2011-02-09 Thread noydb
On Feb 9, 3:28 pm, Ethan Furman wrote: > noydb wrote: > >  > Paul Rubin wrote: > > > > > > >> The Decimal module is pretty slow but is conceptually probably the right > >> way to do this.  With just 50k records it shouldn't be too bad.  With > >> more records you might look for a faster way. > > >

Re: Socket connection between python and C

2011-02-09 Thread Stefan Behnel
Williamson, Ross X. wrote: I'm trying to implement a server/client system where the server is written in python and the client has to be written in c/c++. Is this a strict requirement? Could you give us a hint why the client needs to be plain C/C++? Stefan -- http://mail.python.org/mailman/

Re: frequency of values in a field

2011-02-09 Thread noydb
On Feb 9, 3:08 pm, Josh English wrote: > On Wednesday, February 9, 2011 10:34:12 AM UTC-8, noydb wrote: > > > How do you add all the records in the particular field of interest > > into long_list? > > Sorry to be unclear. In both cases I was tossing out pseudo-code, as I am not > familiar with th

Re: How to Write grep in Emacs Lisp (tutorial)

2011-02-09 Thread Tassilo Horn
Xah Lee writes: >> You can rely on shell globbing, so that grep gets a list of all files in >> all subdirectories.  For example, I can grep all header files of the >> linux kernel using >> >>   % grep FOO /usr/src/linux/**/*.h > > say, i want to search in the dir > ~/web/xahlee_org/ > > but no mo

Re: frequency of values in a field

2011-02-09 Thread Ethan Furman
noydb wrote: > Paul Rubin wrote: The Decimal module is pretty slow but is conceptually probably the right way to do this. With just 50k records it shouldn't be too bad. With more records you might look for a faster way. from decimal import Decimal as D from collections import defaultdi

Re: frequency of values in a field

2011-02-09 Thread Josh English
On Wednesday, February 9, 2011 10:34:12 AM UTC-8, noydb wrote: > > How do you add all the records in the particular field of interest > into long_list? Sorry to be unclear. In both cases I was tossing out pseudo-code, as I am not familiar with the arggisscripting module. long_list is a list wit

Re: Land Of Lisp is out

2011-02-09 Thread Peter Keller
In comp.lang.lisp William James wrote: > Pascal J. Bourguignon wrote: > >> sthueb...@googlemail.com (Stefan H?bner) writes: >> >> >> Would it be right to say that the only Lisp still in common use is >> the Elisp >> built into Emacs? >> > >> > Clojure (http://clojure.org) is a Lisp on the JVM.

Re: [python-list] - what do you think ?

2011-02-09 Thread Stephen Hansen
On 2/9/11 12:36 AM, Stephen Hansen wrote: > .. yeah, no. Okay, I actually have to apologize for the tone of this message. It was late and I was a jerk. I could have just been helpful without including the jerk, but something about it set me off. So the helpful and the jerk got mixed in together.

Re: inheritance, multiple inheritance and the weaklist and instance dictionaries

2011-02-09 Thread Carl Banks
On Feb 9, 10:54 am, Rouslan Korneychuk wrote: > I'm working on a program that automatically generates C++ code for a > Python extension and I noticed a few limitations when using the weaklist > and instance dictionaries (tp_weaklistoffset and tp_dictoffset). This is > pertaining to the C API. > >

Re: Socket connection between python and C

2011-02-09 Thread Irmen de Jong
On 09-02-11 01:54, Williamson, Ross X. (Guest) wrote: Dear All, I'm trying to implement a server/client system where the server is written in python and the client has to be written in c/c++. I can happily send simple text through the socket. Ideally I would like make say a struct (using pyth

RE: frequency of values in a field

2011-02-09 Thread Andreas Tawn
> How do you add all the records in the particular field of interest > into long_list? >From earlier in the thread you did... import arcgisscripting # Create the geoprocessor object gp = arcgisscripting.create() records_list = [] cur = gp.SearchCursor(dbfTable) row = cur.Next() while row: valu

Re: Programmatic Parsing of ps

2011-02-09 Thread Emile van Sebille
On 2/9/2011 10:58 AM octopusgrabbus said... I have Python 2.6.6. I would like to get this output ps -ef | grep 'fglgo csm' into a list. What is the best way to do that? I've been reading the documentation, and am lost. Thank you. cmn commands.getoutput Emile -- http://mail.python.org/mailm

Re: frequency of values in a field

2011-02-09 Thread Paul Rubin
noydb writes: >> counts = {} >> for thing in long_list: >>   key = make_key(thing) >>   if key in counts: >>     counts[key] += 1 >>   else: >>     counts[key] = 1 counts = {} for thing i long_list: key = make_key(thing) counts[key] = 1 + counts.get(key, 0) > How do you add all the records i

Re: wsgi, ajax, and multiple requests

2011-02-09 Thread Paul Rubin
"Frank Millman" writes: > So the question is, how can I achieve this with wsgi? If I detect that > I have received a request out of sequence, I can queue the request, > and send an empty response. I don't see how that can help, on the server side. Even if you send the responses in the right orde

Programmatic Parsing of ps

2011-02-09 Thread octopusgrabbus
I have Python 2.6.6. I would like to get this output ps -ef | grep 'fglgo csm' into a list. What is the best way to do that? I've been reading the documentation, and am lost. Thank you. cmn -- http://mail.python.org/mailman/listinfo/python-list

Re: Land Of Lisp is out

2011-02-09 Thread William James
Pascal J. Bourguignon wrote: > sthueb...@googlemail.com (Stefan Hübner) writes: > > >> Would it be right to say that the only Lisp still in common use is > the Elisp >> built into Emacs? > > > > Clojure (http://clojure.org) is a Lisp on the JVM. It's gaining > > more and more traction. > > Ther

inheritance, multiple inheritance and the weaklist and instance dictionaries

2011-02-09 Thread Rouslan Korneychuk
I'm working on a program that automatically generates C++ code for a Python extension and I noticed a few limitations when using the weaklist and instance dictionaries (tp_weaklistoffset and tp_dictoffset). This is pertaining to the C API. I noticed that when using multiple inheritance, I need

Re: frequency of values in a field

2011-02-09 Thread noydb
On Feb 9, 1:21 pm, Josh English wrote: > On Wednesday, February 9, 2011 9:52:27 AM UTC-8, noydb wrote: > > > So it seems the idea is to add all the records in the particular field > > of interest into a list (record).  How does one do this in pure > > Python? > > Normally in my work with gis/arcgi

Uploading files to an an FTP site through a proxy server which requires authentication

2011-02-09 Thread tkp...@hotmail.com
I would like to upload files to a ftp site, but can't seem to get through our proxy server, which requires authentication. How can one do this in Python (I use 2.7, but am more than happy to use 3.2 rc2) Thanks in advance Thomas Philips -- http://mail.python.org/mailman/listinfo/python-list

Re: frequency of values in a field

2011-02-09 Thread Josh English
On Wednesday, February 9, 2011 9:52:27 AM UTC-8, noydb wrote: > > So it seems the idea is to add all the records in the particular field > of interest into a list (record). How does one do this in pure > Python? > Normally in my work with gis/arcgis sw, I would do a search cursor on > the DBF fi

Re: frequency of values in a field

2011-02-09 Thread noydb
> > The Decimal module is pretty slow but is conceptually probably the right > way to do this.  With just 50k records it shouldn't be too bad.  With > more records you might look for a faster way. > >     from decimal import Decimal as D >     from collections import defaultdict > >     records = [

Re: Python subprocesses experience mysterious delay in receiving stdin EOF

2011-02-09 Thread Jean-Michel Pichavant
Yang Zhang wrote: On Wed, Feb 9, 2011 at 11:01 AM, MRAB wrote: On 09/02/2011 01:59, Yang Zhang wrote: I reduced a problem I was seeing in my application down into the following test case. In this code, a parent process concurrently spawns 2 (you can spawn more) subprocesses that read a

Re: Remove whitespaces and line breaks in a XML file

2011-02-09 Thread Jean-Michel Pichavant
Josh English wrote: I found the code posted at http://infix.se/2007/02/06/gentlemen-indent-your-xml quite helpful in turning my xml into human-readable structures. It works best for XML-Data. Josh It's done in one line with http://docs.python.org/library/xml.dom.minidom.html#xml.dom.mini

Re: How to Write grep in Emacs Lisp (tutorial)

2011-02-09 Thread Harald Hanche-Olsen
[Icarus Sparry ] > The 'modern' way to do this is > find . -maxdepth 2 -name '*.html' -exec grep whatever {} + Actually, I think it should be find . -maxdepth 2 -name '*.html' -exec grep whatever /dev/null {} + \; because grep behaves differently when given only one filename as opposed to sever

Re: How to Write grep in Emacs Lisp (tutorial)

2011-02-09 Thread Harald Hanche-Olsen
[Icarus Sparry ] > The 'modern' way to do this is > find . -maxdepth 2 -name '*.html' -exec grep whatever {} + Actually, I think it should be find . -maxdepth 2 -name '*.html' -exec grep whatever /dev/null {} + because grep behaves differently when given only one filename as opposed to several.

PyCon 2011 news - going strong, sign up today!

2011-02-09 Thread Brian Curtin
Hey python-list readers! PyCon 2011 looks like it may very well break every single record in the past - making it one of the biggest and best PyCons of all time. We've gone all out this year - including Extreme Talks, a Startup Row, amazing talks, tutorials, Poster sessions. Extreme talks: http:/

Re: Unicode error in sax parser

2011-02-09 Thread Rickard Lindberg
On Tue, Feb 8, 2011 at 5:41 PM, Chris Rebert wrote: > On Tue, Feb 8, 2011 at 7:57 AM, Rickard Lindberg wrote: >> Hi, >> >> Here is a bash script to reproduce my error: > > Including the error message and traceback is still helpful, for future > reference. > >>    #!/bin/sh >> >>    cat > å.timeli

Re: Easy function, please help.

2011-02-09 Thread rantingrick
On Feb 9, 1:08 am, Paul Rudin wrote: > Nanderson writes: > > loop would be infinite. I get what is happening in the function, and I > > understand why this would work, but for some reason it's confusing me > > as to how it is exiting the loop after a certain number of times. Help > > is appreciat

Re: Easy function, please help.

2011-02-09 Thread Terry Reedy
On 2/9/2011 9:27 AM, RJB wrote: On Feb 8, 11:08 pm, Paul Rudin wrote: It works because 0 tests false and because integer division yields integers... eventually you'll get something like 1/10 giving 0. It's not necessarily a good thing to rely on. For example if you try it after "from __future

Re: Easy function, please help.

2011-02-09 Thread Nicholas Devenish
On 09/02/2011 14:27, RJB wrote: What operator should I use if I want integer division? Ada and Pascal used "div" if I recall rightly. The operator for integer division is // -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy function, please help.

2011-02-09 Thread RJB
On Feb 8, 11:08 pm, Paul Rudin wrote: > It works because 0 tests false and because integer division yields > integers... eventually you'll get something like 1/10 giving 0. > > It's not necessarily a good thing to rely on. For example if you try it > after "from __future__ import division" - or i

Re: wsgi, ajax, and multiple requests

2011-02-09 Thread Adam Tauno Williams
On Wed, 2011-02-09 at 14:31 +0200, Frank Millman wrote: > I am dabbling with writing an ajax-style app. On occasion, I want to send > more than one message from the client to the server. It is important that > the server processes the messages in the same order that they are generated. > I have

Re: Unicode error in sax parser

2011-02-09 Thread Stefan Behnel
Rickard Lindberg, 09.02.2011 14:01: Did you read my reply? Sorry, it was me who failed to read your question properly. Unicode file names aren't really working well, especially not in Py2.x. Python 3.2 provides many improvements here. I assume your file system encoding is UTF-8? What does sys

Re: Unicode error in sax parser

2011-02-09 Thread Rickard Lindberg
>> Did you read my reply? > >Sorry, it was me who failed to read your question properly. > >Unicode file names aren't really working well, especially not in Py2.x. >Python 3.2 provides many improvements here. > >I assume your file system encoding is UTF-8? What does >sys.getfilesystemencoding() giv

Your message to Devel awaits moderator approval

2011-02-09 Thread devel-bounces
Your mail to 'Devel' with the subject TEST Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list Either the message will get posted to the list, or you will receive notification of the moderator's decis

wsgi, ajax, and multiple requests

2011-02-09 Thread Frank Millman
Hi all I have a question about wsgi. As far as I can tell from the spec and from the reference implementation, wsgi requires that each request from the client is responded to by one or more headers, followed by the response body. It is then ready to handle the next request. 99% of the time

Re: - what do you think ?

2011-02-09 Thread przemolicc
On Tue, Feb 08, 2011 at 01:20:48PM -0500, Terry Reedy wrote: > On 2/8/2011 7:18 AM, przemol...@poczta.fm wrote: >> On Tue, Feb 08, 2011 at 10:16:42PM +1100, Ben Finney wrote: > >>> Either way, please don't ask for the subject lines to be munged. >> >> Any technical reason why not ? > > For one reas

Re: Python subprocesses experience mysterious delay in receiving stdin EOF

2011-02-09 Thread Yang Zhang
On Wed, Feb 9, 2011 at 11:01 AM, MRAB wrote: > On 09/02/2011 01:59, Yang Zhang wrote: >> >> I reduced a problem I was seeing in my application down into the >> following test case. In this code, a parent process concurrently >> spawns 2 (you can spawn more) subprocesses that read a big message >>

Re: Unicode error in sax parser

2011-02-09 Thread Stefan Behnel
Stefan Behnel, 09.02.2011 09:58: Rickard Lindberg, 09.02.2011 09:32: On Tue, Feb 8, 2011 at 5:41 PM, Chris Rebert wrote: Here is a bash script to reproduce my error: Including the error message and traceback is still helpful, for future reference. Thanks for pointing it out. #!/bin/sh ca

Re: Unicode error in sax parser

2011-02-09 Thread Stefan Behnel
Rickard Lindberg, 09.02.2011 09:32: On Tue, Feb 8, 2011 at 5:41 PM, Chris Rebert wrote: Here is a bash script to reproduce my error: Including the error message and traceback is still helpful, for future reference. Thanks for pointing it out. #!/bin/sh cat> å.timeline< EOF

Re: [python-list] - what do you think ?

2011-02-09 Thread Stephen Hansen
On 2/8/11 8:00 PM, Vivek Shrivastava wrote: > I think that will help people like me who just depend on gmail, and I > know there are various ways to do filtering in gmail, but just addition > of the tag in [ ] will help avoiding those.. I kindly second that.. .. yeah, no. Let's not screw up every

Re: Unicode error in sax parser

2011-02-09 Thread Rickard Lindberg
On Tue, Feb 8, 2011 at 5:41 PM, Chris Rebert wrote: >> Here is a bash script to reproduce my error: > > Including the error message and traceback is still helpful, for future > reference. Thanks for pointing it out. >>    #!/bin/sh >> >>    cat > å.timeline < >>    EOF >> >>    python <>    # e