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
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
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
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
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
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
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
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-
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 =
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
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
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.
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
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
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
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
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
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_
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
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
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_
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
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
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
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
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..
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
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
>
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.
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
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
- 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
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
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
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:
>
Are there any good resources to learn OO Python from?
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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).
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.
>
> >
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/
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
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
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
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
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.
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.
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.
>
>
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
> 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
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
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
"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
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
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
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
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
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
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
>
> 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 = [
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
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
[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
[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.
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:/
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
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
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
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
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
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
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
>> 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 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
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
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
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
>>
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
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
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
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
81 matches
Mail list logo