Re: OS X: How to play .wav file w/Python?

2009-05-11 Thread alex23
On May 12, 11:55 am, kj wrote: > import pygame.mixer > > pygame.mixer.init() > pygame.mixer.Sound("bell.wav").play > print "done" > > What am I doing wrong? Your first mistake is not pasting here the traceback you received. That always makes it easier to assist with problems like this. However,

Re: sqlite single transaction without foreign key or triggers

2009-05-11 Thread Aahz
In article , Rob Williscroft wrote: > >db.execute( ''' > update "sessions" set "uid" = ? > where "uid" = ? > and exists( > select * from "users" where "uid" = ? > ) >''', >(v['uid'],s.SID, v['uid']) > ) This will be more efficient if you do "sel

putting date strings in order

2009-05-11 Thread noydb
All, How best to go about this? >> I have a list containing strings referring to months, like ["x_apr", "x_jul", "x_jan", "x_aug", "x_may", etc] -- always using the 3-chars for month. The list will contain all 12 months, however the starting month may not necessarily be jan. I want to order th

Re: OOP & Abstract Classes

2009-05-11 Thread alex23
On May 12, 1:22 am, Mike Driscoll wrote: > I've never used (or heard of) the Abstract type...and the guy who > wrote the FAQ was being a jerk. It looks like he was just throwing in > an undefined variable name just to make his Python program break while > taking a pot shot at people who use that s

Re: Can I get a value's name

2009-05-11 Thread Alan Brogan
Thank you Ken for your help answer On Mon, May 11, 2009 at 8:11 PM, Ken Seehart wrote: > jalanb3 wrote: >> >> def replace_line(pattern,replacement): >>    values = '\n' in pattern and [ pattern ] or [] >>    values += '\n' in replacement and [ replacement ] or [] >> >> Can I later get the name "

dict would be very slow for big data

2009-05-11 Thread forrest yang
hi i am trying to insert a lot of data into a dict, which may be 10,000,000 level. after inserting 10 unit, the insert rate become very slow, 50,000/ s, and the entire time used for this task would be very long,also. would anyone know some solution for this case? thanks -- http://mail.python.

Re: putting date strings in order

2009-05-11 Thread Paul Rubin
noydb writes: > Anyone have any good ideas? I was curious to see what people came up > with. Is this a homework assignment? Some hints: 1) figure out how to compare two month names for chronological order, leaving out the issue of the starting month not being january. 2) figure out how to a

piping input to an external script

2009-05-11 Thread Tim Arnold
Hi, I have some html files that I want to validate by using an external script 'validate'. The html files need a doctype header attached before validation. The files are in utf8 encoding. My code: --- import os,sys import codecs,subprocess HEADER = '' filename = 'mytest.html' fd = c

Re: dict would be very slow for big data

2009-05-11 Thread Steve Howell
On May 11, 8:28 pm, forrest yang wrote: > hi > i am trying to insert a lot of data into a dict, which may be > 10,000,000 level. > after inserting 10 unit, the insert rate become very slow, 50,000/ > s, and the entire time used for this task would be very long,also. > would anyone know some so

Re: web access through vpn client

2009-05-11 Thread Gabriel Genellina
En Fri, 01 May 2009 21:41:03 -0300, Stephen Hansen escribió: urllib2 and BeautifulSoup work pretty well to do what I want, and the first little routine actually gets the data from the web page... except if my VPN client is turned on. Usually when something like that happens with a VPN its b

Re: piping input to an external script

2009-05-11 Thread Steve Howell
On May 11, 11:04 am, "Tim Arnold" wrote: > Hi, I have some html files that I want to validate by using an external > script 'validate'. The html files need a doctype header attached before > validation. The files are in utf8 encoding. My code: > --- > import os,sys > import codecs,subp

Re: Nimrod programming language

2009-05-11 Thread kay
On 12 Mai, 02:10, Tomasz Rola wrote: > On Mon, 11 May 2009, rump...@web.de wrote: > > > One question I ask myself upon seeing a new language is if it is possible > > > to program amb (amb=ambiguous) operator in it. This page gives a very > > > nice, "code first" explanation of amb and how it is su

Re: Unable to install Pywin32 for Python 2.6.2

2009-05-11 Thread David Lyon
On Tue, 12 May 2009 02:22:56 GMT, David Lees wrote: > I have no problem installing Python 2.6.2 for windows under XP SP3 and > IDLE and the command line versions work fine. When I run the pywin32 > installer downloaded from sourceforge (pywin32-212.win32-py2.6.exe) I > get the following error

Re: Unable to install Pywin32 for Python 2.6.2

2009-05-11 Thread David Lyon
Hi, hmmm... that's annoying.. Whilst I don't have an exact answer I have a few hunches... Perphaps what has happened is that the windows installer between the versions of pywin32 has installed newer versions of the same dlls over the top of older ones. Or, possibly, the installer hasn't wanted

Fwd: Re: Unable to install Pywin32 for Python 2.6.2

2009-05-11 Thread David Lyon
Hi, hmmm... that's annoying.. Whilst I don't have an exact answer I have a few hunches... Perphaps what has happened is that the windows installer between the versions of pywin32 has installed newer versions of the same dlls over the top of older ones. Or, possibly, the installer hasn't wanted

Re: piping input to an external script

2009-05-11 Thread norseman
Tim Arnold wrote: Hi, I have some html files that I want to validate by using an external script 'validate'. The html files need a doctype header attached before validation. The files are in utf8 encoding. My code: --- import os,sys import codecs,subprocess HEADER = '' filename =

Re: Wrapping comments

2009-05-11 Thread Arnaud Delobelle
Tobias Weber writes: > In article , > David Robinow wrote: > >> (define-key key-translation-map [?\M-3] "#") >> >> >> or, if you prefer, just be sick. > > Thanks, but I don't believe using releases from people who think I jump > should through hoops just to make my keyboard work is a good pl

Re: piping input to an external script

2009-05-11 Thread Steve Howell
On May 11, 10:16 pm, norseman wrote: > Tim Arnold wrote: > > Hi, I have some html files that I want to validate by using an external > > script 'validate'. The html files need a doctype header attached before > > validation. The files are in utf8 encoding. My code: > > --- > > import o

Re: Fwd: Re: Unable to install Pywin32 for Python 2.6.2

2009-05-11 Thread Mark Hammond
Probably some import statement is finding a .pyd module built against Python 2.5 instead of Python 2.6; it might be that PYTHONPATH points somewhere wrong, or the registry for Python 2.6 is setup wrong, or something else entirely... Cheers, Mark On 12/05/2009 3:13 PM, David Lyon wrote: Hi,

Re: piping input to an external script

2009-05-11 Thread norseman
Steve Howell wrote: On May 11, 10:16 pm, norseman wrote: Tim Arnold wrote: Hi, I have some html files that I want to validate by using an external script 'validate'. The html files need a doctype header attached before validation. The files are in utf8 encoding. My code: --- import

Re: How do I test the integrity of a Python installation in Debian and Ubuntu

2009-05-11 Thread Geoff Gardiner
Lawrence D'Oliveiro wrote: > .. I expect an apology. > Otherwise, it becomes grounds for an abuse complaint to your ISP. > Yes, I do apologize profusely and publicly, and would have done so regardless of threat. I had trouble with posts making it through to the list and so was also posting in

Re: install pyPgSQL on Windows for python 2.5

2009-05-11 Thread ralf321
On 24 Mrz., 18:25, someon wrote: > On Mar 24, 4:57 pm, Dietmar Schwertberger > wrote: > > > someone wrote: > > > Hi, > > > > does anyone know how to install pyPgSQL on Windows? There is no > > > package for Python 2.5 on Homepage: > > > I've installed newest Visual C++ Studio 2008 from Microsoft,

Re: piping input to an external script

2009-05-11 Thread Steve Howell
On May 11, 11:31 pm, norseman wrote: > Steve Howell wrote: > > On May 11, 10:16 pm, norseman wrote: > >> Tim Arnold wrote: > >>> Hi, I have some html files that I want to validate by using an external > >>> script 'validate'. The html files need a doctype header attached before > >>> validation.

<    1   2