APSW 3.6.17-r1 released

2009-08-12 Thread Roger Binns
APSW 3.6.17-r1 is now available. The home page is at http://code.google.com/p/apsw/ which includes full documentation, source and binary distributions for Windows (Python 2.3 onwards including 3.0 3.1). The opensource license used is the zlib/png license. APSW is a wrapper around the SQLite

SQLObject 0.11.0

2009-08-12 Thread Oleg Broytmann
Hello! I'm pleased to announce version 0.11.0, the first stable release of 0.11 branch of SQLObject. What is SQLObject = SQLObject is an object-relational mapper. Your database tables are described as classes, and rows are instances of those classes. SQLObject is meant to be

Re: Bug in format specification in Python 3?

2009-08-12 Thread greg
Robert Dailey wrote: I notice that the '0x' portion is counted in the width, which was specified as 8. This seems wrong to me. Is this by design? If so, why? Yes, it's the total field width. This is consistent with the other formats, in which it includes decimal points, signs, etc. If you

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread greg
ru...@yahoo.com wrote: Such a reorg is not a simple matter of moving a file from here to there. It will require a lot moving about of sections and a lot of word-smithing to glue them back together again in a coherent way. Concerning this particular issue, not everyone would agree that the doc

Re: Frustrated with scopes

2009-08-12 Thread James Stroud
James Stroud wrote: def stream_factory: class Line(object): __source = source __join = join # etc. return Line of course I meant def stream_factory(lines, source, join=''.join): James -- http://mail.python.org/mailman/listinfo/python-list

Re: hashability

2009-08-12 Thread Asun Friere
On Aug 12, 3:32 pm, James Stroud nospamjstroudmap...@mbi.ucla.edu wrote: You should be more imaginative. I'm by no means discounting that there might be some actual problem you're trying to solve here, but I honestly can't see it. There really is no need to get personal about this, so rather

Re: hashability

2009-08-12 Thread Chris Rebert
2009/8/11 Asun Friere afri...@yahoo.co.uk: On Aug 12, 12:15 pm, James Stroud jstr...@mbi.ucla.edu wrote: I realize I left out my use. The intent of the function is to flag objects that will make useful keys for a persistent dictionary. The {C():4}[C()] example demonstrates why I want to avoid

Re: hashability

2009-08-12 Thread Chris Rebert
On Wed, Aug 12, 2009 at 2:25 AM, Chris Rebertc...@rebertia.com wrote: 2009/8/11 Asun Friere afri...@yahoo.co.uk: On Aug 12, 12:15 pm, James Stroud jstr...@mbi.ucla.edu wrote: Apologies for the possible repeated post. Gmail failed to mark the draft as sent for some reason. - Chris --

Re: hashability

2009-08-12 Thread Asun Friere
On Aug 12, 3:52 pm, Chris Rebert ch...@rebertia.com wrote: Thought Experiment: Consider, for each dict, the case of pickling it twice to 2 separate files. When loaded from both files into the same program, the spam-ham dicts will work as expected between each other. The dicts with C()s will

Re: hashability

2009-08-12 Thread David Stanek
On Wed, Aug 12, 2009 at 2:18 AM, Asun Friereafri...@yahoo.co.uk wrote: On Aug 12, 3:32 pm, James Stroud nospamjstroudmap...@mbi.ucla.edu wrote: You should be more imaginative. I'm by no means discounting that there might be some actual problem you're trying to solve here, but I honestly

Re: hashability

2009-08-12 Thread James Stroud
Asun Friere wrote: On Aug 12, 3:32 pm, James Stroud nospamjstroudmap...@mbi.ucla.edu wrote: You should be more imaginative. I'm by no means discounting that there might be some actual problem you're trying to solve here, but I honestly can't see it. There really is no need to get personal

Re: create shell history with python

2009-08-12 Thread garabik-news-2005-05
Diez B. Roggisch de...@nospam.web.de wrote: Joel Juvenal Rivera Rivera schrieb: I been thinking how to make a 'bash like history shell' in python, i don't know if with stdin and stdout i can accomplish this or do i need something like curses and stuff like that, anyway im start to figure this

Re: Unrecognized escape sequences in string literals

2009-08-12 Thread Steven D'Aprano
On Tue, 11 Aug 2009 14:48:24 -0700, Douglas Alan wrote: In any case, my argument has consistently been that Python should have treated undefined escape sequences consistently as fatal errors, A reasonable position to take. I disagree with it, but it is certainly reasonable. not as

Re: hashability

2009-08-12 Thread Asun Friere
On Aug 12, 4:52 pm, James Stroud nospamjstroudmap...@mbi.ucla.edu wrote: Sorry for being a twit. Don't be ridiculous. You haven't been a twit, I have! I've just had a complete blonde moment here (with apologies to any real blondes out there. My only excuse is that I've been up to 02:30 for

Re: ElementTree - Howto access text within XML tag element...

2009-08-12 Thread Stefan Behnel
cmalmqui wrote: tree = etree.parse('10_07_2009 16_48_00_history.tcx') root = tree.getroot() elem = root[0][0] # iterate over all laps for i in range(1, len(elem)-1): Note that you can iterate over elements as in for lap_element in elem: # ... Then use

Re: hashability

2009-08-12 Thread Asun Friere
On Aug 12, 5:14 pm, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: c1 = C() c2 = C() {c1:4}[c2] to behave? That IS the equivalent of your statement -- two instances are two distinctly different entities... Thankyou, that is EXACTLY the mistake I made that sent me off into lunacy. At the

Re: hashability

2009-08-12 Thread James Stroud
Dennis Lee Bieber wrote: On Tue, 11 Aug 2009 17:54:36 -0700, James Stroud jstr...@mbi.ucla.edu declaimed the following in gmane.comp.python.general: ... py {C():4}[C()] Traceback (most recent call last): File ipython

Re: hashability

2009-08-12 Thread Steven D'Aprano
On Tue, 11 Aug 2009 17:54:36 -0700, James Stroud wrote: Hello All, I wrote the function to test hashability of arbitrary objects. My reason is that the built-in python (2.5) hashing is too permissive for some uses. A symptom of this permissiveness comes from the ability to successfully

Re: Unrecognized escape sequences in string literals

2009-08-12 Thread Steven D'Aprano
On Tue, 11 Aug 2009 13:20:52 -0700, Douglas Alan wrote: On Aug 11, 2:00 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: test.cpp:1:1: warning: unknown escape sequence '\y' Isn't that a warning, not a fatal error? So what does temp contain? My Annotated C++ Reference

Re: better way?

2009-08-12 Thread Pet
On 12 Aug., 09:14, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Tue, 11 Aug 2009 11:45:50 -0700 (PDT), Pet petshm...@googlemail.com declaimed the following in gmane.comp.python.general: Oh, forgotten to mention. It's PostGres         Really? There are still installations of an RDBMS

Re: httplib incredibly slow :-(

2009-08-12 Thread Chris Withers
Answering myself... Chris Withers wrote: In article mailman.4598.1250022343.8015.python-l...@python.org, Chris Withers ch...@simplistix.co.uk wrote: Does anyone know of an alternative library for creating http requests and getting their responses that's faster but hopefully has a similar

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Steven D'Aprano
On Tue, 11 Aug 2009 14:50:51 -0700, rurpy wrote: The issue tracker is fine for many things, but the process it provides is equivalent to peep-hole optimization. How does one submit a tracker issue for something like the overall organization of the docs (for example, the mis-placement of

Re: Need cleanup advice for multiline string

2009-08-12 Thread Simon Brunning
2009/8/11 Robert Dailey rcdai...@gmail.com: On Aug 11, 3:40 pm, Bearophile bearophileh...@lycos.com wrote: There are gals too here. It's a figure of speech. And besides, why would I want programming advice from a woman? lol. Thanks for the help. Give the attitudes still prevalent in our

Invitation to connect on LinkedIn

2009-08-12 Thread Jey Simhan
LinkedIn I'd like to add you to my professional network on LinkedIn. - Jey Learn more: https://www.linkedin.com/e/isd/682391381/2q9uIjvU/ -- (c) 2009, LinkedIn Corporation -- http://mail.python.org/mailman/listinfo/python-list

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Hendrik van Rooyen
On Tuesday 11 August 2009 19:53:16 Steven D'Aprano wrote: You want community input into the docs, but you're not willing to give that input except to bitch and moan and sook that the tracker is no good. wtf does the verb sook mean? I find: sook   /sʊk/ Show Spelled Pronunciation [sook] Show

Re: Scraping Wikipedia with Python

2009-08-12 Thread Thorsten Kampe
* Dotan Cohen (Tue, 11 Aug 2009 21:29:40 +0300)    Wikipedia has an API for computer access.  See        http://www.mediawiki.org/wiki/API Yes, I am aware of this as well. Does anyone know of a python class for easily interacting with it, or do I need to roll my own.

Re: looping through values in a dictionary and appending to a list

2009-08-12 Thread Andre Engels
On Tue, Aug 11, 2009 at 8:17 PM, Krishna Pacificipacifi...@warnell.uga.edu wrote: Nevermind, got it. Sorry. Krishna Pacifici 08/11/09 2:12 PM Hi, I want to append the values of a dictionary to a list.  I have a dictionary sec_dict_clean and I want to append the values to a list, but am

Re: Need cleanup advice for multiline string

2009-08-12 Thread Hendrik van Rooyen
On Tuesday 11 August 2009 22:52:34 Robert Dailey wrote: On Aug 11, 3:40 pm, Bearophile bearophileh...@lycos.com wrote: Robert Dailey: This breaks the flow of scope. Would you guys solve this problem by moving failMsg into global scope? Perhaps through some other type of syntax?

Re: Unrecognized escape sequences in string literals

2009-08-12 Thread Steven D'Aprano
On Tue, 11 Aug 2009 14:29:43 -0700, Douglas Alan wrote: I need to preface this entire post with the fact that I've already used ALL of the arguments that you've provided on my friend before I ever even came here with the topic, and my own arguments on why Python can be considered to be doing

Re: Need cleanup advice for multiline string

2009-08-12 Thread MRAB
Hendrik van Rooyen wrote: On Tuesday 11 August 2009 22:52:34 Robert Dailey wrote: On Aug 11, 3:40 pm, Bearophile bearophileh...@lycos.com wrote: Robert Dailey: This breaks the flow of scope. Would you guys solve this problem by moving failMsg into global scope? Perhaps through some other type

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Paul Boddie
On 12 Aug, 09:58, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: We know that there are problems. We've said repeatedly that corrections and patches are welcome. We've repeatedly told you how to communicate your answer to the question of what should be done. None of this is good

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Steven D'Aprano
On Wed, 12 Aug 2009 03:32:08 -0700, Paul Boddie wrote: On 12 Aug, 09:58, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: We know that there are problems. We've said repeatedly that corrections and patches are welcome. We've repeatedly told you how to communicate your answer to

Re: Frustrated with scopes

2009-08-12 Thread Diez B. Roggisch
andrew cooke wrote: On Aug 12, 7:49 am, andrew cooke and...@acooke.org wrote: On Aug 12, 1:51 am, James Stroud nospamjstroudmap...@mbi.ucla.edu wrote: andrew cooke wrote: Is there a way to make this work (currently scope and join are undefined at runtime when the inner class

Re: matching patterns after regex?

2009-08-12 Thread Martin
On Aug 12, 12:53 pm, Bernard bernard.ch...@gmail.com wrote: On 12 août, 06:15, Martin mdeka...@gmail.com wrote: Hi, I have a string (see below) and ideally I would like to pull out the decimal number which follows the bounding coordinate information. For example ideal from this string

Re: Frustrated with scopes

2009-08-12 Thread Steven D'Aprano
On Wed, 12 Aug 2009 04:49:06 -0700, andrew cooke wrote: It would be helpful if you were to describe the type of behavior you expect. Sorry, I didn't make myself clear. When run the code gives NameError: name 'source' is not defined because the class namespace blocks the function

Re: matching patterns after regex?

2009-08-12 Thread Steven D'Aprano
On Wed, 12 Aug 2009 05:12:22 -0700, Martin wrote: I tried re.findall((\w+COORDINATE).*\s+VALUE\s+=\s([\d\.\w-]+),s) You need to put quotes around strings. In this case, because you're using regular expressions, you should use a raw string:

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Antoine Pitrou
Paul Boddie paul at boddie.org.uk writes: A free-for-all isn't likely to be the best solution for more actively edited Python documentation, but Wiki solutions undeniably provide a superior fast path for edits by trusted users to be incorporated and published in accessible end-user

Re: matching patterns after regex?

2009-08-12 Thread Martin
On Aug 12, 1:23 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Wed, 12 Aug 2009 05:12:22 -0700, Martin wrote: I tried re.findall((\w+COORDINATE).*\s+VALUE\s+=\s([\d\.\w-]+),s) You need to put quotes around strings. In this case, because you're using regular

Re: Frustrated with scopes

2009-08-12 Thread Dave Angel
andrew cooke wrote: Is there a way to make this work (currently scope and join are undefined at runtime when the inner class attributes are defined): class _StreamFactory(object): @staticmethod def __call__(lines, source, join=''.join): class Line(object):

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Paul Boddie
On 12 Aug, 14:08, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: With tens of millions of web users, it's no surprise that Wikipedia can attract thousands of editors. But this does not apply to Python, which starts from a comparatively tiny population, primarily those interested

Re: Need cleanup advice for multiline string

2009-08-12 Thread Jean-Michel Pichavant
Simon Brunning wrote: 2009/8/11 Robert Dailey rcdai...@gmail.com: On Aug 11, 3:40 pm, Bearophile bearophileh...@lycos.com wrote: There are gals too here. It's a figure of speech. And besides, why would I want programming advice from a woman? lol. Thanks for the help.

Re: Frustrated with scopes

2009-08-12 Thread andrew cooke
On Aug 12, 8:52 am, Dave Angel da...@ieee.org wrote: Supply us with just enough source code to actually try it, give the full error message including traceback, and tell us what you expected to see.  Also tell us Python version   (sys.version) So far you've done none of these.  When I try the

best practice for documenting a project? pydoc?

2009-08-12 Thread Esmail
Hello, A project that I have been working on is getting larger and more complex, and I would like to unload some of the information from my memory/head to some other media (a set of web pages?). I am primarily interested in documenting the classes/methods. This documentation is primarily for my

Re: Need cleanup advice for multiline string

2009-08-12 Thread exarkun
On 01:27 pm, jeanmic...@sequans.com wrote: Simon Brunning wrote: 2009/8/11 Robert Dailey rcdai...@gmail.com: On Aug 11, 3:40 pm, Bearophile bearophileh...@lycos.com wrote: There are gals too here. It's a figure of speech. And besides, why would I want programming advice from a woman? lol.

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Mark Lawrence
Paul Boddie wrote: [snip] One can always spend one's time doing something which isn't 100% enjoyable or 100% rewarding if one feels that the time is still being spent on something worthwhile. I'm getting the feeling that lots of Python-related stuff doesn't quite satisfy such criteria any more.

Re: httplib incredibly slow :-(

2009-08-12 Thread Max Erickson
Chris Withers ch...@simplistix.co.uk wrote: I'm still reeling from what seems to be such a huge problem with httplib that seem to be largely ignored :-( Chris There is an httplib2 (but I don't know anything further about it...): http://code.google.com/p/httplib2/ Calling wget or curl

Re: better way?

2009-08-12 Thread Scott David Daniels
Pet wrote: On 11 Aug., 22:19, Rami Chowdhury rami.chowdh...@gmail.com wrote: Ah, my apologies, I must have been getting it confused with ON UPDATE [things]. Thanks for correcting me. On Tue, 11 Aug 2009 13:10:03 -0700, Matthew Woodcraft matt...@woodcraft.me.uk wrote: Rami Chowdhury

Re: Need cleanup advice for multiline string

2009-08-12 Thread Robert Dailey
On Aug 12, 9:09 am, exar...@twistedmatrix.com wrote: On 01:27 pm, jeanmic...@sequans.com wrote: Simon Brunning wrote: 2009/8/11 Robert Dailey rcdai...@gmail.com: On Aug 11, 3:40 pm, Bearophile bearophileh...@lycos.com wrote: There are gals too here. It's a figure of speech. And besides,

Re: Need cleanup advice for multiline string

2009-08-12 Thread Robert Dailey
On Aug 12, 9:41 am, Robert Dailey rcdai...@gmail.com wrote: On Aug 12, 9:09 am, exar...@twistedmatrix.com wrote: On 01:27 pm, jeanmic...@sequans.com wrote: Simon Brunning wrote: 2009/8/11 Robert Dailey rcdai...@gmail.com: On Aug 11, 3:40 pm, Bearophile bearophileh...@lycos.com

Re: best practice for documenting a project? pydoc?

2009-08-12 Thread Mark Lawrence
Esmail wrote: Hello, A project that I have been working on is getting larger and more complex, and I would like to unload some of the information from my memory/head to some other media (a set of web pages?). I am primarily interested in documenting the classes/methods. This documentation is

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Steven D'Aprano
On Wed, 12 Aug 2009 06:24:18 -0700, Paul Boddie wrote: On 12 Aug, 14:08, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: With tens of millions of web users, it's no surprise that Wikipedia can attract thousands of editors. But this does not apply to Python, which starts from a

Re: better way?

2009-08-12 Thread Pet
On Aug 12, 4:29 pm, Scott David Daniels scott.dani...@acm.org wrote: Pet wrote: On 11 Aug., 22:19, Rami Chowdhury rami.chowdh...@gmail.com wrote: Ah, my apologies, I must have been getting it confused with ON UPDATE   [things]. Thanks for correcting me. On Tue, 11 Aug 2009 13:10:03

Re: Need cleanup advice for multiline string

2009-08-12 Thread Simon Forman
On Aug 12, 10:41 am, Robert Dailey rcdai...@gmail.com wrote: On Aug 12, 9:09 am, exar...@twistedmatrix.com wrote: On 01:27 pm, jeanmic...@sequans.com wrote: Simon Brunning wrote: 2009/8/11 Robert Dailey rcdai...@gmail.com: On Aug 11, 3:40 pm, Bearophile bearophileh...@lycos.com wrote:

Re: Need cleanup advice for multiline string

2009-08-12 Thread Steven D'Aprano
On Wed, 12 Aug 2009 07:47:58 -0700, Robert Dailey wrote: On Aug 12, 9:41 am, Robert Dailey rcdai...@gmail.com wrote: ... I was actually joking about my remark, I was making fun of the fact that Bearophile took my figure of speech literally. Keep in mind that the Internet is a global

Re: best practice for documenting a project? pydoc?

2009-08-12 Thread shaileshkumar
Hello, EPYDOC is very good for automatic generation of documentation from source code. You may also consider Sphinx http://sphinx.pocoo.org/ which is used for many projects including the official Python documentation, documentation of Zope (http://docs.zope.org/). See the full list of projects

Re: Programming by Contract

2009-08-12 Thread shaileshkumar
zope.interface provides extensive support for design by contract. http://pypi.python.org/pypi/zope.interface. This package can be used independently of zope in other projects. - Shailesh On Aug 12, 2:20 am, Ethan Furman et...@stoneleaf.us wrote: Charles Yeomans wrote: On Aug 11, 2009, at 3:30

Re: Need cleanup advice for multiline string

2009-08-12 Thread Steven D'Aprano
On Wed, 12 Aug 2009 08:11:43 -0700, Simon Forman wrote: [quoting Robert Dailey] I cannot completely doubt that there are logical women out there. I just haven't seen one yet. But that doesn't mean I'm a sexist. Oh my. And you were doing so well. You haven't seen a logical woman? Perhaps

Re: httplib incredibly slow :-(

2009-08-12 Thread shaileshkumar
We use PyCURL on Windows. http://pycurl.sourceforge.net/ provides pre- built versions for Windows and it works out of the box. - Shailesh On Aug 12, 7:14 pm, Max Erickson maxerick...@gmail.com wrote: Chris Withers ch...@simplistix.co.uk wrote: I'm still reeling from what seems to be such a

Re: Need cleanup advice for multiline string

2009-08-12 Thread David Bolen
Robert Dailey rcdai...@gmail.com writes: Hey guys. Being a C++ programmer, I like to keep variable definitions close to the location in which they will be used. This improves readability in many ways. However, when I have a multi-line string definition at function level scope, things get

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Paul Boddie
On 12 Aug, 17:08, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Wed, 12 Aug 2009 06:24:18 -0700, Paul Boddie wrote: What does the Python entry on Wikipedia have to do with editing the Python documentation in a Wiki? Good question. I was responding to you mentioning

Multithreaded library for Python?

2009-08-12 Thread Robert Dailey
Hey guys, I realize the python library has multithreading support in it, but not the kind I'm really looking for. I want something like Intel's TBB, but for Python 3.1. I need to be able to spawn off Tasks that operate until completed and then end by themselves. I could create my own framework

Re: Scraping Wikipedia with Python

2009-08-12 Thread Dotan Cohen
maybe you want dbpedia. I did not know about this. Thanks! That is the reason why I ask. This list has an unbelievable collective knowledge and I am certain that asking how much is 2+2 would net an insightful answer that would teach me something. Thank you, Paul, and thank you to the entire

Re: Scraping Wikipedia with Python

2009-08-12 Thread Dotan Cohen
http://pypi.python.org/pypi?%3Aaction=searchterm=wikipedia ? Thanks, Thorsten, I will go through those. I did not know about that resource, I am not a regular coder. One more resource to add to the toolbox! -- Dotan Cohen http://what-is-what.com http://gibberish.co.il --

Re: httplib incredibly slow :-(

2009-08-12 Thread David Stanek
On Tue, Aug 11, 2009 at 4:25 PM, Chris Withersch...@simplistix.co.uk wrote: Hi All, I'm using the following script to download a 150Mb file: from base64 import encodestring from httplib import HTTPConnection from datetime import datetime conn = HTTPSConnection('localhost') headers = {}

Mimicing an HTML form

2009-08-12 Thread Zach Hobesh
Hi all, I'm having alot of trouble automating the submitting of form. I have an HTML page that works and it looks like this: form action='*script here*' enctype=multipart/form-data method=post input name=txtTitle id=txtTitle value=Video Title maxlength=50 /BR / input type=file

Re: httplib incredibly slow :-(

2009-08-12 Thread Chris Withers
Max Erickson wrote: There is an httplib2 (but I don't know anything further about it...): http://code.google.com/p/httplib2/ I had a look, it uses httplib, so will likely suffer from the same problems... Calling wget or curl using a subprocess is probably as easy as it is ugly, I use the

Re: matching patterns after regex?

2009-08-12 Thread Martin
On Aug 12, 1:42 pm, Martin mdeka...@gmail.com wrote: On Aug 12, 1:23 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Wed, 12 Aug 2009 05:12:22 -0700, Martin wrote: I tried re.findall((\w+COORDINATE).*\s+VALUE\s+=\s([\d\.\w-]+),s) You need to put quotes around

Re: httplib incredibly slow :-(

2009-08-12 Thread Shailesh Kumar
Yes it includes libcurl. I didn't have to install it separately. I still continue to use Python 2.4. So cannot say about Python 2.6. - Shailesh On Wed, Aug 12, 2009 at 10:23 PM, Chris Withers ch...@simplistix.co.ukwrote: shaileshkumar wrote: We use PyCURL on Windows.

Re: httplib incredibly slow :-(

2009-08-12 Thread Chris Withers
shaileshkumar wrote: We use PyCURL on Windows. http://pycurl.sourceforge.net/ provides pre- built versions for Windows and it works out of the box. Does it include libcurl? Are these builds available for Python 2.6? Chris -- Simplistix - Content Management, Batch Processing Python

How to find all possibly overlapping matches?

2009-08-12 Thread kj
re.findall finds all non-overlapping matches, but what if one wants all (maximal) matches, even those that overlap? All the solutions I can come up involve calling re.search iteratively, each time giving it a pos parameter starting just after the start of the previous match. Is there a

Re: best practice for documenting a project? pydoc?

2009-08-12 Thread Esmail
shaileshkumar wrote: Hello, EPYDOC is very good for automatic generation of documentation from source code. You may also consider Sphinx http://sphinx.pocoo.org/ which is used for many projects including the official Python documentation, documentation of Zope (http://docs.zope.org/). See the

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Ethan Furman
Paul Boddie wrote: On 12 Aug, 17:08, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: It's not the people who suggest improvements to the docs that are the problem, but the ones who insist that the docs are terrible, but aren't willing to do anything but complain. Oh, and trolls

Re: httplib incredibly slow :-(

2009-08-12 Thread Chris Withers
David Stanek wrote: I tried to reproduce this, but I could not. Could you paste in the output of your script? Not sure how that'll help, but sure: 2009-08-11 21:27:59.153000 request: 0:00:00.109000 response: 0:00:00.109000 read: 0:24:31.266000 Also on the same box where you run this script

Re: best practice for documenting a project? pydoc?

2009-08-12 Thread Esmail
Mark Lawrence wrote: Hi Mark, The docs for the constraint package look good, see http://labix.org/python-constraint and http://labix.org/doc/constraint. I think they've been produced with epydoc see http://epydoc.sourceforge.net/ Thanks for the links, I'll take a look. Any experience with

Re: How to find all possibly overlapping matches?

2009-08-12 Thread MRAB
kj wrote: re.findall finds all non-overlapping matches, but what if one wants all (maximal) matches, even those that overlap? All the solutions I can come up involve calling re.search iteratively, each time giving it a pos parameter starting just after the start of the previous match. Is

Re: Unrecognized escape sequences in string literals

2009-08-12 Thread Douglas Alan
On Aug 12, 3:08 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Tue, 11 Aug 2009 14:48:24 -0700, Douglas Alan wrote: In any case, my argument has consistently been that Python should have treated undefined escape sequences consistently as fatal errors, A reasonable

Re: best practice for documenting a project? pydoc?

2009-08-12 Thread Mark Lawrence
Esmail wrote: Mark Lawrence wrote: Hi Mark, The docs for the constraint package look good, see http://labix.org/python-constraint and http://labix.org/doc/constraint. I think they've been produced with epydoc see http://epydoc.sourceforge.net/ Thanks for the links, I'll take a look. Any

Re: fileinput

2009-08-12 Thread Dave Angel
naaman wrote: I'm writing my first Python script and I want to use fileinput to open a file in r+ mode. Tried fileinput.input(sys.argv[1:],r+) but that didn't work. ANy ideas? Need to find and overwrite a line in a file several times. I can do it using open and seek() etc. but was wondering if

Re: hashability

2009-08-12 Thread James Stroud
Steven D'Aprano wrote: Well there you go -- why on earth would you prohibit None as a dictionary key??? That's a serious failure. roentgen 1% python Python 2.5 (r25:51908, Sep 20 2006, 17:36:21) [GCC 3.4.2] on linux2 Type help, copyright, credits or license for more information. py

Re: Unrecognized escape sequences in string literals

2009-08-12 Thread Douglas Alan
On Aug 12, 3:36 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Tue, 11 Aug 2009 13:20:52 -0700, Douglas Alan wrote: My Annotated C++ Reference Manual is packed, and surprisingly in Stroustrup's Third Edition, there is no mention of the issue in the entire 1,000 pages.

Re: hashability

2009-08-12 Thread Chris Rebert
On Wed, Aug 12, 2009 at 1:37 PM, James Stroudjstr...@mbi.ucla.edu wrote: Steven D'Aprano wrote: Well there you go -- why on earth would you prohibit None as a dictionary key??? That's a serious failure. roentgen 1% python Python 2.5 (r25:51908, Sep 20 2006, 17:36:21) [GCC 3.4.2] on linux2

Re: How to find all possibly overlapping matches?

2009-08-12 Thread kj
In mailman.7.1250097801.2903.python-l...@python.org MRAB pyt...@mrabarnett.plus.com writes: kj wrote: re.findall finds all non-overlapping matches, but what if one wants all (maximal) matches, even those that overlap? All the solutions I can come up involve calling re.search iteratively,

Re: SQLObject 0.11.0

2009-08-12 Thread William
I don't want to start a flame war and would just like some information before diving in-- What are some the advantages and disadvantages of SQLObject compared to SQLAlchemy? Thanks, William From: Oleg Broytmann p...@phd.pp.ru To: Python Mailing List

Re: hashability

2009-08-12 Thread Steven D'Aprano
On Wed, 12 Aug 2009 10:37:45 -0700, James Stroud wrote: Steven D'Aprano wrote: Well there you go -- why on earth would you prohibit None as a dictionary key??? That's a serious failure. roentgen 1% python Python 2.5 (r25:51908, Sep 20 2006, 17:36:21) [GCC 3.4.2] on linux2 Type help,

Pulling arrays from database for plotting

2009-08-12 Thread Kurt Schwehr
Hi all, What's the best way to pull arrays from a database for plotting? Right now, this is what I do, but can it be done simpler / more efficiently? ipython -pylab import sqlite3 cx = sqlite3.connect('20080407.decimated.db3') a = array( [tuple(row) for row in cx.execute('SELECT cg_offset,

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Raymond Hettinger
On Aug 12, 3:32 am, Paul Boddie p...@boddie.org.uk wrote: Maybe the problem is that although everyone welcomes contributions and changes (or says that they do), the mechanisms remain largely beyond criticism. FWIW, I support the idea the regular docs incorporating links to freely editable wiki

Re: SQLObject 0.11.0

2009-08-12 Thread Daniel Fetchinson
I don't want to start a flame war and would just like some information before diving in-- What are some the advantages and disadvantages of SQLObject compared to SQLAlchemy? In short: sqlobject is much simpler (to use, to understand, etc) than sqlalchemy and so I prefer it in small projects.

Re: hashability

2009-08-12 Thread Carl Banks
On Aug 12, 10:37 am, James Stroud jstr...@mbi.ucla.edu wrote: Steven D'Aprano wrote: Well there you go -- why on earth would you prohibit None as a dictionary key??? That's a serious failure. roentgen 1% python Python 2.5 (r25:51908, Sep 20 2006, 17:36:21) [GCC 3.4.2] on linux2 Type

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Raymond Hettinger
[Xah Lee] i've wrote several articles about this issue, total time spend on this is probably more than 2 months full-time work. See: • Python Documentation Problems  http://xahlee.org/perl-python/python_doc_index.html I just read you post. You did devote a substantial amount of time to the

Extending embedded python-can extensions be local to a dictionary?

2009-08-12 Thread Michael Kohout
Hello all- I've got a multithreaded server-based application that I'd like to use python to provide plugin support for. At execution time I would like each call to the plugin/plugins to have their own implementation of these extension methods. Looking at

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread r
On Aug 12, 1:27 pm, Raymond Hettinger pyt...@rcn.com wrote: (snip) * Many doc requests come from people just learning the language (that makes sense because the learning process involves reading the docs).  Unfortunately, a fair number of those requests are flat-out wrong or represent a

Format Code Repeat Counts?

2009-08-12 Thread jschwab
Are repeat counts supported Python's str.format() in some fashion? In Fortran my format strings can have repeat counts. pseudocode write(*, fmt=3F8.3) [1, 2, 3] 1.000 2.000 3.000 /pseudocode I don't think printf-style format codes, which is what'd I'd previously used in Python, allow for

csv.DictWriter.write_header()

2009-08-12 Thread Alan G Isaac
Given a csv.DictWriter instance `dw` I think it would be nice to be able to say dw.write_header() instead of dw.writer.writerow(dw.fieldnames) Good idea? Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: matching patterns after regex?

2009-08-12 Thread Bernard
On 12 août, 12:43, Martin mdeka...@gmail.com wrote: On Aug 12, 1:42 pm, Martin mdeka...@gmail.com wrote: On Aug 12, 1:23 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Wed, 12 Aug 2009 05:12:22 -0700, Martin wrote: I tried

Re: Extending embedded python-can extensions be local to a dictionary?

2009-08-12 Thread Carl Banks
On Aug 12, 12:44 pm, Michael Kohout mwkoh...@gmail.com wrote: Hello all- I've got a multithreaded server-based application that I'd like to use python to provide plugin support for.  At execution time I would like each call to the plugin/plugins to have their own implementation of these

How to launch a function at regular time intervals ?

2009-08-12 Thread David
Hi all, I'm trying to launch a function at regular time intervals but cannot find the way to do it. Here is the code I wrote (time_interval is a user defined variable in seconds): while(1) timestamp=datetime.now() timestamp_seconds=timestamp.hour*3600+timestamp.minute*60+timestamp.second if

Re: Unrecognized escape sequences in string literals

2009-08-12 Thread Douglas Alan
On Aug 12, 5:32 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: That problem basically boils down to a deep-seated philosophical disagreement over which philosophy a language should follow in regard to backslash escapes: Anything not explicitly permitted is forbidden

Re: Social problems of Python doc [was Re: Python docs disappointing]

2009-08-12 Thread Raymond Hettinger
[Raymond Hettinger] Here are a few thoughts on list.sort() for those who are interested: After one more reading of Xah Lee's posts on the documentation for sort, here are couple more thoughts: * The reason that list.sort() allows None for the cmp parameter is not so that you can write

Re: matching patterns after regex?

2009-08-12 Thread Mark Lawrence
Bernard wrote: On 12 août, 12:43, Martin mdeka...@gmail.com wrote: On Aug 12, 1:42 pm, Martin mdeka...@gmail.com wrote: On Aug 12, 1:23 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Wed, 12 Aug 2009 05:12:22 -0700, Martin wrote: I tried

Plotting Quadratic Functions, pygame

2009-08-12 Thread Senad Ibraimoski -student-Mathematical Institute Belgrade
Hello, I'm a new guy to this group, my professor recommend this group to me, because I was boring him with questions.I'm new to python, and I have problem plotting Quadratic Functions. Using module pygame. Here is the code: #!/usr/bin/env python import pygame def main(): import sys

  1   2   >