python-graph-1.6.2 released

2009-10-01 Thread Pedro Matiello
python-graph release 1.6.2 http://code.google.com/p/python-graph/ python-graph is a library for working with graphs in Python. This software provides a suitable data structure for representing graphs and a whole set

[ANN] BleachBit 0.6.5 released

2009-10-01 Thread Andrew Ziem
BleachBit (pure PyGTK) deletes traces of online activity, and you may be surprised how much disk space it frees up. Highlight of changes since 0.6.4: * Vacuum Google Chrome * Delete Google Chrome 3 browsing history * Add portable app for Windows * Introduce the bonus cleaners package with 9

New Book: Programming in Python 3 (Second Edition)

2009-10-01 Thread Mark Summerfield
Hi, A new edition of my Python 3 book will be available in the U.S. next month, and elsewhere in December or January: Programming in Python 3 (Second Edition): A Complete Introduction to the Python Language ISBN 0321680561 http://www.qtrac.eu/py3book.html The book is aimed at a wide audience,

csound ifn parser and tools 1.04

2009-10-01 Thread edexter
csound ifn parser 1.04 ifn parser is a parser to help in combing csound instruments also tools that may be usefull for code editors including a ifn number locater and a depreceated csound command locater. The ifn number, and depreceated number list may be usefull regardless of the programming

[ANN] SciPy India conference in Dec. 2009

2009-10-01 Thread Prabhu Ramachandran
Greetings, The first Scientific Computing with Python conference in India (http://scipy.in) will be held from December 12th to 17th, 2009 at the Technopark in Trivandrum, Kerala, India (http://www.technopark.org/). The theme of the conference will be Scientific Python in Action with respect to

Python and lost files

2009-10-01 Thread Timothy W. Grove
Recently I purchased some software to recover some files which I had lost. (A python project, incidentally! Yes, I should have kept better backups!) They were nowhere to found in the file system, nor in the recycle bin, but this software was able to locate them and restore them. I was just

Re: unicode issue

2009-10-01 Thread gentlestone
save in utf-8 the coding declaration also has to be utf-8 ok, I understand, but what's the problem? Unfortunately seems to be the Python interactive mode doesn't have unicode support. It recognize the latin-1 encoding only. So I have 2 options, how to write doctest: 1. Replace native charaters

New Book: Programming in Python 3 (Second Edition)

2009-10-01 Thread Mark Summerfield
Hi, A new edition of my Python 3 book will be available in the U.S. next month, and elsewhere in December or January: Programming in Python 3 (Second Edition): A Complete Introduction to the Python Language ISBN 0321680561 http://www.qtrac.eu/py3book.html The book is aimed at a wide audience,

Re: Python and lost files

2009-10-01 Thread lallous
Hello Timothy, Timothy W. Grove tim_gr...@sil.org wrote in message news:mailman.726.1254378947.2807.python-l...@python.org... Recently I purchased some software to recover some files which I had lost. (A python project, incidentally! Yes, I should have kept better backups!) They were nowhere

Re: M2Crypto 0.20.1 won't build on Red Hat Linux

2009-10-01 Thread Heikki Toivonen
John Nagle wrote: M2Crypto, from http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-0.20.1.tar.gz won't build on Red Hat Linux / 386. The error is It's some incompatibility between Red Hat include file packaging and M2Crypto. Yup, all Fedora Core-based systems actually.

Re: Most active coroutine library project?

2009-10-01 Thread Hendrik van Rooyen
On Thursday, 1 October 2009 00:27:02 Rhodri James wrote: I was going to say, you want 256 bytes of RAM, you profligate so-and-so? Here, have 32 bytes of data space and stop your whining :-) My multi tasking is coming on nicely, but I am struggling a bit with the garbage collection. The

PyOpenGL and graphics card support

2009-10-01 Thread jefm
OpenGL newbie alert!!! Do I need to do anything special to use OpenGL capabilities of my graphics card ? I have the impression PyOpenG is using the Windows emulation. when I execute the following code: print glGetString - GL_VENDOR: , glGetString (GL_VENDOR) print glGetString -

A new Internet-search website written in Python

2009-10-01 Thread hrg...@gmail.com
Dear Python-list subscribers, The purpose of this email is to inform the Python-list mailing-list subscribers of an Internet-search website that is run by software written in Python. The website has been in development for several months, and although it is not in a very polished state as of

Re: PyOpenGL and graphics card support

2009-10-01 Thread jefm
these are the imports I use: from OpenGL.GL import * from OpenGL.GLUT import * from OpenGL.GLU import * -- http://mail.python.org/mailman/listinfo/python-list

Re: A new Internet-search website written in Python

2009-10-01 Thread Paul Rubin
hrg...@gmail.com hrg...@gmail.com writes: The purpose of this email is to inform the Python-list mailing-list subscribers of an Internet-search website that is run by software written in Python. Is the software downloadable? If not, why should anyone here care what language it is written in?

Re: A new Internet-search website written in Python

2009-10-01 Thread hrg...@gmail.com
On 10/1/09, Paul Rubin http://phr...@nospam.invalid wrote: hrg...@gmail.com hrg...@gmail.com writes: The purpose of this email is to inform the Python-list mailing-list subscribers of an Internet-search website that is run by software written in Python. Is the software downloadable? If not,

Unofficial Python GIS SIG

2009-10-01 Thread sean.gill...@gmail.com
There's growing interest among GIS users of Python for a discussion group, so I've started an unofficial Python GIS SIG at: http://groups.google.com/group/python-gis-sig. Please join if you're interested in improving Python's GIS story. At any rate, the group should (hopefully) reduce the number

Re: Simple if-else question

2009-10-01 Thread Sion Arrowsmith
MRAB pyt...@mrabarnett.plus.com wrote: [ for ... else ] The example that makes it clearest for me is searching through a list for a certain item and breaking out of the 'for' loop if I find it. If I get to the end of the list and still haven't broken out then I haven't found the item, and that's

Re: Python and lost files

2009-10-01 Thread alex23
Timothy W. Grove tim_gr...@sil.org wrote: I was just wondering if there was a way using python to view and recover files from the hard drive which would otherwise remain lost forever? I'm not familiar with any Python-based tools for data recovery, but you might be interested in mercurial[1],

Re: Simple if-else question

2009-10-01 Thread Olof Bjarnason
2009/10/1 Sion Arrowsmith s...@viridian.paintbox: MRAB  pyt...@mrabarnett.plus.com wrote: [ for ... else ] The example that makes it clearest for me is searching through a list for a certain item and breaking out of the 'for' loop if I find it. If I get to the end of the list and still haven't

Re: Python RPG Codebase

2009-10-01 Thread Jack Diederich
On Thu, Oct 1, 2009 at 1:22 AM, Lanny lan.rogers.b...@gmail.com wrote: I've been thinking about putting together a text based RPG written fully in Python, possibly expanding to a MUD system. I'd like to know if anyone feels any kind of need for this thing or if I'd be wasting my time, and also

Re: unicode issue

2009-10-01 Thread Dave Angel
gentlestone wrote: save in utf-8 the coding declaration also has to be utf-8 ok, I understand, but what's the problem? Unfortunately seems to be the Python interactive mode doesn't have unicode support. It recognize the latin-1 encoding only. So I have 2 options, how to write doctest: 1.

cx_Freeze.freezer.ConfigError: no initscript named Console

2009-10-01 Thread John
cx_freeze v4.01 Python 2.6 Ubuntu Jaunty Following the example of 'cx-freeze hello.py', I'm getting the error message below. I put all of the error keywords into google and found no hits. Some people in various posts have said to use Python 2.5 but a lot of my code is using Python 2.6 features.

Re: A new Internet-search website written in Python

2009-10-01 Thread Chris Jones
On Thu, Oct 01, 2009 at 05:22:50AM EDT, hrg...@gmail.com wrote: On 10/1/09, Paul Rubin http://phr...@nospam.invalid wrote: ... By the way, I have noticed that the address in the from field in your e-mail is set to http://phr...@nospam.invalid;. Is this supposed to imply that my previous

Re: ActivePython 3.1.1.2 vs Python 3.1.1 for OSX?

2009-10-01 Thread flebber
On Oct 1, 11:28 am, srid sridhar.ra...@gmail.com wrote: On Sep 30, 4:51 pm, Robert Hicks sigz...@gmail.com wrote: I am just curious which I should use. I am going to start learning Python soon. Are they comparable and I just do a eenie meenie minie moe? ActivePython is essentially same

hii

2009-10-01 Thread padmapriya sekaran
I have a problem in using interp from numpy for which i need 3 array. my first array is x = scipy.linspace(0.009,0.53,100) and the other two array should be read from my file with 100x2 dimension (file1_lines) but it is read as string instead of two columns for line in file1_lines: line

Re: Python book

2009-10-01 Thread Greg
On Sep 30, 6:58 am, lallous lall...@lgwm.org wrote: Hello Can anyone suggest a good book Python book for advancing from beginner level? (I started with Learning Python 3rd ed) Regards, Elias Elias, Try Core Python Programming, 2nd Edition, by Wesley J. Chun. I love it! Cheers, Greg --

Re: Python book

2009-10-01 Thread Banibrata Dutta
Asking about 'Python' book recommendation is something that always leads to a near religious recommendation set. I have my favourites too, but would recommend original poster to check the no. of reviews on Amazon, BN etc., after collecting recommendations from this list, before finalizing on one.

cx_freeze problem on Ubuntu

2009-10-01 Thread John
Sorry if this might be a repost. I'm having problems with my newsreader. My system: cx_freeze 4.1 Python 2.6 Ubuntu Jaunty I downloaded the cx_freeze source code from http://cx-freeze.sourceforge.net/ into a directory. I wrote a one line python program 'print( hello world )' According to

Re: unicode issue

2009-10-01 Thread Hyuga
On Sep 30, 3:34 am, gentlestone tibor.b...@hotmail.com wrote: Why don't work this code on Python 2.6? Or how can I do this job? _MAP = {     # LATIN     u'À': 'A', u'Á': 'A', u'Â': 'A', u'Ã': 'A', u'Ä': 'A', u'Å': 'A', u'Æ': 'AE', u'Ç':'C',     u'È': 'E', u'É': 'E', u'Ê': 'E', u'Ë': 'E',

Re: Python RPG Codebase

2009-10-01 Thread exarkun
On 05:46 am, jackd...@gmail.com wrote: On Thu, Oct 1, 2009 at 1:22 AM, Lanny lan.rogers.b...@gmail.com wrote: I've been thinking about putting together a text based RPG written fully in Python, possibly expanding to a MUD system. I'd like to know if anyone feels any kind of need for this thing

Isaac Cipher impl. in python

2009-10-01 Thread pw_ ^
Hello, I'm looking for an Isaac Cipher impl. in Python. If anyone has it, please contact me. Thanks, pw_^ -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode issue

2009-10-01 Thread Walter Dörwald
On 01.10.09 16:09, Hyuga wrote: On Sep 30, 3:34 am, gentlestone tibor.b...@hotmail.com wrote: Why don't work this code on Python 2.6? Or how can I do this job? _MAP = { # LATIN u'À': 'A', u'Á': 'A', u'Â': 'A', u'Ã': 'A', u'Ä': 'A', u'Å': 'A', u'Æ': 'AE', u'Ç':'C', u'È': 'E',

Pyserial non-standard baud rate

2009-10-01 Thread oyinbo55
Hello all: this is my first post. I hope I'm doing it right. I have a digital multimeter that sends data through an RS232 interface at 19230 baud. I would like to record and graph the output in Python. Pyserial does not want me to set the baudrate at a non-standard value:

Re: Pyserial non-standard baud rate

2009-10-01 Thread Richard Brodie
oyinbo55 oyinb...@gmail.com wrote in message news:2feb36fc-106c-4d7c-a697-db59971dc...@a7g2000yqo.googlegroups.com... Using the standard 19200 baud results in gobbledegook from the multimeter. You aren't going to notice a 0.1% clock skew within 1 byte. Forget about the difference between

Re: unicode issue

2009-10-01 Thread Rami Chowdhury
On Thu, 01 Oct 2009 08:10:58 -0700, Walter Dörwald wal...@livinglogic.de wrote: On 01.10.09 16:09, Hyuga wrote: On Sep 30, 3:34 am, gentlestone tibor.b...@hotmail.com wrote: Why don't work this code on Python 2.6? Or how can I do this job? [snip _MAP] def downcode(name):

Re: unicode issue

2009-10-01 Thread Walter Dörwald
On 01.10.09 17:50, Rami Chowdhury wrote: On Thu, 01 Oct 2009 08:10:58 -0700, Walter Dörwald wal...@livinglogic.de wrote: On 01.10.09 16:09, Hyuga wrote: On Sep 30, 3:34 am, gentlestone tibor.b...@hotmail.com wrote: Why don't work this code on Python 2.6? Or how can I do this job? [snip

Re: unicode issue

2009-10-01 Thread Peter Otten
Rami Chowdhury wrote: On Thu, 01 Oct 2009 08:10:58 -0700, Walter Dörwald wal...@livinglogic.de wrote: On 01.10.09 16:09, Hyuga wrote: On Sep 30, 3:34 am, gentlestone tibor.b...@hotmail.com wrote: Why don't work this code on Python 2.6? Or how can I do this job? [snip _MAP] def

Re: unicode issue

2009-10-01 Thread Rami Chowdhury
On Thu, 01 Oct 2009 09:03:38 -0700, Walter Dörwald wal...@livinglogic.de wrote: Yes, but any accented characters have been split into the base character and the combining accent via normalize() before, so only the accent gets removed. Of course non-decomposable characters will be removed

Re: emptying a list

2009-10-01 Thread Geoffrey Clements
lallous lall...@lgwm.org wrote in message news:ha2htc$u9...@aioe.org... Hello What is faster when clearing a list? del L[:] or L = [] Oh, L = [] definitely, on the basis that there are fewer characters to type. http://docs.python.org/3.1/library/profile.html -- Geoff --

Re: cx_freeze problem on Ubuntu

2009-10-01 Thread Jon Clements
On 1 Oct, 15:08, John j...@nospam.net wrote: Sorry if this might be a repost.  I'm having problems with my newsreader. My system: cx_freeze 4.1 Python 2.6 Ubuntu Jaunty I downloaded the cx_freeze source code fromhttp://cx-freeze.sourceforge.net/into a directory. I wrote a one line

Re: emptying a list

2009-10-01 Thread Jon Clements
On 1 Oct, 16:30, lallous lall...@lgwm.org wrote: Hello What is faster when clearing a list? del L[:] or L = [] -- Elias Does it really matter that much? And you're really talking about two different things, which quite often come up on this group. Example follows: x = range(5) x

Re: PyOpenGL and graphics card support

2009-10-01 Thread Mike C. Fletcher
jefm wrote: these are the imports I use: from OpenGL.GL import * from OpenGL.GLUT import * from OpenGL.GLU import * PyOpenGL will use the default OpenGL renderer for your system, however, before you have an OpenGL context (rendering window) the system can report whatever the heck it wants

Re: M2Crypto 0.20.1 won't build on Red Hat Linux

2009-10-01 Thread John Nagle
Heikki Toivonen wrote: John Nagle wrote: M2Crypto, from http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-0.20.1.tar.gz won't build on Red Hat Linux / 386. The error is It's some incompatibility between Red Hat include file packaging and M2Crypto. Yup, all Fedora Core-based

Q: sort's key and cmp parameters

2009-10-01 Thread kj
Challenge: to come up with a sorting task that cannot be achieved by passing to the sort method (or sorted function) suitable values for its key and reverse parameters, but instead *require* giving a value to its cmp parameter. For example, from random import random scrambled =

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Laszlo Nagy
Is this a homework? Challenge: to come up with a sorting task that cannot be achieved by passing to the sort method (or sorted function) suitable values for its key and reverse parameters, but instead *require* giving a value to its cmp parameter. Let me put up this question: how do you

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Peter Otten
kj wrote: Challenge: to come up with a sorting task that cannot be achieved by passing to the sort method (or sorted function) suitable values for its key and reverse parameters, but instead *require* giving a value to its cmp parameter. For example, from random import random scrambled

AJAX Widget Framework

2009-10-01 Thread Laszlo Nagy
I'm looking for an open source, AJAX based widget/windowing framework. Here is what I need: - end user opens up a browser, points it to a URL, logs in - on the server site, sits my application, creating a new session for each user that is logged in - on the server site, I create

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Laszlo Nagy
can be achieved (to a very good approximation at least) with scrambled = some_list.sort(key=lambda x: random()) Is there a real-life sorting task that requires (or is far more efficient with) cmp and can't be easily achieved with key and reverse? The core developers don't think there

Re: How different are a generator's send and next methods

2009-10-01 Thread Simon Forman
On Wed, Sep 30, 2009 at 4:24 PM, Andrey Fedorov anfedo...@gmail.com wrote: As far as I can tell, a generator's .next() is equivalent to .send(None). Is this true? They are equivalent AFAIK. If so, [why] aren't they unified in a method with a single argument which defaults to None? -

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Carsten Haese
kj wrote: Challenge: to come up with a sorting task that cannot be achieved by passing to the sort method (or sorted function) suitable values for its key and reverse parameters, but instead *require* giving a value to its cmp parameter. Such a task can't exist, because any arbitrary

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Ethan Furman
Laszlo Nagy wrote: can be achieved (to a very good approximation at least) with scrambled = some_list.sort(key=lambda x: random()) Is there a real-life sorting task that requires (or is far more efficient with) cmp and can't be easily achieved with key and reverse? The core

Re: iterate over list while changing it

2009-10-01 Thread Simon Forman
On Wed, Sep 30, 2009 at 11:19 PM, Daniel Stutzbach dan...@stutzbachenterprises.com wrote: On Thu, Sep 24, 2009 at 3:32 PM, Torsten Mohr tm...@s.netic.de wrote: a = [1, 2, 3, 4, 5, 6] for i, x in enumerate(a):    if x == 3:        a.pop(i)        continue    if x == 4:        a.push(88)

Re: hii

2009-10-01 Thread Simon Forman
On Thu, Oct 1, 2009 at 7:55 AM, padmapriya sekaran ppriy...@gmail.com wrote: I have a problem in using interp from numpy for which i need 3 array. my first array is x = scipy.linspace(0.009,0.53,100) and the other two array should be read from my file with 100x2 dimension (file1_lines) but

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Paul Rubin
kj no.em...@please.post writes: Is there a real-life sorting task that requires (or is far more efficient with) cmp and can't be easily achieved with key and reverse? Yes, think of sorting tree structures where you have to recursively compare them til you find an unequal pair of nodes. To

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Bearophile
Paul Rubin: Yes, think of sorting tree structures where you have to recursively compare them til you find an unequal pair of nodes. That's cute. In what situations do you have to perform such kind of sort? Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: What does the list_folders() method of mailbox.Maildir actually ?do (if anything)?

2009-10-01 Thread Aahz
In article h9o1bf$cm...@news.eternal-september.org, tinn...@isbd.co.uk wrote: Tim Roberts t...@probo.com wrote: tinn...@isbd.co.uk wrote: My maildir hierarchy is created by mutt which is a *very* standards compliant MUA, surely standard python libraries should work with standard maildirs not

Re: Unofficial Python GIS SIG

2009-10-01 Thread Aahz
In article 2edb4c08-5853-4d21-9bcc-5895c4312...@l13g2000yqb.googlegroups.com, sean.gill...@gmail.com sean.gill...@gmail.com wrote: There's growing interest among GIS users of Python for a discussion group, so I've started an unofficial Python GIS SIG at:

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Duncan Booth
kj no.em...@please.post wrote: Is there a real-life sorting task that requires (or is far more efficient with) cmp and can't be easily achieved with key and reverse? There is no sorting task that *requires* cmp. If all else fails you can define a key class to wrap the original wrapper such

accessing dictionary keys

2009-10-01 Thread Andreas Balogh
Hello, when building a list of points like points = [ ] points.append((1, 2)) points.append((2, 3)) point = points[0] eventually I'd like to access the tuple contents in a more descriptive way, for example: print point.x, point.y but instead I have to write (not very legible) print

Re: accessing dictionary keys

2009-10-01 Thread Carsten Haese
Andreas Balogh wrote: Hello, when building a list of points like points = [ ] points.append((1, 2)) points.append((2, 3)) point = points[0] eventually I'd like to access the tuple contents in a more descriptive way, for example: print point.x, point.y I'm not sure exactly what

Re: accessing dictionary keys

2009-10-01 Thread Rami Chowdhury
On Thu, 01 Oct 2009 13:19:18 -0700, Andreas Balogh balo...@gmail.com wrote: Is there any shortcut which allows to use point.x with a dictionary, or defining keys with tuples and lists? Regards, Andreas It sounds like you want collections.namedtuple (Python 2.6 and up; recipe for

Re: accessing dictionary keys

2009-10-01 Thread Jerry Hill
On Thu, Oct 1, 2009 at 4:19 PM, Andreas Balogh balo...@gmail.com wrote: Is there any shortcut which allows to use point.x with a dictionary, or defining keys with tuples and lists? A namedtuple (introduced in python 2.6), acts like a tuple with named fields. Here's an example: from

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Raymond Hettinger
On Oct 1, 10:08 am, kj no.em...@please.post wrote: Challenge: to come up with a sorting task that cannot be achieved by passing to the sort method (or sorted function) suitable values for its key and reverse parameters, but instead *require* giving a value to its cmp parameter. If you're

Re: Unofficial Python GIS SIG

2009-10-01 Thread seang
On Oct 1, 9:49 pm, a...@pythoncraft.com (Aahz) wrote: In article 2edb4c08-5853-4d21-9bcc-5895c4312...@l13g2000yqb.googlegroups.com, sean.gill...@gmail.com sean.gill...@gmail.com wrote: There's growing interest among GIS users of Python for a discussion group, so I've started an unofficial

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Paul Rubin
Duncan Booth duncan.bo...@invalid.invalid writes: Is there a real-life sorting task that requires (or is far more efficient with) cmp and can't be easily achieved with key and reverse? There is no sorting task that *requires* cmp. If all else fails you can define a key class to wrap the

Re: Pyserial non-standard baud rate

2009-10-01 Thread oyinbo55
On Oct 1, 11:36 am, Richard Brodie r.bro...@rl.ac.uk wrote: oyinbo55 oyinb...@gmail.com wrote in message news:2feb36fc-106c-4d7c-a697-db59971dc...@a7g2000yqo.googlegroups.com... Using the standard 19200 baud results in gobbledegook from the multimeter. You aren't going to notice a 0.1%

Threaded GUI slowing method execution?

2009-10-01 Thread Aaron Hoover
I have a wx GUI application that connects to a serial port in a separate thread, reads from the port, and then is supposed to put the data it finds into a queue to be used by the main GUI thread. Generally speaking, it's working as expected. However, one method (that's part of a library

Concurrent threads to pull web pages?

2009-10-01 Thread Gilles Ganault
Hello I recently asked how to pull companies' ID from an SQLite database, have multiple instances of a Python script download each company's web page from a remote server, eg. www.acme.com/company.php?id=1, and use regexes to extract some information from each page. I need to run

emptying a list

2009-10-01 Thread lallous
Hello What is faster when clearing a list? del L[:] or L = [] -- Elias -- http://mail.python.org/mailman/listinfo/python-list

Re: Concurrent threads to pull web pages?

2009-10-01 Thread exarkun
On 1 Oct, 09:28 am, nos...@nospam.com wrote: Hello I recently asked how to pull companies' ID from an SQLite database, have multiple instances of a Python script download each company's web page from a remote server, eg. www.acme.com/company.php?id=1, and use regexes to extract some

Re: emptying a list

2009-10-01 Thread Simon Forman
On Thu, Oct 1, 2009 at 11:30 AM, lallous lall...@lgwm.org wrote: Hello What is faster when clearing a list? del L[:] or L = [] -- Elias -- http://mail.python.org/mailman/listinfo/python-list The first form actually clears the list, the second for just re-binds the name 'L' to a

Re: Concurrent threads to pull web pages?

2009-10-01 Thread MRAB
Gilles Ganault wrote: Hello I recently asked how to pull companies' ID from an SQLite database, have multiple instances of a Python script download each company's web page from a remote server, eg. www.acme.com/company.php?id=1, and use regexes to extract some information from each

Re: Concurrent threads to pull web pages?

2009-10-01 Thread exarkun
On 01:36 am, k...@kyleterry.com wrote: On Thu, Oct 1, 2009 at 6:33 PM, exar...@twistedmatrix.com wrote: On 1 Oct, 09:28 am, nos...@nospam.com wrote: Hello I recently asked how to pull companies' ID from an SQLite database, have multiple instances of a Python script download each

Re: Q: sort's key and cmp parameters

2009-10-01 Thread kj
In b8f7dea7-0fe3-4e25-9ffd-6796a6e2a...@a37g2000prf.googlegroups.com alex23 wuwe...@gmail.com writes: kj no.em...@please.post wrote: This example convinces me that it was a bad idea to get rid of cmp in Python 3, even if situations like this one are rare. It sounds like the entire point of

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Paul Rubin
Bearophile bearophileh...@lycos.com writes: Yes, think of sorting tree structures where you have to recursively compare them til you find an unequal pair of nodes. That's cute. In what situations do you have to perform such kind of sort? It came up in a search engine application I've been

Re: Python and lost files

2009-10-01 Thread Grant Edwards
On 2009-10-01, Timothy W. Grove tim_gr...@sil.org wrote: Recently I purchased some software to recover some files which I had lost. (A python project, incidentally! Yes, I should have kept better backups!) They were nowhere to found in the file system, nor in the recycle bin, but this

Re: Pyserial non-standard baud rate

2009-10-01 Thread John Nagle
oyinbo55 wrote: On Oct 1, 11:36 am, Richard Brodie r.bro...@rl.ac.uk wrote: oyinbo55 oyinb...@gmail.com wrote in message news:2feb36fc-106c-4d7c-a697-db59971dc...@a7g2000yqo.googlegroups.com... Using the standard 19200 baud results in gobbledegook from the multimeter. You aren't going to

Re: Looking for documentation tools

2009-10-01 Thread TerryP
A GUI tool that allows me to enter descriptions, arguments, return values etc, for each function, class, etc. in some forms and then generates and inserts the correct comment syntax,  so pydoc can generate the documentation HTML. (preferrably for windows) Maybe I am a bastard, but

Regular expression to structure HTML

2009-10-01 Thread 504cr...@gmail.com
I'm kind of new to regular expressions, and I've spent hours trying to finesse a regular expression to build a substitution. What I'd like to do is extract data elements from HTML and structure them so that they can more readily be imported into a database. No -- sorry -- I don't want to use

[issue7028] hex function should work with floats

2009-10-01 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I agree it would be useful. That's why this facility already exists in Python = 2.6 (including Python 3.x). :-) Python 2.6.2 (r262:71600, Jul 8 2009, 09:56:31) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type help, copyright, credits

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: It would seem the logical patch would be to return the line when the empty string is returned. This would fall in line with the behavior of other objects with a readline() in python. In following with that, the patch I have attached returns a

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Removed file: http://bugs.python.org/file15012/imaplib-r75166.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949 ___

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Scott Dial
Changes by Scott Dial sc...@scottdial.com: Added file: http://bugs.python.org/file15013/imaplib-r75166.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949 ___

[issue7028] hex function should work with floats

2009-10-01 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I agree it would be useful. That's why this facility already exists Ahem. Embarrassing causation fail. To clarify, Raymond Hettinger proposed this addition some time ago, and others on python-dev supported it. *That's* why it was

[issue7028] hex function should work with floats

2009-10-01 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7028 ___ ___

[issue7026] test_urllib: unsetting missing 'env' variable

2009-10-01 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Can this issue be closed then? -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7026 ___

[issue7022] Doc update for io module

2009-10-01 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: georg.brandl - pitrou nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7022 ___

[issue7026] test_urllib: unsetting missing 'env' variable

2009-10-01 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: This needs to be changed in python2.6 branch as well. I was hesitant as barry was making the build. After the branch opens, I shall make the changes in that and close the issue. -- nosy: +barry

[issue6972] zipfile.ZipFile overwrites files outside destination path

2009-10-01 Thread Ralf Schmitt
Ralf Schmitt sch...@gmail.com added the comment: I'd rather have an extractall version which just throws a RuntimeError than one which overwrites any file with any content on my filesystem if I'm trying to unzip a zip file. Then I at least know that I have to write my own version. Adding a

[issue7027] test_io.py: codecs.IncrementalDecoder is sometimes None

2009-10-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This is something that sometimes happens when running the test suite due to module initialization or finalization oddities (I don't understand the precise reasons myself). It isn't specific to test_io, I think. -- versions: +Python 2.7,

[issue7022] Doc update for io module

2009-10-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: If you are requesting new `start` and `end` arguments to readinto(), the way to do that today is to use a memoryview: # b is your bytearray, f your IO object m = memoryview(b)[start:end] f.readinto(m) If you still want that feature,

[issue7022] Doc update for io module

2009-10-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Actually, I'm not sure what is wrong with the current doc: read(n=-1)¶ Read and return up to n bytes from the stream. As a convenience, if n is unspecified or -1, readall() is called. Otherwise, only one system call is ever made. An empty

[issue7022] Doc update for io module

2009-10-01 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- priority: - normal type: feature request - behavior versions: +Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7022 ___

[issue7028] hex function should work with floats

2009-10-01 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7028 ___ ___ Python-bugs-list

[issue1759169] clean up Solaris port and allow C99 extension modules

2009-10-01 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: We're in the middle of a release so this will have to wait until we are done. Apart from that, is there a reason *not* to apply the patch? (it only seems to affect Solaris after all, and Solaris users here seem consensual that the patch should be

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Probably too late for 2.6.3 - assigning to Barry to check anyway. -- assignee: - barry nosy: +barry, ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-10-01 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: I'm afraid so. Please consider this for landing after 2.6.3 is released. -- assignee: barry - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5949

[issue2986] difflib.SequenceMatcher not matching long sequences

2009-10-01 Thread Geoffrey Bache
Changes by Geoffrey Bache gjb1...@users.sourceforge.net: -- nosy: +gjb1002 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2986 ___ ___

[issue7028] hex function should work with floats

2009-10-01 Thread Josh Cogliati
Josh Cogliati jjcogliati...@yahoo.com added the comment: Thank you for telling me about that function. I read the documentation on hex() and never realized that there was a second instance method float.hex(). I am curious why the proper way to turn a number into hex is the following: import

  1   2   >