Seattle Python Interest Group meeting 14 June 2007

2007-06-09 Thread jamesthiele . usenet
Thursday, June 14th, 2007 at 7 PM See details at www.seapig.org -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html

Seattle Python Interest Group Thursday at 7:00 PM

2007-01-11 Thread jamesthiele . usenet
Seattle Python Interest Group Meeting Thursday, Jan 11th at 7:00 PM Bar underneath the Third Place Books in Ravenna. http://www.ravennathirdplace.com/ NE 65th St 20th Ave NE -- http://mail.python.org/mailman/listinfo/python-list

Seattle Python Interest Group (SeaPIG)

2006-09-15 Thread jamesthiele . usenet
Thursday, September 14th at 7:00 PM See www.seapig.org for more info. -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html

print ending with comma

2005-07-19 Thread jamesthiele . usenet
I recently ran into the issue with 'print' were, as it says on the web page called Python Gotchas (http://www.ferg.org/projects/python_gotchas.html): The Python Language Reference Manual says, about the print statement, A \n character is written at the end, unless the print statement ends with a

Re: Text-to-speech

2005-03-20 Thread jamesthiele . usenet
On some flavors of Windows you can use: import pyTTS tts = pyTTS.Create() tts.Speak('This is the sound of my voice.') On Mac OS X you can use: import os os.system(say 'This is the sound of my voice.') You could write a wrapper that takes a string and checks to see which OS you are on and

Catching all methods before they execute

2005-03-07 Thread jamesthiele . usenet
I have run into some cases where I would like to run a class method anytime any class method is invoked. That is, if I write x.foo then it will be the same as writing x.bar x.foo for any method in class x (with the possible exception of 'bar'). The first few times I wanted to print out a data

Re: Catching all methods before they execute

2005-03-07 Thread jamesthiele . usenet
[EMAIL PROTECTED] wrote: I have run into some cases where I would like to run a class method anytime any class method is invoked. Perhaps you want __getattribute__ on a new-style class? -- Michael Hoffman Perhaps I do. The docs say that __getattribute__ is called on all attribute references,

Mapping operator tokens to special methods

2005-02-24 Thread jamesthiele . usenet
I was starting to write a dictionary to map operator strings to their equivalent special methods such as: { '+' : 'add', '' : 'and_' } The idea is to build a simple interactive calculator. and was wondering if there is already something like this builtin? Or is there a better way to do what

Re: Mapping operator tokens to special methods

2005-02-24 Thread jamesthiele . usenet
John Machin wrote: eval('1+2') 3 -- Yeah, that's what I decided to do. -- http://mail.python.org/mailman/listinfo/python-list

loops - list/generator comprehensions

2005-02-06 Thread jamesthiele . usenet
I wrote this little piece of code to get a list of relative paths of all files in or below the current directory (*NIX): walkList = [(x[0], x[2]) for x in os.walk(.)] filenames = [] for dir, files in walkList: filenames.extend([/.join([dir, f]) for f in files]) It works

type() takes one or *three* arguments!?

2005-01-30 Thread jamesthiele . usenet
I was looking at Simon Burton's Povray.py code (part of pypov) and saw this line: globals()[name] = type( name, (KWItem,), {} ) # nifty :) where 'KWItem' was a class. It did seem nifty, but it was unclear to me what was happening. I went to python.org's online documentation which said that