PIL + show() + Vista

2007-11-29 Thread M�ta-MCI (MVP)
Hi! This code: import Image img = Image.open(r"D:\ParisNude.jpg") img.show() Don't run on my Vista computer. I have a solution: import Image,os img = Image.open(r"D:\FLundhNoNude.jpg") os.startfile(img.filename) It's only in my case? It's censure? ;-) PIL does not

Re: Monkey patching new style classes

2007-11-29 Thread Terry Reedy
"David Coffin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Is it possible to add an attribute to a new style class where the name of | that attribute is determined at runtime? >>> class C(object): pass >>> setattr(C,'a',1) >>> C.a 1 And hasattr, getattr work also. -- htt

Re: Embedding Python - Passing by Reference

2007-11-29 Thread Neil Cerutti
On 2007-11-29, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I understand the parameters to Python functions are passed by > reference: > > def foo(a): > a = a + 1 > > Will change the value of a in the calling function. How do I > implement the equivalent in C when extending Python? You've got

Re: Embedding Python - Passing by Reference

2007-11-29 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I understand the parameters to Python functions are passed by reference: Nope. Python's name-object model is so far different from the named memory block model of Fortran/C/etc that terms invented for the latter are misleading when

Re: Tkinter, wxPython, PyGtk, or PyQt...

2007-11-29 Thread Benjamin
On Nov 29, 11:53 am, gsal <[EMAIL PROTECTED]> wrote: > is PyQt related to Qt? I presume so. I sure that if it wasn't, Trolltech would be on their back... > > is Qt needed for PyQt? > > is PyQt usable in all platforms Python is available and is it GPLed, > too? > > I read TrollTech webpage on QT and

Re: Bundling Python on Mac

2007-11-29 Thread Benjamin
On Nov 29, 2:34 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Benjamin schrieb: > > > Hello, I'm writing a Python/PyQt application. For my Mac distribution. > > I would like to include all the needed libraries in the Mac bundle. > > How should I go about doing this? > > The py2app distutils e

Re: Lib for audio?

2007-11-29 Thread Anthony Baxter
On Nov 29, 2007 11:04 PM, Dave <[EMAIL PROTECTED]> wrote: > I need to read microphone input and determine frequency. Is there a lib > for that? There's a bunch of code in shtoom for both reading from the mike on different platforms, and doing a bit of frequency analysis (for inline DTMF detection

Interfaces to high-volume discussion forums (was: Science list)

2007-11-29 Thread Ben Finney
"Dotan Cohen" <[EMAIL PROTECTED]> writes: > On 29/11/2007, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > > Regardless of what Google/Yahoo/M$/AOL want you to think, > > using a web-based mail client is typically the worst way to follow > > mailing lists and/or news-groups; much better to

Re: Science list

2007-11-29 Thread Dotan Cohen
On 29/11/2007, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Thu, 29 Nov 2007 08:07:46 -0800 (PST), Francesco Pietra > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > Do you know if "free" yahoo.com allows threaded view for python only? I was > > Ah, now the "real

Re: Determine whether program was started by clicking icon or command line

2007-11-29 Thread Adonis Vargas
Roger Miller wrote: > On Nov 28, 10:51 pm, Benjamin Hell <[EMAIL PROTECTED]> wrote: >> Hi! >> >> I wonder whether there might be a way to find out how a Python >> program was started (in my case in Windows): By double clicking the >> file or by calling it on the "DOS" command line prompt. >> >> Bac

Re: Interfaces to high-volume discussion forums (was: Science list)

2007-11-29 Thread Grant Edwards
On 2007-11-30, Ben Finney <[EMAIL PROTECTED]> wrote: > Most of the high-volume discussion lists I participate in are made > available as NNTP forums via news.gmane.org. I find that immeasurably > superior to any email interface, not least because I can use *any* > NNTP client to manage my interact

Crackly sound in pygame

2007-11-29 Thread [EMAIL PROTECTED]
Hey guys I am running Windows XP and am having an issue with a game that my team has created. Whenever an audio file is played it creates a very distorted, crackly sound. Any ideas what could be the issue? Thanks -- http://mail.python.org/mailman/listinfo/python-list

python vs pythonw

2007-11-29 Thread John Velman
New to mac. I have leopard. What's the difference between python and pythonw? So far (which isn't very far) I can't tell the difference. I have a small application using TKinter that I was working on under Linux. Both python and pythonw run it, but on both it "stops responding" (pinwheel of

Re: Yet Another Tabular Data Question

2007-11-29 Thread carllemp
On Nov 29, 5:46 pm, [EMAIL PROTECTED] wrote: > Hi all, > > Fairly new Python guy here. I am having a lot of trouble trying to > figure this out. I have some data on some regulations in Excel and I > need to basically add up the total regulations for each country--a > statistical analysis thing th

Re: How to suggest a new Python list? Was: Science list

2007-11-29 Thread Aahz
In article <[EMAIL PROTECTED]>, J. Robertson <[EMAIL PROTECTED]> wrote: > >Anyway, I do not see how to suggest a new mailing list on >http://www.python.org/community/lists/ - does anyone know? Send e-mail to [EMAIL PROTECTED] specifying the name of the list. -- Aahz ([EMAIL PROTECTED])

Re: Need some help with 'with'

2007-11-29 Thread Aahz
In article <[EMAIL PROTECTED]>, Mike Kent <[EMAIL PROTECTED]> wrote: > >I figure that if instead of returning the buffer from the context >directly, I instead returned the buffer in a list, I could then change >the buffer, put it in the returned list, then I'd have access to it >back inside the co

Re: Compile Cheetah Template on Windows

2007-11-29 Thread Tim Roberts
brianrpsgt1 <[EMAIL PROTECTED]> wrote: >Tim, thank you very much for the reply. The 'cheetah' function is now >working! > >I am still having a problem creating the file. I continually get >errors. I am sure that it is something very simple. > >Below is the code, please guide me in the right dir

Re: reading raw variables from file

2007-11-29 Thread Paddy
On Nov 30, 4:57 am, Astan Chee <[EMAIL PROTECTED]> wrote: > Hi, > I have a file that might contain literal python variable statements at > every line. For example the file info.dat looks like this: > users = ["Bob", "Jane"] > status = {1:"ok",2:users[0]} > the problem is I want to read this file an

Re: Not forking?

2007-11-29 Thread Gilles Ganault
On Sat, 24 Nov 2007 14:33:34 +1300, greg <[EMAIL PROTECTED]> wrote: >What makes you think it's not forking? Chances are >it *is* forking, but something is going wrong later. You were right. There were scrambled characters in the script (copy/pasting from Windows), which kept the script from workin

ImportError: No module named sax.handler?

2007-11-29 Thread Kelie
Hello, I'm lost here. When I put this line from xml.sax.handler import ContentHandler in a .py file and run it, I get the ImportError. When I execute it in shell, there is no error. Why? Thanks for your help! -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL + show() + Vista

2007-11-29 Thread Cousin Stanley
> This code: > import Image > img = Image.open(r"D:\ParisNude.jpg") > img.show() > > Don't run on my Vista computer. > > I have a solution: import Image,os img = Image.open(r"D:\FLundhNoNude.jpg") os.startfile(img.filename) > Michel As an alternative you migh

Re: Embedding Python - Passing by Reference

2007-11-29 Thread andy
Thanks for the replies - I see that I completely misunderstood "passing by reference" when discussing Python. It looks like wrapping the object up in a list will be the path I go down as it remains closer to the C API I am wrapping. Thanks again! Andy -- http://mail.python.org/mailman/listinfo/p

Re: Lib for audio?

2007-11-29 Thread Basilisk96
On Nov 29, 7:04 am, Dave <[EMAIL PROTECTED]> wrote: > I need to read microphone input and determine frequency. Is there a lib > for that? > > Thanks, > Dave How about PyMedia? It has input reading capability from any sound device that your system supports, as well as frequency analysis based on re

reading raw variables from file

2007-11-29 Thread Astan Chee
Hi, I have a file that might contain literal python variable statements at every line. For example the file info.dat looks like this: users = ["Bob", "Jane"] status = {1:"ok",2:users[0]} the problem is I want to read this file and load whatever variables written in it as normal python variable st

Re: ImportError: No module named sax.handler?

2007-11-29 Thread Martin v. Löwis
> I'm lost here. When I put this line > > from xml.sax.handler import ContentHandler > > in a .py file and run it, I get the ImportError. When I execute it in > shell, there is no error. > > Why? Because you have another module called xml in your path that is found first and has no sax package

Re: Oh no, my code is being published ... help!

2007-11-29 Thread Tim Roberts
rm <[EMAIL PROTECTED]> wrote: > >The thing is I am starting to get a little nervous about it. You see, >programming is not my full time job. I dabble in it from time to >time, mostly to scratch my own itches, as they say. But, I know that >my code is probably far from being of professional quali

Re: python vs pythonw

2007-11-29 Thread Martin v. Löwis
> New to mac. I have leopard. What's the difference between python and > pythonw? So far (which isn't very far) I can't tell the difference. IIUC, pythonw is linked with the WindowManager library, so it can do GUI operations; python can't. > I have a small application using TKinter that I was

Re: reading raw variables from file

2007-11-29 Thread Astan Chee
Paddy wrote: On Nov 30, 4:57 am, Astan Chee <[EMAIL PROTECTED]> wrote: Hi, I have a file that might contain literal python variable statements at every line. For example the file info.dat looks like this: users = ["Bob", "Jane"] status = {1:"ok",2:users[0]} the problem is I want to read this

Re: Using marshal to manually "import" a python module

2007-11-29 Thread Martin v. Löwis
> The strange thing is, it worked fine locally on my two machines (32bit > running python 2.3.5 and 64bit running python 2.4.1), but when run by a > 64bit machine on the network, it would fail every time in the following > manner: It may not that much be an issue of 32-bit vs. 64-bit, but of Pytho

Re: Oh no, my code is being published ... help!

2007-11-29 Thread Vidyadhar74
Please check your hard disk partition is NTFS or FAT32 if it is FAT32 then Convert the partition to NTFS and unzip the 7zipped file on NTFS partition. rm wrote: > There is a Linux forum that I frequent from time to time on which I > mentioned a couple of scripts that I wrote. The editors of a s

Re: Dynamically adding a runtime generated method to a class.

2007-11-29 Thread Martin v. Löwis
> This would work and not be too terribly inefficient but I was thinking > it would be much better generate the getLine method at runtime and > dynamically add it to the class so I wouldn't have to pass the columns > around and loop through them every time; I would advise against that. Generating

Re: ImportError: No module named sax.handler?

2007-11-29 Thread Kelie
On Nov 29, 8:20 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > Because you have another module called xml in your path that is found > first and has no sax package in it. Thank you Martin. Actually it was the .py file itself. I named it xml.py. -- http://mail.python.org/mailman/listinfo/pyth

<    1   2