Re: While we're talking about annoyances

2007-05-01 Thread Arnaud Delobelle
On Apr 30, 3:51 pm, [EMAIL PROTECTED] (Alex Martelli) wrote: > Michael Hoffman <[EMAIL PROTECTED]> wrote: > >... > > > >> Well, counting the index() function that is called in both cases, the > > >> original rank() had one sort, but my version has two sorts. > > > > That doesn't affet the big-O

Python+Pygame+PyopenGL all in one package?

2007-05-01 Thread shirish
Hi all, Is it possible to have Python+Pygame+PyOpenGL in one compact package so people can play the games released at pyweek.org . I have been having a hard time getting the whole thing on windows as well as linux (Ubuntu 7.04) . Strangely, my pleas for the same on pyopengl have gone unanswe

Log-in to forums (using cookielib)?

2007-05-01 Thread Olivier Oost
Hi, I need to login to a online forum, like a phpbb forum, and leave a message there. I figured I need to use cookielib, but the documentation of cookielib is not very clear to me. I tried to just copy/paste all the cookies from FireFox into my Python-program, like this: import cookielib, urll

playing sound in mac osx

2007-05-01 Thread tooru honda
Hi, I am a newbie to mac and python. Is there an easy way to play wav or mp3 sound file ? I used to use winsound module before switching to mac, but that only works for windows. Thanks Tooru P.S. I am using Mac OSX 10.4.8 and Python 2.5 -- http://mail.python.org/mailman/listinfo/python-list

Re: playing sound in mac osx

2007-05-01 Thread Diez B. Roggisch
tooru honda schrieb: > Hi, > > I am a newbie to mac and python. > > Is there an easy way to play wav or mp3 sound file ? I used to use > winsound module before switching to mac, but that only works for windows. pygame might help. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Qustion about struct.unpack

2007-05-01 Thread eC
On Apr 30, 9:41 am, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Mon, 30 Apr 2007 00:45:22 -0700, OhKyu Yoon wrote: > > Hi! > > I have a really long binary file that I want to read. > > The way I am doing it now is: > > > for i in xrange(N): # N is about 10,000,000 > > time = struct.unpack(

Re: Log-in to forums (using cookielib)?

2007-05-01 Thread Gabriel Genellina
En Tue, 01 May 2007 04:44:57 -0300, Olivier Oost <[EMAIL PROTECTED]> escribió: > I need to login to a online forum, like a phpbb forum, and leave a > message there. I figured I need to use cookielib, but the documentation > of cookielib is not very clear to me. > Can someone please tell me h

Re: Log-in to forums (using cookielib)?

2007-05-01 Thread Olivier Oost
Gabriel Genellina wrote: > En Tue, 01 May 2007 04:44:57 -0300, Olivier Oost <[EMAIL PROTECTED]> > escribió: > >> I need to login to a online forum, like a phpbb forum, and leave a >> message there. I figured I need to use cookielib, but the >> documentation of cookielib is not very clear to me.

Re: playing sound in mac osx

2007-05-01 Thread kaens
Is there really no cross-platform audio capability in the standard library? On 5/1/07, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > tooru honda schrieb: > > Hi, > > > > I am a newbie to mac and python. > > > > Is there an easy way to play wav or mp3 sound file ? I used to use > > winsound module

Re: Master's Thesis Help Needed

2007-05-01 Thread kaens
I'll check it out. I'm running kubuntu (really, should work for any linux unless you're giving out .deb files) On 29 Apr 2007 18:53:51 -0700, RobJ <[EMAIL PROTECTED]> wrote: > Awhile ago I asked for your help in getting some ideas about setting > up an on-line course to learn how to use Python web

Re: Log-in to forums (using cookielib)?

2007-05-01 Thread Gabriel Genellina
En Tue, 01 May 2007 05:39:14 -0300, Olivier Oost <[EMAIL PROTECTED]> escribió: > Gabriel Genellina wrote: >> En Tue, 01 May 2007 04:44:57 -0300, Olivier Oost <[EMAIL PROTECTED]> >> escribió: >> >>> Can someone please tell me how I should log-in and leave a message on >>> the board? >> Sure.

Re: Qustion about struct.unpack

2007-05-01 Thread Gabriel Genellina
En Tue, 01 May 2007 05:22:49 -0300, eC <[EMAIL PROTECTED]> escribió: > On Apr 30, 9:41 am, Steven D'Aprano <[EMAIL PROTECTED]> > wrote: >> On Mon, 30 Apr 2007 00:45:22 -0700, OhKyu Yoon wrote: >> > I have a really long binary file that I want to read. >> > The way I am doing it now is: >> >> > fo

Re: logging SMTPHandler and Authentication

2007-05-01 Thread Vinay Sajip
> http://groups.google.com/group/comp.lang.python/browse_frm/thread/ef8... That fairly old thread suggests that someone provide a patch, which hasn't happened. Sorry I missed that thread - your requirement is a reasonable one to be dealt with by the core. So I will look to implement this functiona

Error in python.org homepage.

2007-05-01 Thread alessiogiovanni . baroni
Hi to all!!! I sended an email to webmaster at python dot org, but was blocked... why? In the homepage of python.org there is an error: the link that point to source distribution is not updated to Python 2.5.1. -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite for mac?

2007-05-01 Thread Daniel Nogradi
> Does sqlite come in a mac version? > The interface (pysqlite) is part of the python 2.5 standard library but you need to install sqlite itself separately (as far as I remember) from www.sqlite.org Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: logging SMTPHandler and Authentication

2007-05-01 Thread Vinay Sajip
On May 1, 1:08 am, [EMAIL PROTECTED] wrote: > I'm new to Python, but I've been thrown into coding a pretty > complicated regression testing script. I need to email the log of the > daily test to the code owners. I thought I could use SMTPHandler for > this, but our email system requires authentic

Re: python TK scrollbar problem

2007-05-01 Thread Ray
James Stroud wrote: > > You are not binding to the Scrollbar.set() method nor are you assigning > the Scrollbar a command. You should try to emulate this: > > http://www.pythonware.com/library/tkinter/introduction/x7583-patterns.htm > > You need to also determine exactly what it is you want to

Re: Python-URL! - weekly Python news and links (Apr 30)

2007-05-01 Thread Neil Hodgson
Cameron Laird: > ... but the *references* in that object are unlikely to be > meaningful on the second machine (or, in many cases, on the > original machine, if at a sufficiently later time). The marshaling of the object is responsible for persisting any contained references in a format that

Why are functions atomic?

2007-05-01 Thread Michael
Why are functions atomic? (I.e. they are not copied.) For example, I would like to make a copy of a function so I can change the default values: >>> from copy import copy >>> f = lambda x: x >>> f.func_defaults = (1,) >>> g = copy(f) >>> g.func_defaults = (2,) >>> f(),g() (2, 2) I would like th

Problems with time

2007-05-01 Thread loial
I am running on an AIX system with time zone set to BST If I run the following, I get the GMT time, i.e an hour less than the correct time. How can I get the correct time now = time() timeProcessed = strftime("%H:%M",gmtime(now)) -- http://mail.python.org/mailman/listinfo/pyth

Re: zipfile: grabbing whole directories

2007-05-01 Thread Daniel Nogradi
> The built in zipfile.write doesn't seem to like taking a directory instead > of a filename. > > for example: > for each in listofdir: > archive.write(each) > > blows up when one of the items listed in listofdir is a subdirectory. > > File "/usr/local/lib/python2.4/zipfile.py",

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-01 Thread Bob Phillips
You bottom posters really are a bunch of supercilious, self-righteous bigots. Personally, I find bottom-posting like reading a book backwards ... it doesn't work for me. And regardless of his response, Mr Bruney IS an MVP, he is clearly knowledgeable in his subject, and his book is well enough

Re: Problems with time

2007-05-01 Thread Diez B. Roggisch
loial schrieb: > I am running on an AIX system with time zone set to BST > > If I run the following, I get the GMT time, i.e an hour less than the > correct time. > > How can I get the correct time > > now = time() > > timeProcessed = strftime("%H:%M",gmtime(now)) > localtime?

Re: Launching an independent Python program in a cross-platform way (including mac)

2007-05-01 Thread André
My apologies about the last post; I posted my "test" code by mistake, with hard-coded path information. Here's for future reference something that is general and should work cross-platform. André def exec_external(code=None, path=None): """execute code in an external process currently wo

PyGEP: Gene Expression Programming for Python

2007-05-01 Thread Candida Ferreira
Dear All, There's another open source GEP library released under the GNU. Its owner is Ryan O'Neil, a graduate student from George Mason University. In his words, "PyGEP is a simple library suitable for academic study of Gene Expression Programming in Python 2.5, aiming for ease of use and rapi

Antigen Notification: Antigen found a message matching a filter

2007-05-01 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 44_ Issue 7" Filter name: "KEYWORD= spam: graduate" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Re: Python-URL! - weekly Python news and links (Apr 30)

2007-05-01 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Roger Upole <[EMAIL PROTECTED]> wrote: > >"Cameron Laird" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] >> In article <[EMAIL PROTECTED]>, >> Roger Upole <[EMAIL PROTECTED]> wrote: >>>Cameron Laird wrote: QOTW: "That is just as feasible as passin

RE: re-importing modules

2007-05-01 Thread Hamilton, William
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of John Nagle > Sent: Monday, April 30, 2007 7:32 PM > To: python-list@python.org > Subject: Re: re-importing modules > > [EMAIL PROTECTED] wrote: > > >>In addition to the warning that reload() do

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-01 Thread Sebastian Kaliszewski
Bob Phillips wrote: > You bottom posters really are a bunch of supercilious, self-righteous > bigots. Whatever. When reading answers to some statements normal people like first to see the statement then the response, not the other way around. Just because you're using broken tool (Outlook Expre

Re: Store variable name in another variable

2007-05-01 Thread loial
OK, I have it working with dictionaries. However I have another scenerio : I am reading a file containing records like the following : .. .. I need to substitute MYVARIABLE with the current value of MYVARIABLE in my python script and write the file out again. The file may contain many more

Comparing bitmap images for differences?

2007-05-01 Thread [EMAIL PROTECTED]
I know it's a long shot but does anyone have any pointers to generic algorithms - or, even better, Python code - for comparing images and computing a value for the "difference" between them? What I want to do is to compare two bitmap images (taken from a webcam, so I'll likely be using PIL) and ge

RE: Dict Copy & Compare

2007-05-01 Thread Hamilton, William
> -Original Message- > From: Steven D'Aprano > Sent: Monday, April 30, 2007 10:14 PM > To: python-list@python.org > Subject: RE: Dict Copy & Compare > > On Mon, 30 Apr 2007 12:50:58 -0500, Hamilton, William wrote: > > >> On quick question, how can I order a dict by the 'values' (not keys

Re: Store variable name in another variable

2007-05-01 Thread 7stud
On May 1, 6:43 am, loial <[EMAIL PROTECTED]> wrote: > OK, I have it working with dictionaries. > > However I have another scenerio : > > I am reading a file containing records like the following : > > > > > .. > .. > > I need to substitute MYVARIABLE with the current value of MYVARIABLE > in my

Re: Want to build a binary header block

2007-05-01 Thread Larry Bates
Bob Greschke wrote: > This is the idea > >Block = pack("240s", "") >Block[0:4] = pack(">H", W) >Block[4:8] = pack(">H", X) >Block[8:12] = pack(">B", Y) >Block[12:16] = pack(">H", Z)) > > but, of course, Block, a str, can't be sliced. The real use of this is a > bit more comp

Antigen Notification: Antigen found a message matching a filter

2007-05-01 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 44_ Issue 8" Filter name: "KEYWORD= spam: graduate" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Re: Why are functions atomic?

2007-05-01 Thread Laurent Pointal
Michael wrote: > Why are functions atomic? (I.e. they are not copied.) > > For example, I would like to make a copy of a function so I can change > the default values: > from copy import copy f = lambda x: x f.func_defaults = (1,) g = copy(f) g.func_defaults = (2,)

Re: Why are functions atomic?

2007-05-01 Thread Laurent Pointal
Laurent Pointal wrote: > http://docs.python.org/lib/partial-objects.html OOps http://docs.python.org/lib/module-functools.html -- http://mail.python.org/mailman/listinfo/python-list

scaling

2007-05-01 Thread Ashok
hi, IDL language contains a function called BYTSCL to scale all values of Array that lie in the range (Min £ x £ Max) into the range (0 £ x £ Top). Is there a similar function available in python? I need this to scale the pixel values of an image using PIL. thanks in advance for any help AGK

Re: Why are functions atomic?

2007-05-01 Thread 7stud
On May 1, 5:06 am, Michael <[EMAIL PROTECTED]> wrote: > Why are functions atomic? (I.e. they are not copied.) > > For example, I would like to make a copy of a function so I can change > the default values: > > >>> from copy import copy > >>> f = lambda x: x > >>> f.func_defaults = (1,) > >>> g =

Re: Comparing bitmap images for differences?

2007-05-01 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > I know it's a long shot but does anyone have any pointers to generic > algorithms - or, even better, Python code - for comparing images and > computing a value for the "difference" between them? > > What I want to do is to compare two bitmap images (taken from a > webc

Re: Store variable name in another variable

2007-05-01 Thread Diez B. Roggisch
loial schrieb: > OK, I have it working with dictionaries. > > However I have another scenerio : > > I am reading a file containing records like the following : > > > > > .. > .. > > > I need to substitute MYVARIABLE with the current value of MYVARIABLE > in my python script and write the fi

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-01 Thread David
I am not going to join the argument, except to say that as you can see, I top post. In outlook express, you can see the messages as a thread, so you read the initial message, come to the reply and you read the response without having to scroll. Bottom posting would be fine if the previous messa

Re: re-importing modules

2007-05-01 Thread [EMAIL PROTECTED]
John Nagle wrote: > Steven D'Aprano wrote: > > I'd hate for reload to disappear, it is great for interactive > > development/debugging, at least under some circumstances. (If you have > > complex and tangled class hierarchies, it might not be powerful enough.) > > > > As for the semantics being awf

Re: Restricting the alphabet of a string

2007-05-01 Thread Nathan Harmston
Thanks, I might just move my trinary string (if I get that far) to be encoded as 0, 1, 2, thanks for your help. On 30 Apr 2007 11:14:10 -0700, John Machin <[EMAIL PROTECTED]> wrote: > On Apr 30, 9:53 pm, "Nathan Harmston" <[EMAIL PROTECTED]> > wrote: > > Hi, > > > > I ve being thinking about pla

Re: Why are functions atomic?

2007-05-01 Thread Duncan Booth
7stud <[EMAIL PROTECTED]> wrote: > Does deepcopy work? It doesn't copy a function. The easiest way to make a modified copy of a function is to use the 'new' module. >>> def f(x=2): print "x=", x >>> g = new.function(f.func_code, f.func_globals, 'g', (3,), f.func_closure) >>> g() x= 3 >>> f()

Re: Why are functions atomic?

2007-05-01 Thread Chris Mellon
On 1 May 2007 15:17:48 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote: > 7stud <[EMAIL PROTECTED]> wrote: > > > Does deepcopy work? > > It doesn't copy a function. > > The easiest way to make a modified copy of a function is to use the 'new' > module. > > >>> def f(x=2): print "x=", x > > >>> g = new.

Antigen Notification: Antigen found a message matching a filter

2007-05-01 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 44_ Issue 9" Filter name: "KEYWORD= spam: graduate" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Re: Qustion about struct.unpack

2007-05-01 Thread OhKyu Yoon
Wow, thank you all! "Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > En Tue, 01 May 2007 05:22:49 -0300, eC <[EMAIL PROTECTED]> escribió: > >> On Apr 30, 9:41 am, Steven D'Aprano <[EMAIL PROTECTED]> >> wrote: >>> On Mon, 30 Apr 2007 00:45:22 -0700, OhKyu Yoon wrot

Re: re-importing modules

2007-05-01 Thread Chris Mellon
On 5/1/07, John Nagle <[EMAIL PROTECTED]> wrote: > Steven D'Aprano wrote: > > I'd hate for reload to disappear, it is great for interactive > > development/debugging, at least under some circumstances. (If you have > > complex and tangled class hierarchies, it might not be powerful enough.) > > > >

Lisp-like macros in Python?

2007-05-01 Thread sturlamolden
Hello The Lisp crowd always brags about their magical macros. I was wondering if it is possible to emulate some of the functionality in Python using a function decorator that evals Python code in the stack frame of the caller. The macro would then return a Python expression as a string. Granted,

SWIG, STL & pickle

2007-05-01 Thread Ondrej Marsalek
hello, i have the following problem/question: i have a c++ class i would like to wrap using swig, easy so far. i want to be able to pickle it as well and i understand that i need to implement the setstate and getstate methods to be able to do that. now the tricky part - my c++ class uses stl vect

SilverLight, a new way for Python?

2007-05-01 Thread Michel Claveau
Hi! SilverLight ("MS flash killer"), is a plug-in for InternetExplorer (Win), FireFox (Win), and Safari (Mac). The release 1.1-Alpha come with JScript & Python (or ironPython?) See : http://www.microsoft.com/silverlight/default.aspx http://www.microsoft.com/silverlight/why-compelling.asp

Re: Why are functions atomic?

2007-05-01 Thread John Nagle
Michael wrote: > Why are functions atomic? (I.e. they are not copied.) Because Python has objects for when you need to associate state with a function. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Having problems accepting parameters to a function

2007-05-01 Thread rh0dium
Hi Experts!! I am trying to get the following little snippet to push my data to the function func(). What I would expect to happen is it to print out the contents of a and loglevel. But it's not working. Can someone please help me out. --- #!/usr/bin/env python import rand

Re: Having problems accepting parameters to a function

2007-05-01 Thread Stargaming
rh0dium schrieb: > Hi Experts!! > > I am trying to get the following little snippet to push my data to the > function func(). What I would expect to happen is it to print out the > contents of a and loglevel. But it's not working. Can someone please > help me out. > > --- >

Antigen Notification: Antigen found a message matching a filter

2007-05-01 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 44_ Issue 10" Filter name: "KEYWORD= spam: graduate" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administra

Re: Having problems accepting parameters to a function

2007-05-01 Thread 7stud
On May 1, 10:38 am, rh0dium <[EMAIL PROTECTED]> wrote: > Hi Experts!! > > I am trying to get the following little snippet to push my data to the > function func(). What I would expect to happen is it to print out the > contents of a and loglevel. But it's not working. Can someone please > help m

Re: sqlite for mac?

2007-05-01 Thread 7stud
On May 1, 4:08 am, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > > Does sqlite come in a mac version? > > The interface (pysqlite) is part of the python 2.5 standard library > but you need to install sqlite itself separately (as far as I > remember) fromwww.sqlite.org > > Daniel I'm using python 2

Re: Having problems accepting parameters to a function

2007-05-01 Thread 7stud
On May 1, 11:06 am, 7stud <[EMAIL PROTECTED]> wrote: > > You might consider redefining func() so that you don't have to do the > unpack--repack... When you define a function like this: def func(**keywordargs): print keywordargs the function expects to receive arguments in the form: func(a="

Re: SilverLight, a new way for Python?

2007-05-01 Thread Duncan Booth
Michel Claveau <[EMAIL PROTECTED]> wrote: > Hi! > > SilverLight ("MS flash killer"), is a plug-in for InternetExplorer > (Win), FireFox (Win), and Safari (Mac). > The release 1.1-Alpha come with JScript & Python (or ironPython?) IronPython. > Perhaps SilverLight is a new substitute for Python-

Re: sqlite for mac?

2007-05-01 Thread kirkjobsluder
On May 1, 1:12 pm, 7stud <[EMAIL PROTECTED]> wrote: > I'm using python 2.4.4 because the download said there were more mac > modules available for 2.4.4. than 2.5, and I can't seem to locate a > place to download sqlite for mac. I it comes on OS X Tiger, and possibly earlier versions as well (it's

Re: sqlite for mac?

2007-05-01 Thread attn . steven . kuo
On May 1, 10:12 am, 7stud <[EMAIL PROTECTED]> wrote: > On May 1, 4:08 am, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote: > > > > Does sqlite come in a mac version? > > > The interface (pysqlite) is part of the python 2.5 standard library > > but you need to install sqlite itself separately (as far as

Re: sqlite for mac?

2007-05-01 Thread Michael Bentley
On May 1, 2007, at 12:39 PM, kirkjobsluder wrote: > On May 1, 1:12 pm, 7stud <[EMAIL PROTECTED]> wrote: >> I'm using python 2.4.4 because the download said there were more mac >> modules available for 2.4.4. than 2.5, and I can't seem to locate a >> place to download sqlite for mac. > > I it come

Problem with inspect.getfile

2007-05-01 Thread elventear
Hello, I am trying to use someone else's module that makes use of inspect.getsourcelines. The code was not working for me, so I have been debugging to see why it is not working. I have reduced my problem to getting the wrong file path in the getfile->return object.co_filename call. Basically the

Re: Lisp-like macros in Python?

2007-05-01 Thread Chris Russell
On May 1, 5:10 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > Hello > > The Lisp crowd always brags about their magical macros. I was > wondering if it is possible to emulate some of the functionality in > Python using a function decorator that evals Python code in the stack > frame of the caller. T

Re: sqlite for mac?

2007-05-01 Thread Daniel Nogradi
> >> I'm using python 2.4.4 because the download said there were more mac > >> modules available for 2.4.4. than 2.5, and I can't seem to locate a > >> place to download sqlite for mac. > > > > I it comes on OS X Tiger, and possibly earlier versions as well (it's > > used as an index for Mail.app).

Re: sqlite for mac?

2007-05-01 Thread Daniel Nogradi
> > > Does sqlite come in a mac version? > > > > The interface (pysqlite) is part of the python 2.5 standard library > > but you need to install sqlite itself separately (as far as I > > remember) fromwww.sqlite.org > > > > Daniel > > I'm using python 2.4.4 because the download said there were more

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-01 Thread funfly3
David wrote: > I am not going to join the argument, except you have except to say that as you can see, I > top post. In outlook express, you can see the messages as a thread, so you > read the initial message, come to the reply and you read the response > without having to scroll. Bottom postin

Re: Lisp-like macros in Python?

2007-05-01 Thread Pascal Costanza
Converge is a Python-style language with a macro facility. See http://convergepl.org/ Pascal -- My website: http://p-cos.net Common Lisp Document Repository: http://cdr.eurolisp.org Closer to MOP & ContextL: http://common-lisp.net/project/closer/ -- http://mail.python.org/mailman/listinfo/pyth

Re: Comparing bitmap images for differences?

2007-05-01 Thread 3c273
> Those are my ideas so far but I thought it would be worth asking here > first in case there are some known-good algorithms for doing this kind > of thing rather than me trying to re-invent a wheel that ends up > triangular... > > Thanks! > Matthew. > This might get you started. http://tinyurl.c

Grabbing the output of a long-winded shell call (in GNU/Linux)

2007-05-01 Thread Efrat Regev
Hello, Suppose I want to run from within a Python GUI app some long-output shell call. For example, from within Python I might want to call g++ foo.cpp I already know there are many ways to do this, e.g., commands.getstatusoutput('g++ foo.cpp') to name one. The problem is that thi

Re: Why are functions atomic?

2007-05-01 Thread Martin v. Löwis
> I know I could use a 'functor' defining __call__ and using member > variables, but this is more complicated and quite a bit slower. (I > also know that I can use new.function to create a new copy, but I > would like to know the rational behind the decision to make functions > atomic before I sho

Re: sqlite for mac?

2007-05-01 Thread Ben Secrest
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2007-05-01, Daniel Nogradi <[EMAIL PROTECTED]> wrote: >> Does sqlite come in a mac version? >> > > The interface (pysqlite) is part of the python 2.5 standard library > but you need to install sqlite itself separately (as far as I > remember) from w

Re: Why are functions atomic?

2007-05-01 Thread Michael
On May 1, 9:34 am, John Nagle <[EMAIL PROTECTED]> wrote: > Michael wrote: > > Why are functions atomic? (I.e. they are not copied.) > > Because Python has objects for when you need to associate > state with a function. > > John Nagle Then why are functions mut

Re: SilverLight, a new way for Python?

2007-05-01 Thread M�ta-MCI
Re! >>> it can do much more than active scripting. Hummm Perhaps. But, with ActiveScripting, I can define functions & class in Python, Ruby(script), Jscript, VBscript, Perl. I can call these functions/objects directly from Python, and share many objects (& libraries). I am not sure to find

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-01 Thread Bob Phillips
That is the oft-quoted, idiotic type of example. The reality is that if we follow the thread, we know the question, we only want to see the answer, not wade through a morass of stuff we have already seen. If we haven't seen it, guess what, we can go and read it. "funfly3" <[EMAIL PROTECTED]>

Re: Grabbing the output of a long-winded shell call (in GNU/Linux)

2007-05-01 Thread [EMAIL PROTECTED]
On May 1, 2:23 pm, Efrat Regev <[EMAIL PROTECTED]> wrote: > So my question is if there's a way to "grab" the output as it's being > generated. It doesn't matter if the solution is blocking (as opposed to > callback based), since threads can handle this. I just don't know how to > "grab" the output

Re: Grabbing the output of a long-winded shell call (in GNU/Linux)

2007-05-01 Thread Efrat Regev
[EMAIL PROTECTED] wrote: > On May 1, 2:23 pm, Efrat Regev <[EMAIL PROTECTED]> wrote: > >> So my question is if there's a way to "grab" the output as it's being >> generated. It doesn't matter if the solution is blocking (as opposed to >> callback based), since threads can handle this. I just don't

Re: Generate report containing pdf or ps figures?

2007-05-01 Thread Ken Starks
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Grant Edwards <[EMAIL PROTECTED]> wrote: >> I need to be able to generate a PDF report which consists >> mostly of vector images (which I can generate as encapsulated >> Postscript, PDF, or SVG). What I need is a way to combine >> these fig

Using python with MySQL

2007-05-01 Thread HMS Surprise
Greetings, I need to peform some simple queries via MySQL. Searching the list I see that folks are accessing it with python. I am very new to python and pretty new to MySQL too. Would appreciate it if you could point me to some documentation for accessing MySQL via python. Something of the "Pytho

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-01 Thread Jim Ford
Bob Phillips wrote: > That is the oft-quoted, idiotic type of example. The reality is that if we > follow the thread, we know the question, we only want to see the answer, not > wade through a morass of stuff we have already seen. If we haven't seen it, > guess what, we can go and read it. !tuo

Re: SilverLight, a new way for Python?

2007-05-01 Thread Duncan Booth
"Méta-MCI" <[EMAIL PROTECTED]> wrote: > Re! > it can do much more than active scripting. > > Hummm Perhaps. > But, with ActiveScripting, I can define functions & class in Python, > Ruby(script), Jscript, VBscript, Perl. I can call these > functions/objects directly from Python, and sha

Re: Using python with MySQL

2007-05-01 Thread Greg Donald
On 1 May 2007 12:40:20 -0700, HMS Surprise <[EMAIL PROTECTED]> wrote: > I need to peform some simple queries via MySQL. Searching the list I > see that folks are accessing it with python. I am very new to python > and pretty new to MySQL too. Would appreciate it if you could point me > to some docu

Re: Using python with MySQL

2007-05-01 Thread Shafik
On May 1, 10:40 pm, HMS Surprise <[EMAIL PROTECTED]> wrote: > Greetings, > > I need to peform some simple queries via MySQL. Searching the list I > see that folks are accessing it with python. I am very new to python > and pretty new to MySQL too. Would appreciate it if you could point me > to some

Re: Using python with MySQL

2007-05-01 Thread HMS Surprise
On May 1, 2:58 pm, "Greg Donald" <[EMAIL PROTECTED]> wrote: > On 1 May 2007 12:40:20 -0700, HMS Surprise <[EMAIL PROTECTED]> wrote: > > > I need to peform some simple queries via MySQL. Searching the list I > > see that folks are accessing it with python. I am very new to python > > and pretty new

Re: Lisp-like macros in Python?

2007-05-01 Thread Duane Rettig
sturlamolden <[EMAIL PROTECTED]> writes: > Hello > > The Lisp crowd always brags about their magical macros. I was > wondering if it is possible to emulate some of the functionality in > Python using a function decorator that evals Python code in the stack > frame of the caller. The macro would th

Re: Grabbing the output of a long-winded shell call (in GNU/Linux)

2007-05-01 Thread Diez B. Roggisch
Efrat Regev schrieb: > [EMAIL PROTECTED] wrote: >> On May 1, 2:23 pm, Efrat Regev <[EMAIL PROTECTED]> wrote: >> >>> So my question is if there's a way to "grab" the output as it's being >>> generated. It doesn't matter if the solution is blocking (as opposed to >>> callback based), since threads ca

Re: relative import broken?

2007-05-01 Thread Alan Isaac
"Alex Martelli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I don't know of any "pretty" way -- I'd do it by path manipulation > (finding mypackage from os.path.abspath(__file__) and inserting its > _parent_ directory in sys.path). Yes, that seems to be the standard solution. I

Re: SEO - Search Engine Optimization - Seo Consulting

2007-05-01 Thread Dom Robinson
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > You bottom posters really are a bunch of supercilious, self-righteous > bigots. > > Personally, I find bottom-posting like reading a book backwards ... it > doesn't work for me. > > And regardless of his response, Mr Bruney IS an MVP,

read list of dirnames and search for filenames

2007-05-01 Thread fscked
I cannot seem to get this to work. I am hyst trying to read in a list of paths and see if the directory or any sub has a filename pattern. Here is the code: import os, sys from path import path myfile = open("boxids.txt", "r") for line in myfile.readlines(): d = path(line) for f i

Python for Windows other way to getting it?

2007-05-01 Thread noagbodjivictor
Hello I don't have permission to install new application on the PC I'm using, I need a zipped version of python that I can copy on my external drive. Where can I get a zip version? Thanks -- http://mail.python.org/mailman/listinfo/python-list

I wish that [].append(x) returned [x]

2007-05-01 Thread Tobiah
I wanted to do: query = "query text" % tuple(rec[1:-1].append(extra)) but the append() method returns none, so I did this: fields = rec[1:-1] fields.append(extra) query = "query text" % tuple(fields) -- Posted via a free Usenet account from http://www.teranews.c

Re: I wish that [].append(x) returned [x]

2007-05-01 Thread Rob Wolfe
Tobiah <[EMAIL PROTECTED]> writes: > I wanted to do: > > query = "query text" % tuple(rec[1:-1].append(extra)) > > but the append() method returns none, so I did this: > > fields = rec[1:-1] > fields.append(extra) > query = "query text" % tuple(fields) What about this?

Re: I wish that [].append(x) returned [x]

2007-05-01 Thread Paul McGuire
On May 1, 3:45 pm, Tobiah <[EMAIL PROTECTED]> wrote: > I wanted to do: > > query = "query text" % tuple(rec[1:-1].append(extra)) > > but the append() method returns none, so I did this: > > fields = rec[1:-1] > fields.append(extra) > query = "query text" % tuple(fiel

How can I get the ascii code of a charter in python?

2007-05-01 Thread [EMAIL PROTECTED]
Hi, a python newbe needs some help, I read the python doc at http://docs.python.org/lib/module-curses.ascii.html I tried Import curses.asciicurses.ascii Print ascii('a') I get an error saying module curses.ascii8 does not exsist. How can I get the ascii code of a charter in python? -Ted -- h

Re: I wish that [].append(x) returned [x]

2007-05-01 Thread Carsten Haese
On Tue, 2007-05-01 at 14:00 -0700, Paul McGuire wrote: > On May 1, 3:45 pm, Tobiah <[EMAIL PROTECTED]> wrote: > > I wanted to do: > > > > query = "query text" % tuple(rec[1:-1].append(extra)) > > > > but the append() method returns none, so I did this: > > > > fields = rec[1:-1] > >

Re: How can I get the ascii code of a charter in python?

2007-05-01 Thread dustin
On Tue, May 01, 2007 at 02:06:21PM -0700, [EMAIL PROTECTED] wrote: > How can I get the ascii code of a charter in python? It's a builtin: >>> ord('*') 42 Dustin -- http://mail.python.org/mailman/listinfo/python-list

Re: I wish that [].append(x) returned [x]

2007-05-01 Thread Michael Bentley
On May 1, 2007, at 3:45 PM, Tobiah wrote: > I wanted to do: > > query = "query text" % tuple() > > but the append() method returns none, so I did this: > > fields = rec[1:-1] > fields.append(extra) > query = "query text" % tuple(fields) > As you learned. .append() adds to

Re: How can I get the ascii code of a charter in python?

2007-05-01 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hi, > a python newbe needs some help, > > I read the python doc at > http://docs.python.org/lib/module-curses.ascii.html > > I tried > Import curses.asciicurses.ascii > Print ascii('a') > > I get an error saying module curses.ascii8 does not exsist. > > How can I ge

Re: How can I get the ascii code of a charter in python?

2007-05-01 Thread Michael Bentley
On May 1, 2007, at 4:06 PM, [EMAIL PROTECTED] wrote: > Hi, > a python newbe needs some help, > > I read the python doc at > http://docs.python.org/lib/module-curses.ascii.html > > I tried > Import curses.asciicurses.ascii > Print ascii('a') > > I get an error saying module curses.ascii8 does not

  1   2   >