Re: removing characters before writing to file

2006-02-08 Thread jawahh
', '.join(map(str,output)) -- http://mail.python.org/mailman/listinfo/python-list

Re: removing characters before writing to file

2006-02-08 Thread Frank Potter
r=re.compile(r"(\(')|( '\))|'")print r.sub('',str(output))On 8 Feb 2006 18:35:01 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: hii have some output that returns a lines of tuples egtr('sometext1', 1421248118, 1, 'P ')('sometext2', 1421248338, 2, 'S ')and so onI tried thisre.sub(r" '() ",

random playing soundfiles according to rating.

2006-02-08 Thread kp87
I am a little bit stuck I want to play a bunch of soundfiles randomly, but i want to give each soundfile a rating (say 0-100) and have the likelihood that the file be chosen be tied to its rating so that the higher the rating the more likely a file is to be chosen. Then i need some addition

Re: still a valid book?

2006-02-08 Thread John Salerno
Scott David Daniels wrote: > John Salerno wrote: >> Jonathan Gardner wrote: >>> You may want to read >>> http://python.org/doc/2.4.2/whatsnew/whatsnew24.html to get an idea of >>> what has changed from 2.3 to 2.4 if you buy the 2.3 book. >>> >> Yeah, I was looking at that, but it seems a little ove

Re: Replacing curses (Was: Re: Problem with curses and UTF-8)

2006-02-08 Thread Ian Ward
Jean-Paul Calderone wrote: >> I've looked at newt and snack, but all I really need is: >> - a way to position the cursor at (0,0) >> - a way to hide and show the cursor >> - a way to detect when the terminal is resized >> - a way to query the terminal size > > You might be interested in Twisted Co

Re: random playing soundfiles according to rating.

2006-02-08 Thread Steve Holden
[EMAIL PROTECTED] wrote: > I am a little bit stuck > > I want to play a bunch of soundfiles randomly, but i want to give each > soundfile a rating (say 0-100) and have the likelihood that the file be > chosen be tied to its rating so that the higher the rating the more > likely a file is to b

Re: Replacing curses

2006-02-08 Thread Ian Ward
Ross Ridge wrote: > Thomas Dickey wrote: >>...and send UTF-8 text, keeping track of where you really are on the screen. > You make that sound so easy. I'll have to deal with that anyway, since I'm doing all my own wrapping, justification and clipping of text. (don't talk to me about RtoL text, I'

how to remove using replace function?

2006-02-08 Thread localpricemaps
i have some html that looks like this 34 main, Boston, MA and i am trying to use the replace function to get rid of the that i scrape out using this code: for oText in incident.fetchText( oRE): strTitle += oText.strip() strTitle = string.replace(strTitle,'','') but it

Re: how to remove using replace function?

2006-02-08 Thread Dylan Moreland
I think you want to use the replace method of the string instance. Something like this will work: # See http://docs.python.org/lib/string-methods.html#l2h-196 txt = "an unfortunate in the middle" txt = txt.replace("", "") -- http://mail.python.org/mailman/listinfo/python-list

Re: Too Many if Statements?

2006-02-08 Thread [EMAIL PROTECTED]
Juho Schultz wrote: > > However, the following gives a SystemError with only 2500 elif's. SystemErrors should never occur, if you see one it's a bug. [valid program which demonstrates a python bug] > Traceback (most recent call last): >File "iftest.py", line 10, in ? > exec prog > Syste

Re: random playing soundfiles according to rating.

2006-02-08 Thread Michael Spencer
[EMAIL PROTECTED] wrote: ... > > But i am stuck on how to do a random chooser that works according to my > idea of choosing according to rating system. It seems to me to be a bit > different that just choosing a weighted choice like so: > ... > > And i am not sure i want to have to go through w

Re: Uses of The 4th Dimension (New Discovery by The Human Race!)

2006-02-08 Thread TheSmokingGnu
Walter Mitty wrote: > > > Jesus. I misread "clock" there for a minute taking into account the > context. Yeuckkk. > Heh. Don't tell me you've got dirty clocks, too? TheSmokingGnu -- http://mail.python.org/mailman/listinfo/python-list

Re: Unable to get PIL to load jpeg images

2006-02-08 Thread Amit Khemka
This is because PIL, is not able to find the jpeg library . 1. Install jpeg-libs from sources: (http://www.ijg.org/files/jpegsrc.v6b.tar.gz) 2.0: "clean" the PIL build 2.1 In setup.py that comes with PIL, set the JPEG_ROOT to the jpeg-lib path 3.0 run setup.py I hope that should help .. cheers,

Re: only a simple xml reader value

2006-02-08 Thread Albert Leibbrandt
[EMAIL PROTECTED] wrote: >I'm newbie with that xml stuff. > >The only thing I must read is the response I get from a EPP server. >A response like this: > > >http://www.eurid.eu/xml/epp/epp-1.0"; >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >xmlns:contact="http://www.eurid.eu/xml/epp/con

Re: cx_Oracle entry point error

2006-02-08 Thread Albert Leibbrandt
[EMAIL PROTECTED] wrote: >I downloaded cx_Oracle from >http://www.cxtools.net/default.aspx?nav=cxorlb and selected the windows >installer for Oracle 8i, Python 2.4 > >>From the readme.txt file: >BINARY INSTALL: >Place the file cx_Oracle.pyd or cx_Oracle.so anywhere on your Python >path. > >So I tr

Re: how to remove using replace function?

2006-02-08 Thread localpricemaps
tried that, didn't work for me -- http://mail.python.org/mailman/listinfo/python-list

Re: how to remove using replace function?

2006-02-08 Thread localpricemaps
nope didn't work -- http://mail.python.org/mailman/listinfo/python-list

Re: how to remove using replace function?

2006-02-08 Thread Dylan Moreland
[EMAIL PROTECTED] wrote: > nope didn't work Could you be more specific about the error? Both my example and yours work perfectly on my box. -- http://mail.python.org/mailman/listinfo/python-list

Re: 450 Pound Library Program

2006-02-08 Thread mwt
A million thanks for in-depth critique. I look forward to figuring out half of what you're talking about ;) -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3