Re: emptying a list

2009-10-01 Thread S.Selvam
On Thu, Oct 1, 2009 at 10:13 PM, Jon Clements wrote: > On 1 Oct, 16:30, "lallous" 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 t

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

2009-10-01 Thread Heikki Toivonen
John Nagle wrote: > The right question is "uname --hardware-platform". That returns "i386" if > running on something emulating a 386, even it it's 64-bit capable. Thanks, I'll make a note that I'll need to clarify that part. > With that change, the build runs to completion and and the regression

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 Beau

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 pers

Re: Pyserial non-standard baud rate

2009-10-01 Thread John Nagle
oyinbo55 wrote: On Oct 1, 11:36 am, "Richard Brodie" wrote: "oyinbo55" 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

Re: Python and lost files

2009-10-01 Thread Grant Edwards
On 2009-10-01, Timothy W. Grove 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 software was > able t

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Paul Rubin
Bearophile 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 involved with. --

Re: Q: sort's key and cmp parameters

2009-10-01 Thread kj
In alex23 writes: >kj 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 this exercise was to get other >people to confirm your bias for you. The only problem with this

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, 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 company's web page from a rem

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 page.

Re: emptying a list

2009-10-01 Thread Simon Forman
On Thu, Oct 1, 2009 at 11:30 AM, lallous 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 new,

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 in

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

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 multiple

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 I'v

Re: Pyserial non-standard baud rate

2009-10-01 Thread oyinbo55
On Oct 1, 11:36 am, "Richard Brodie" wrote: > "oyinbo55" 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 byt

Re: Q: sort's key and cmp parameters

2009-10-01 Thread alex23
kj 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 this exercise was to get other people to confirm your bias for you. -- http://mail.python.org/mailman/listinfo/python-list

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Paul Rubin
Raymond Hettinger writes: > If you're assuming a consistent sort-order (transitivity, not > evolving over time, etc), then the cmp method and key method > are mathematically equivalent (you could always do a compare > sort first, record the order produced, and assign the position > number as a key

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Paul Rubin
Duncan Booth 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 original wrapper such

Re: cx_freeze problem on Ubuntu

2009-10-01 Thread John
Jon Clements wrote: Firstly -- never used the library, hadn't even heard of it -- disclaimer over :) Err, python 2.6 doesn't have print as a function by default. Have you done a from __future__ import ? def _GetInitScriptFileName(self, argsSource = None): if argsSource is None:

Re: Python and lost files

2009-10-01 Thread Carl Banks
On Sep 30, 11:35 pm, "Timothy W. Grove" 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 software was a

Re: unicode issue

2009-10-01 Thread Neil Hodgson
Dave Angel: > I know that the clipboard has type tags, but I haven't looked at them in > so long that I forget what they look like. For text, is it just ASCII > and Unicode? Or are there other possible encodings that the source and > sink negotiate? The normal thing seen is that the clipboar

Looking for documentation tools

2009-10-01 Thread Esben von Buchwald
Hello. For documening my thesis project, i'm, looking for 2 things: 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 H

Re: Q: sort's key and cmp parameters

2009-10-01 Thread kj
In <7x1vln2bzh@ruckus.brouhaha.com> Paul Rubin writes: >kj 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

Re: Q: sort's key and cmp parameters

2009-10-01 Thread kj
In Raymond Hettinger writes: Thanks for an extremely helpful reply! >If you need to sort by an ascending primary key and a descending >secondary key, you may find it easiest to sort in two passes >(taking advantage of guaranteed sort stability): >sorted(s, key=secondary, reversed=3DTrue

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 wrote: > > >There's growing interest among GIS users of Python for a discussion > >group, so I've started an unofficial Python GIS S

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Raymond Hettinger
On Oct 1, 10:08 am, 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. If you're assuming a consistent

Re: accessing dictionary keys

2009-10-01 Thread Jerry Hill
On Thu, Oct 1, 2009 at 4:19 PM, Andreas Balogh 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 collections import nam

Re: accessing dictionary keys

2009-10-01 Thread Rami Chowdhury
On Thu, 01 Oct 2009 13:19:18 -0700, Andreas Balogh 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 Python 2.4 or 2.5 at

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

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 point[

Re: Q: sort's key and cmp parameters

2009-10-01 Thread Duncan Booth
kj 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 that comparing th

Re: Unofficial Python GIS SIG

2009-10-01 Thread Aahz
In article <2edb4c08-5853-4d21-9bcc-5895c4312...@l13g2000yqb.googlegroups.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: >http://groups.google.com/group/python-gis-sig. Please join

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

2009-10-01 Thread Aahz
In article , wrote: >Tim Roberts 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 some wierd extension thereof. >> >> The Maildir specificat

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: Q: sort's key and cmp parameters

2009-10-01 Thread Paul Rubin
kj 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 sort with key=... you

Re: hii

2009-10-01 Thread Simon Forman
On Thu, Oct 1, 2009 at 7:55 AM, padmapriya sekaran 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 it is read as

Re: iterate over list while changing it

2009-10-01 Thread Simon Forman
On Wed, Sep 30, 2009 at 11:19 PM, Daniel Stutzbach wrote: > On Thu, Sep 24, 2009 at 3:32 PM, Torsten Mohr 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) >> >>    print "i", i, "x",

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 developers

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 co

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 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? > - Andrey next() pred

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 is

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 windows(frames)

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 > s

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 defin

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 = some_list.sort(c

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 system

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

Re: emptying a list

2009-10-01 Thread Jon Clements
On 1 Oct, 16:30, "lallous" 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) >>>

Re: cx_freeze problem on Ubuntu

2009-10-01 Thread Jon Clements
On 1 Oct, 15:08, John 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 python

Re: emptying a list

2009-10-01 Thread Geoffrey Clements
"lallous" 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 -- http://mai

Re: unicode issue

2009-10-01 Thread Rami Chowdhury
On Thu, 01 Oct 2009 09:03:38 -0700, Walter Dörwald 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 completely, but it would be

Re: unicode issue

2009-10-01 Thread Peter Otten
Rami Chowdhury wrote: > On Thu, 01 Oct 2009 08:10:58 -0700, Walter Dörwald > wrote: > >> On 01.10.09 16:09, Hyuga wrote: >>> On Sep 30, 3:34 am, gentlestone 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 > wrote: > >> On 01.10.09 16:09, Hyuga wrote: >>> On Sep 30, 3:34 am, gentlestone wrote: Why don't work this code on Python 2.6? Or how can I do this job? [snip _MAP] def downco

Re: unicode issue

2009-10-01 Thread Rami Chowdhury
On Thu, 01 Oct 2009 08:10:58 -0700, Walter Dörwald wrote: On 01.10.09 16:09, Hyuga wrote: On Sep 30, 3:34 am, gentlestone wrote: Why don't work this code on Python 2.6? Or how can I do this job? [snip _MAP] def downcode(name): """ >>> downcode(u"Žabovitá zmiešaná kaša") u'Zab

Re: Pyserial non-standard baud rate

2009-10-01 Thread Richard Brodie
"oyinbo55" 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 19200 and 19230.

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: >>>ser=serial.Serial('/de

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 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',

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: 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 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 ti

Re: unicode issue

2009-10-01 Thread Hyuga
On Sep 30, 3:34 am, gentlestone 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', u'Ì': 'I', u'Í': '

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: 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, B&N etc., after collecting recommendations from this list, before finalizing on one.

Re: Python book

2009-10-01 Thread Greg
On Sep 30, 6:58 am, "lallous" 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 -- http

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: ActivePython 3.1.1.2 vs Python 3.1.1 for OSX?

2009-10-01 Thread flebber
On Oct 1, 11:28 am, srid wrote: > On Sep 30, 4:51 pm, Robert Hicks 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 as the installers from python.

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 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 prev

"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: 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.

Re: Python RPG Codebase

2009-10-01 Thread Jack Diederich
On Thu, Oct 1, 2009 at 1:22 AM, Lanny 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 if anyone would be in

Re: Simple if-else question

2009-10-01 Thread Olof Bjarnason
2009/10/1 Sion Arrowsmith : > MRAB   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 it

Re: Python and lost files

2009-10-01 Thread alex23
"Timothy W. Grove" 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], which _is_ (prim

Re: Simple if-else question

2009-10-01 Thread Sion Arrowsmith
MRAB 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 when the else statem

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 of

Re: A new Internet-search website written in Python

2009-10-01 Thread hrg...@gmail.com
On 10/1/09, Paul Rubin wrote: > "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

Re: A new Internet-search website written in Python

2009-10-01 Thread Paul Rubin
"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? -- http://m

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

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 no

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

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 T

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: Python and lost files

2009-10-01 Thread lallous
Hello Timothy, "Timothy W. Grove" 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 to found in the

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,