Re: namespaces and eval

2008-05-17 Thread Arnaud Delobelle
[EMAIL PROTECTED] writes: > On May 16, 2:47 pm, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> wrote: >> On 16 mai, 23:23, [EMAIL PROTECTED] wrote: >> >> > Thanks for the responses. I'm well aware that the function can be >> > passed in the parameters, passing in the functino as an arg defeats >> > th

Re: can't delete from a dictionary in a loop

2008-05-17 Thread George Sakkis
On May 16, 5:22 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > This might be more information than necessary, but it's the best way I > can think of to describe the question without being too vague. > > The task: > > I have a list of processes (well, strings to execute said processes) > and I want to

Re: can't delete from a dictionary in a loop

2008-05-17 Thread castironpi
On May 17, 3:06 am, George Sakkis <[EMAIL PROTECTED]> wrote: > On May 16, 5:22 pm, "Dan Upton" <[EMAIL PROTECTED]> wrote: > > > > > > > This might be more information than necessary, but it's the best way I > > can think of to describe the question without being too vague. > > > The task: > > > I h

Re: Getting elements and text with lxml

2008-05-17 Thread J . Pablo Fernández
On May 17, 2:19 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 16 May 2008 18:53:03 -0300, J. Pablo Fernández <[EMAIL PROTECTED]>   > escribió: > > > > > Hello, > > > I have an XML file that starts with: > > > > > > > > >   *-a > > > > > out of it, I'd like to extract something li

Re: save dictionary for later use?

2008-05-17 Thread castironpi
On May 16, 4:23 pm, Hans Nowak <[EMAIL PROTECTED]> wrote: > globalrev wrote: > > pickle.dumps(mg) > > pickle.load(mg) > > > 'dict' object has no attribute 'readline' > > dumps load(well i dont know but i get no complaint but running load > > generates that error) > > The 'loads' and 'dumps' methods

Re: how would you...?

2008-05-17 Thread Sanoski
The reason I ask about text files is the need to save the data locally, and have it stored in a way where backups can easily be made. Then if your computer crashes and you lose everything, but you have the data files it uses backed up, you can just download the program, extract the backed up data t

Re: Getting elements and text with lxml

2008-05-17 Thread John Machin
J. Pablo Fernández wrote: On May 17, 2:19 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: En Fri, 16 May 2008 18:53:03 -0300, J. Pablo Fernández <[EMAIL PROTECTED]> escribió: Hello, I have an XML file that starts with: *-a out of it, I'd like to extract something like (I'm just sh

Distributing applications that use 3rd party modules

2008-05-17 Thread eliben
Hello, I'm getting into Python now after years of Perl, and as part of my research I must understand how to do some common tasks I need. I have a bunch of Windows PCs at work to which I want to distribute an application I've developed on my PC. All these PCs have Python 2.5 installed. If my appl

Re: Classmethods are evil

2008-05-17 Thread Ivan Illarionov
On Sat, 17 May 2008 02:33:13 -0300, Gabriel Genellina wrote: > En Sat, 17 May 2008 01:01:50 -0300, Ivan Illarionov > <[EMAIL PROTECTED]> escribió: > >> After re-reading "Python is not Java" I finally came to conclusion that >> classmethods in Python are a very Bad Thing. >> >> I can't see any use

Re: morning in Python

2008-05-17 Thread castironpi
Full day later, I think it, to emphasize state, would prioritize context. The reason for the huge ramble was, believe it or not, namespace conflict... as though any other states around here might nose in. And thanks to 'inhahe' for coming back with the question. ...Which would explain next move

Re: [x for x in <> while <>]?

2008-05-17 Thread Ruediger
urikaluzhny wrote: > It seems that I rather frequently need a list or iterator of the form > [x for x in <> while <>] > And there is no one like this. > May be there is another short way to write it (not as a loop). Is > there? > Thanks I usually have the same problem and i came up with an soluti

Re: Instance of class "object"

2008-05-17 Thread castironpi
On May 17, 1:09 am, Carl Banks <[EMAIL PROTECTED]> wrote: > On May 16, 4:46 am, "甜瓜" <[EMAIL PROTECTED]> wrote: > > > Howdy, > > I wonder why below does not work. > > > a = object() > > a.b = 1# dynamic bind attribute failed... > > > To make it correct, we have to create a new class: >

Re: ?

2008-05-17 Thread Paul Hankin
On May 17, 11:08 am, Ruediger <[EMAIL PROTECTED]> wrote: > urikaluzhny wrote: > > It seems that I rather frequently need a list or iterator of the form > > [x for x in <> while <>] > > And there is no one like this. > > May be there is another short way to write it (not as a loop). Is > > there? >

Re: morning in Python

2008-05-17 Thread Ivan Illarionov
On Sat, 17 May 2008 02:57:08 -0700, castironpi wrote: > Full day later, I think it, to emphasize state, would prioritize > context. The reason for the huge ramble was, believe it or not, > namespace conflict... as though any other states around here might nose > in. And thanks to 'inhahe' for co

Help on thread pool

2008-05-17 Thread Alex
Hi all. In order to understand the concept of threading pool in python I'm working on a simple single-site web crawler. I would like to stop the program when the threading pool have downloaded all internal links from a web site, but now my program keep waiting forever even if there are no more lin

Install man-pages with distutils/setuptools

2008-05-17 Thread Hartmut Goebel
Hi, is there a standard way or a snippet for installing man-pages with python set.py install when using distutils or setuptools? I have not found one when searching the web. -- Schönen Gruß - Regards Hartmut Goebel Goebel Consult Spezialist für IT-Sicherheit in komplexen Umgebungen http:/

Re: Markov Analysis Help

2008-05-17 Thread bearophileHUGS
dave, few general comments to your code: - Instead of using a comment that explains the meaning of a function, add such things into docstrings. - Your names can be improved, instead of f you can use file_name or something like that, instead of convert_file you can use a name that denotes that the c

Re: Help on thread pool

2008-05-17 Thread Jeff
Your worker threads wait around forever because there is no place for them to exit. Queue.get() by default blocks until there is an item in the queue available. You can do something like this to cause the worker to quit when the queue is empty. Just make sure that you fill the queue before start

Re: Distributing applications that use 3rd party modules

2008-05-17 Thread Mike Driscoll
On May 17, 4:42 am, eliben <[EMAIL PROTECTED]> wrote: > Hello, > > I'm getting into Python now after years of Perl, and as part of my > research I must understand how to do some common tasks I need. > > I have a bunch of Windows PCs at work to which I want to distribute an > application I've develo

Re: default gettext localedir on windows

2008-05-17 Thread Thorsten Kampe
* ZeeGeek (Sun, 4 May 2008 10:56:52 -0700 (PDT)) > On May 5, 1:16 am, Thorsten Kampe <[EMAIL PROTECTED]> wrote: > > * ZeeGeek (Sun, 4 May 2008 08:59:05 -0700 (PDT)) > > > > > Hi, what's the default localedir for gettext module on windows? In > > > Linux, it's /usr/share/locale. Where should I put t

Re: help compiling Python on vs 2008!

2008-05-17 Thread Christian Heimes
inhahe schrieb: > what is going on here, and how do I compile these external libraries? I assume you are trying to compile Python 2.5 with VS 9.0. It's not supported. Some extensions don't compile under VS 9.0 Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Classmethods are evil

2008-05-17 Thread Hans Nowak
Ivan Illarionov wrote: After re-reading "Python is not Java" I finally came to conclusion that classmethods in Python are a very Bad Thing. I can't see any use-case of them that couldn't be re-written more clearly with methods of metaclass or plain functions. I agree with your sentiments, al

Re: Help on thread pool

2008-05-17 Thread Alex
On May 17, 2:23 pm, Jeff <[EMAIL PROTECTED]> wrote: > Your worker threads wait around forever because there is no place for > them to exit. Queue.get() by default blocks until there is an item in > the queue available. You can do something like this to cause the > worker to quit when the queue is

Re: Distributing applications that use 3rd party modules

2008-05-17 Thread John Machin
eliben wrote: Hello, I'm getting into Python now after years of Perl, and as part of my research I must understand how to do some common tasks I need. I have a bunch of Windows PCs at work to which I want to distribute an application I've developed on my PC. All these PCs have Python 2.5 instal

Re: "indexed properties"...

2008-05-17 Thread David C. Ullrich
On Sat, 17 May 2008 00:27:31 -0300, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: >(warning: it's a rather long message) > >En Fri, 16 May 2008 12:58:46 -0300, David C. Ullrich ><[EMAIL PROTECTED]> escribió: >> On Thu, 15 May 2008 10:59:41 -0300, "Gabriel Genellina" >> <[EMAIL PROTECTED]> wrote

comparison of files using set function

2008-05-17 Thread Beema shafreen
I have files with two column, column 1 is with id and column 2 is with data(sequence) My goal is to create a table in such a way, the column one of the table should have all the id from the files and next column will be have the respective seq of the file1 with correlation to the id and the third c

ANN: Pyrex 0.9.8.1

2008-05-17 Thread greg
Pyrex 0.9.8.1 is now available: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ Base classes no longer need to be specified in a forward declaration of an extension type, or in the implementation part of an extension type defined in a .pxd file. Also, I've come up with an even bette

Re: Distributing applications that use 3rd party modules

2008-05-17 Thread eliben
On May 17, 3:23 pm, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On May 17, 4:42 am, eliben <[EMAIL PROTECTED]> wrote: > > > > > Hello, > > > I'm getting into Python now after years of Perl, and as part of my > > research I must understand how to do some common tasks I need. > > > I have a bunch of W

Re: save dictionary for later use?

2008-05-17 Thread castironpi
On May 17, 3:52 am, castironpi <[EMAIL PROTECTED]> wrote: > On May 16, 4:23 pm, Hans Nowak <[EMAIL PROTECTED]> > wrote: > > > > > > > globalrev wrote: > > > pickle.dumps(mg) > > > pickle.load(mg) > > > > 'dict' object has no attribute 'readline' > > > dumps load(well i dont know but i get no compla

Re: Getting elements and text with lxml

2008-05-17 Thread Stefan Behnel
J. Pablo Fernández wrote: > I have an XML file that starts with: > > > > > *-a > > > out of it, I'd like to extract something like (I'm just showing one > structure, any structure as long as all data is there is fine): > > [("ofc", "*"), "-", ("rad", "a")] >>> root = etree.fromstring(

Re: Dbase / foxpro files

2008-05-17 Thread Johny
Thanks for your reply.Is it possible to delete a record by using the module? Thanks L> -- http://mail.python.org/mailman/listinfo/python-list

Re: Markov Analysis Help

2008-05-17 Thread dave
On 2008-05-17 06:01:01 -0600, [EMAIL PROTECTED] said: dave, few general comments to your code: - Instead of using a comment that explains the meaning of a function, add such things into docstrings. - Your names can be improved, instead of f you can use file_name or something like that, instead o

Re: numpy.frombuffer != unpack() ??

2008-05-17 Thread Gary Herron
Marlin Rowley wrote: Very cool. > > a = ([''],['']) a represents a tile with height of 2 and width of 4 with 4 bits/pixel for each color. > >>> b = numpy.frombuffer(''.join(sum(a,[])),dtype='S1') this seperates the stream into individual values - Check > >

Re: Markov Analysis Help

2008-05-17 Thread Terry Reedy
"dave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | bear, | thanks for the suggestions. I use IDLE to write the code and when it's | working I paste it over into a new window. Or you can just save code you want to keep to a new name. | To add doctests would I need to use a cer

Re: [PyOpenGL-Users] glGenLists returns 0

2008-05-17 Thread Gary Herron
Astan Chee wrote: Hi, Im trying to do glGenLists while a program is running and it keeps returning 0 and whenever I try to do a glCallList, it fails with a 'invalid value' error. Is this a known issue? why would my program give valid glGenList while being initialized but not while it is runnin

Re: Getting elements and text with lxml

2008-05-17 Thread J . Pablo Fernández
On May 17, 4:17 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > J. Pablo Fernández wrote: > > I have an XML file that starts with: > > > > > > > > >   *-a > > > > > out of it, I'd like to extract something like (I'm just showing one > > structure, any structure as long as all data is there is fi

rst2mediawiki?

2008-05-17 Thread Hartmut Goebel
Hello, I'm looking for a rst2mediawiki writer. Unfortunatly mediawiki is quite widespread, but I prefere to sty with rst. Any hint? -- Schönen Gruß - Regards Hartmut Goebel Goebel Consult Spezialist für IT-Sicherheit in komplexen Umgebungen http://www.goebel-consult.de -- http://mail.python.o

Re: Distributing applications that use 3rd party modules

2008-05-17 Thread Terry Reedy
"eliben" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Is there a simple way to find out which packages are used by my | script ? Ggrep for import statements? (But that only only gives direct dependencies.) Does py2exe have an option to output the list it collects?| I think peop

Re: Cookies and CookieJar

2008-05-17 Thread 7stud
On May 16, 9:21 am, Larry Bates <[EMAIL PROTECTED]> wrote: > I'm struggling with a project using mechanize and cookies to screen scape a > website.  The site requires a client created cookie for authentication.  Below > is the code I'm attempting to use with the traceback I'm getting: > >  >>> impo

smtplib "authentication required" error

2008-05-17 Thread cher
Hey, Don't know if you can help, but I'm trying to import archived messages from Thunderbird into my gmail account and keep getting these types of errors. I am using the GML program to help incorporate, but the SMTP server is not being recognized by gmail. Am I doing something wrong? Anyth

Re: Cookies and CookieJar

2008-05-17 Thread 7stud
Larry Bates wrote: > I'm struggling with a project using mechanize and cookies to screen scape a > website. The site requires a client created cookie for authentication. Are you sure that is correct? As far as I know, the usual course of events is for a site to set a cookie header in the respons

Re: Install man-pages with distutils/setuptools

2008-05-17 Thread Sebastian 'lunar' Wiesner
[ Hartmut Goebel <[EMAIL PROTECTED]> ] > Hi, > > is there a standard way or a snippet for installing man-pages with > >python set.py install > > when using distutils or setuptools? No, not even setuptools provides a standard way for man pages. -- Freedom is always the freedom of dissenter

Re: Distributing applications that use 3rd party modules

2008-05-17 Thread eliben
On May 17, 8:54 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > "eliben" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > | Is there a simple way to find out which packages are used by my > | script ? > > Ggrep for import statements? This isn't very comprehensive :-) > (But that

multiple databases, what's the best interface ?

2008-05-17 Thread Stef Mientki
hello, I need to switch fluently between 2 or 3 types of dbases: SQLite, Sybase ( and in the future MS SQL-server). I need both closed application and general purpose database manager, which should run on different platforms (windows, windows mobile, not web based). I would like to write the

Re: Python-list Digest, Vol 56, Issue 311

2008-05-17 Thread inhahe
didn't mean to re-post the whole digest. i forgot to clip what was after this message. On Sat, May 17, 2008 at 2:59 PM, inhahe <[EMAIL PROTECTED]> wrote: > i just installed visual studio 8 and tried to compile again, and I got the > same exact problem. > > > > >> >> From: Christian Heimes <[EMAIL

Re: help compiling Python on vs 2008!

2008-05-17 Thread inhahe
"Christian Heimes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > inhahe schrieb: >> what is going on here, and how do I compile these external libraries? > > I assume you are trying to compile Python 2.5 with VS 9.0. It's not > supported. Some extensions don't compile under VS 9.0

Re: working with images (PIL ?)

2008-05-17 Thread Scott David Daniels
Poppy wrote: I need to write a program to examine images (JPG) and determine how much area is whitespace. We need to throw a returned image out if too much of it is whitespace from the dataset we're working with. I've been examining the Python Image Library and can not determine if it offers th

Re: help compiling Python on vs 2008!

2008-05-17 Thread Matthieu Brucher
Hi, I did not manage to build extension with distutils with Python compiled with VS different than 2003. The need for 2003 was hard-coded in distutils. You can try building extensions with VS2008 with Scons. This is what I do a lot, and everything works fine as long as the interface does not use s

waiting on an event blocks all signals

2008-05-17 Thread alan
This ignores CTRL-C on every platform I've tested: python -c "import threading; threading.Event().wait()" ^C^C^C^C It looks to me like all signals are masked before entering wait(). Can someone familiar with the internals explain and/or justify this behavior? Thanks, -Alan -- http://mail.python.

Re: waiting on an event blocks all signals

2008-05-17 Thread John Schroeder
^C only kills the main thread. Use Control-Break to kill all threads. On Sat, May 17, 2008 at 12:32 PM, alan <[EMAIL PROTECTED]> wrote: > This ignores CTRL-C on every platform I've tested: > > python -c "import threading; threading.Event().wait()" > ^C^C^C^C > > It looks to me like all signals a

Re: waiting on an event blocks all signals

2008-05-17 Thread Jean-Paul Calderone
On Sat, 17 May 2008 12:49:54 -0700, John Schroeder <[EMAIL PROTECTED]> wrote: On Sat, May 17, 2008 at 12:32 PM, alan <[EMAIL PROTECTED]> wrote: This ignores CTRL-C on every platform I've tested: python -c "import threading; threading.Event().wait()" ^C^C^C^C It looks to me like all signals ar

Re: Markov Analysis Help

2008-05-17 Thread bearophileHUGS
dave: >Can you have doctests on random functions? Yes, you can add doctests to methods, functions, classes, module docstrings, and in external text files. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: waiting on an event blocks all signals

2008-05-17 Thread alan grow
On Sat, May 17, 2008 at 2:49 PM, John Schroeder <[EMAIL PROTECTED]> wrote: > ^C only kills the main thread. Use Control-Break to kill all threads. >> >> python -c "import threading; threading.Event().wait()" >> ^C^C^C^C There's a single main thread here though. Or am I missing something? -- http:

Re: multiple databases, what's the best interface ?

2008-05-17 Thread python
Stef, Take a look at what the dabo team has put together. http://dabodev.com Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: waiting on an event blocks all signals

2008-05-17 Thread alan
On May 17, 3:06 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Sat, 17 May 2008 12:49:54 -0700, John Schroeder <[EMAIL PROTECTED]> wrote: > >On Sat, May 17, 2008 at 12:32 PM, alan <[EMAIL PROTECTED]> wrote: > > >> This ignores CTRL-C on every platform I've tested: > > >> python -c "import

how to use the transpose function in numpy?

2008-05-17 Thread Marlin Rowley
All: Say I have a series of arrays arranged like so: [[[0,1,2,3] [4,5,6,7] [8,9,10,11] [12,13,14,15]] [[16,17,18,19] [20,21,22,23] [24,25,26,27] [28,29,30,31]]] Now if I do this: transpose((2,0,1)), I get this: [[[0,4,8,12] [16,20,24,28]] [[1,5,9,13] [17,21,25,29]] [[2,6,10,14][18,22,26,3

Re: help compiling Python on vs 2008!

2008-05-17 Thread Christian Heimes
Matthieu Brucher schrieb: > Hi, > > I did not manage to build extension with distutils with Python compiled with > VS different than 2003. The need for 2003 was hard-coded in distutils. > You can try building extensions with VS2008 with Scons. This is what I do a > lot, and everything works fine a

Re: help compiling Python on vs 2008!

2008-05-17 Thread Matthieu Brucher
2008/5/17 Christian Heimes <[EMAIL PROTECTED]>: > Matthieu Brucher schrieb: > > Hi, > > > > I did not manage to build extension with distutils with Python compiled > with > > VS different than 2003. The need for 2003 was hard-coded in distutils. > > You can try building extensions with VS2008 with

RE: numpy.frombuffer != unpack() ??

2008-05-17 Thread Marlin Rowley
Actually in my traversal of the never-ending maze of understanding arrays in python, I stumbled that the data in the wrong sequence. Let's get back to this transpose() deal, say we have these values as integers (representing rgba again): [[[0,1,2,3][4,5,6,7][8,9,10,11][12,13,14,15]] [[16,17,18

Re: help compiling Python on vs 2008!

2008-05-17 Thread Christian Heimes
Matthieu Brucher schrieb: > Even if you compile Python 2.5 with VS2008, VS2003 is used for the > extensions, AFAIR. I didn't try Python 2.6 because I only have Visual C++ > Express 2008. You can compile 2.6 and 3.0 with the free Express Edition just fine. Christian -- http://mail.python.org/mail

Re: how to use the transpose function in numpy?

2008-05-17 Thread Robert Kern
Ask numpy questions on the numpy mailing list: http://www.scipy.org/Mailing_Lists -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco

Using Python for programming algorithms

2008-05-17 Thread Vicent Giner
Hello. I am new to Python. It seems a very interesting language to me. Its simplicity is very attractive. However, it is usually said that Python is not a compiled but interpreted programming language —I mean, it is not like C, in that sense. I am working on my PhD Thesis, which is about Operati

Re: help compiling Python on vs 2008!

2008-05-17 Thread Colin J. Williams
inhahe wrote: "Christian Heimes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] inhahe schrieb: what is going on here, and how do I compile these external libraries? I assume you are trying to compile Python 2.5 with VS 9.0. It's not supported. Some extensions don't compile under

Re: Using Python for programming algorithms

2008-05-17 Thread Colin J. Williams
Vicent Giner wrote: Hello. I am new to Python. It seems a very interesting language to me. Its simplicity is very attractive. However, it is usually said that Python is not a compiled but interpreted programming language —I mean, it is not like C, in that sense. I am working on my PhD Thesis,

Re: Using Python for programming algorithms

2008-05-17 Thread castironpi
On May 17, 5:32 pm, Vicent Giner <[EMAIL PROTECTED]> wrote: > Hello. > > I am new to Python. It seems a very interesting language to me. Its > simplicity is very attractive. > > However, it is usually said that Python is not a compiled but > interpreted programming language —I mean, it is not like

Re: numpy.frombuffer != unpack() ??

2008-05-17 Thread Gary Herron
Marlin Rowley wrote: Actually in my traversal of the never-ending maze of understanding arrays in python, I stumbled that the data in the wrong sequence. Let's get back to this transpose() deal, say we have these values as integers (representing rgba again): [[[0,1,2,3] [4,5,6,7] [8,9,10,11]

Re: how would you...?

2008-05-17 Thread Mensanator
On May 17, 4:02�am, Sanoski <[EMAIL PROTECTED]> wrote: > The reason I ask about text files is the need to save the data > locally, and have it stored in a way where backups can easily > be made. Sure, you can always do that if you want. But if your target is SQLlite or MS-Access, those are files a

Re: Using Python for programming algorithms

2008-05-17 Thread Vicent Giner
> > The usual answer is that development > time is more important than running time. OK, thank you for your answer. I just wanted to check if it was a naive idea trying to use Python instead of C in order to implement my own algorithms, and other research-related code. > > Since you are likely

Re: write to specific line in file?

2008-05-17 Thread castironpi
On May 16, 5:57 pm, castironpi <[EMAIL PROTECTED]> wrote: > On May 16, 5:22 pm, castironpi <[EMAIL PROTECTED]> wrote: > > > > > > > On May 16, 2:25 pm, 7stud <[EMAIL PROTECTED]> wrote: > > > > globalrev wrote: > > > > i ahve a program that takes certain textsnippets out of one file and > > > > inse

Re: comparison of files using set function

2008-05-17 Thread Kam-Hung Soh
On Sun, 18 May 2008 00:47:55 +1000, Beema shafreen <[EMAIL PROTECTED]> wrote: I have files with two column, column 1 is with id and column 2 is with data(sequence) My goal is to create a table in such a way, the column one of the table should have all the id from the files and next column will

Re: multiple databases, what's the best interface ?

2008-05-17 Thread alex23
On May 18, 4:54 am, Stef Mientki <[EMAIL PROTECTED]> wrote: > What's the best interface so I can use the same program for all databases, > and just have to change the database name, if I want to use another > database ? I really like sqlalchemy: http://www.sqlalchemy.org/features.html - alex23 --

Re: addendum Re: working with images (PIL ?)

2008-05-17 Thread Ken Starks
As others have said, PIL has the 'histogram' method to do most of the work. However, as histogram works on each band separately, you have a bit of preliminary programming first to combine them. The ImageChops darker method is one easy-to-understand way (done twice), but there are lots of alterna

Re: Malloc error

2008-05-17 Thread mankoff
On May 16, 9:16 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 16 May 2008 16:08:41 -0300, mankoff <[EMAIL PROTECTED]> escribió: > > > I'm brand spanking new to Python. Never coded in it, but I'm > > comfortable coding in general in other languages. > > Welcome...! > > > I'm Trying to

Re: Using Python for programming algorithms

2008-05-17 Thread sturlamolden
On May 18, 12:32 am, Vicent Giner <[EMAIL PROTECTED]> wrote: > * As far as I understand, the fact that Python is not a compiled > language makes it slower than C, when performing huge amounts of > computations within an algorithm or program. First of all: whatever you do, use NumPy for all numeri

Re: smtplib "authentication required" error

2008-05-17 Thread 7stud
On May 17, 12:18 pm, cher <[EMAIL PROTECTED]> wrote: > Hey, > > Don't know if you can help, but I'm trying to import archived messages > from Thunderbird into my gmail account and keep getting these types of > errors.  I am using the GML program to help incorporate, but the SMTP > server is not bei

RE: numpy.frombuffer != unpack() ??

2008-05-17 Thread Marlin Rowley
Gary, That works. And it's better than my solution: #a = numpy.rollaxis(a,2,0) #a = numpy.rollaxis(a,0,1) #a = numpy.rollaxis(a,1,0) Thanks! -M > Date: Sat, 17 May 2008 17:18:39 -0700> From: [EMAIL PROTECTED]> To: [EMAIL > PROTECTED]> CC: python-list@python.org> Subject: Re: numpy.from

Re: morning in Python

2008-05-17 Thread castironpi
On May 17, 5:35 am, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > On Sat, 17 May 2008 02:57:08 -0700, castironpi wrote: > > Full day later, I think it, to emphasize state, would prioritize > > context.  The reason for the huge ramble was, believe it or not, > > namespace conflict... as though any ot

r' question

2008-05-17 Thread Dick Moores
Win XP, Python 2.5.1 I have a text file of phone numbers, which I'd like to search with a regex. This script works fine: import re fstr = "\sjoe\s" regex = "^.*" + fstr + ".*$" p = re.compile(regex, re.I) f = open('phone.txt', 'r') for line in f.readlines():     if p.search(line):     print

Shelve or pickle module

2008-05-17 Thread Guillaume Bog
Hello, I read and re-read "Python in a Nutshell" written by Alex Martelli, who knows what he is talking about. I'm a bit new to python and I'm going to start doing persistence side on a project. Martelli's book seems to tell me that I should use shelve module, but any code I browsed is using pickl

Re: Using Python for programming algorithms

2008-05-17 Thread Henrique Dante de Almeida
On May 17, 7:32 pm, Vicent Giner <[EMAIL PROTECTED]> wrote: > Hello. > > I am new to Python. It seems a very interesting language to me. Its > simplicity is very attractive. > > However, it is usually said that Python is not a compiled but > interpreted programming language —I mean, it is not like

Re: Using Python for programming algorithms

2008-05-17 Thread inhahe
what little I know: The numbers I heard are that Python is 10-100 times slower than C. So use Python if you can wait 10-100 times longer. Although it won't really be that slow using numpy and/or psyco. Python seems to have a really extensive reportoire of modules available for it. Although

Re: write to specific line in file?

2008-05-17 Thread Gabriel Genellina
En Sat, 17 May 2008 21:58:50 -0300, castironpi <[EMAIL PROTECTED]> escribió: > I am still interested in this one, but doubt if anyone still reading. I've not filtered you out *yet* - but that may happen very soon. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: morning in Python

2008-05-17 Thread castironpi
On May 17, 9:22 pm, castironpi <[EMAIL PROTECTED]> wrote: > On May 17, 5:35 am, Ivan Illarionov <[EMAIL PROTECTED]> wrote: > > > > > > > On Sat, 17 May 2008 02:57:08 -0700, castironpi wrote: > > > Full day later, I think it, to emphasize state, would prioritize > > > context.  The reason for the hu

Re: Arch problems--how do I build PIL to be 64 bit so it plays nicely on OS X?

2008-05-17 Thread Graham Dumpleton
On May 17, 6:16 am, lampshade <[EMAIL PROTECTED]> wrote: > Hello, > > I'm using python + django to do some web design and I would really > like to use the python image library as part of this.  There seems to > be a problem, however, with apache andmod_pythonbeing 64 bit while > my python image lib

Re: can't delete from a dictionary in a loop

2008-05-17 Thread Scott David Daniels
Eduardo O. Padoan wrote: On Fri, May 16, 2008 at 6:40 PM, Gary Herron <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: On 16 mai, 23:28, Hans Nowak <[EMAIL PROTECTED]> wrote: Dan Upton wrote: <> ...to solve the immediate problem: for pid in procs_dict.keys(): And then, in Python3, k

Re: help compiling Python on vs 2008!

2008-05-17 Thread inhahe
VS2005 seems to be officially supported. Here's part of the readme file in the PCBuild8 directory in the Python 2.5 source. " Building Python using VC++ 8.0 - This directory is used to build Python for Win32 platforms, e.g. Windows 95, 98 and NT. It requires

Re: usage of python

2008-05-17 Thread Aahz
In article <[EMAIL PROTECTED]>, Rajarshi <[EMAIL PROTECTED]> wrote: > >Is there any list with people/groups/companies using Python for >impressive things? > >Any pointers would be appreciated And one more: http://www.pythonology.com/ -- Aahz ([EMAIL PROTECTED]) <*> http://www.

Re: [off-topic] Usenet

2008-05-17 Thread Aahz
In article <[EMAIL PROTECTED]>, hdante <[EMAIL PROTECTED]> wrote: > >How can I access Usenet without using Google Groups ? (my ISP doesn't >have a NNTP server). Do you recommend doing so ? If you'd like an ISP with a decent news server, I highly recommend panix.com >What's your prefered news rea

Re: Sanitised Newsgroup Feeds?

2008-05-17 Thread Aahz
In article <[EMAIL PROTECTED]>, Paddy <[EMAIL PROTECTED]> wrote: > >Does anyone do a sanitised newsgroup feed? Something like what mail >filters do for email? My ISP (panix.com) is one of the remaining few that still honors netnews cancels, which results in my seeing a cleaner feed than most peop

Re: Shelve or pickle module

2008-05-17 Thread Gabriel Genellina
En Sun, 18 May 2008 00:14:19 -0300, Guillaume Bog <[EMAIL PROTECTED]> escribió: > I read and re-read "Python in a Nutshell" written by Alex Martelli, > who knows what he is talking about. I'm a bit new to python and I'm > going to start doing persistence side on a project. Martelli's book > seems

Re: usage of python

2008-05-17 Thread Grant Edwards
On 2008-05-13, Rajarshi <[EMAIL PROTECTED]> wrote: > Hi, I teach an introductory programming course in Python. As part of > the introduction I'd like to highlight the usage of Python in > industry. The idea is to show that there are big players using Python > for a variety of tasks. Given that the

Python library for clustering from distance vector

2008-05-17 Thread Sengly
Dear all, I am looking for a python library which can cluster similar objects into their respective groups given their similarity score of each two of them. I have searched the group but I couldn't find any helpful information yet. Any suggestion is appreciated. Also, if you know any specific gro

Re: help compiling Python on vs 2008!

2008-05-17 Thread inhahe
"inhahe" <[EMAIL PROTECTED]> wrote in message news:... > VS2005 seems to be officially supported. Here's part of the readme file > in the PCBuild8 directory in the Python 2.5 source. > > " > Building Python using VC++ 8.0 > - > This directory is used to build P

Re: r' question

2008-05-17 Thread Gabriel Genellina
En Sat, 17 May 2008 23:37:16 -0300, Dick Moores <[EMAIL PROTECTED]> escribió: > I have a text file of phone numbers, which I'd like to search with a regex. > > fstr = "\sjoe\s" > regex = "^.*" + fstr + ".*$" > > fstr = "\sjoe\s" > regex = "r'^.*" + fstr + ".*$'" The r"..." is a signal to the pars

Re: r' question

2008-05-17 Thread Dick Moores
At 10:17 PM 5/17/2008, Gabriel Genellina wrote: En Sat, 17 May 2008 23:37:16 -0300, Dick Moores <[EMAIL PROTECTED]> escribió: > I have a text file of phone numbers, which I'd like to search with a regex. > > fstr = "\sjoe\s" > regex = "^.*" + fstr + ".*$" > > fstr = "\sjoe\s" > regex = "r'^.*" +

Re: Python and Flaming Thunder

2008-05-17 Thread Lie
On May 16, 3:58 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On 15 mai, 19:30, Lie <[EMAIL PROTECTED]> wrote: > > > > > On May 15, 4:08 am, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > On 14 mai, 08:08, Lie <[EMAIL PROTECTED]> wrote: > > > > > On May 14, 12:51 pm, Lie <[EMAIL

Re: help compiling Python on vs 2008!

2008-05-17 Thread Martin v. Löwis
> VS2005 seems to be officially supported. That impression is incorrect. There is the PCbuild8 directory, but it isn't maintained or tested in a systematic way. Users of it may need to adjust it before it can do something useful. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-l

Re: "indexed properties"...

2008-05-17 Thread pataphor
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > >> window.pos = (x,y) > >> > >> seems more natural than > >> > >> window.SetPos(x,y); Yes, and to assign a row in a matrix I'd also like to use either tuples or lists on the right side. > def __add__(self, other): > return