Re: Unicode/ascii encoding nightmare

2006-11-07 Thread Andrea Griffini
John Machin wrote: > Indeed yourself. What does the above mean ? > Have you ever considered reading posts in > chronological order, or reading all posts in a thread? I do no think people read posts in chronological order; it simply doesn't make sense. I also don't think many do read threads com

PIL: match for ImageMagick's display -ping

2006-11-07 Thread Torsten Bronger
Hallöchen! I have to extract the dimensions of many bitmap files. An old Bash script did it with ImageMagick's "display -ping ...". "-ping" means that it extracts the image dimensions efficiently. I suspect it simply doesn't read the image itself. Now the Bash script has been transformed into

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-07 Thread Paul Rubin
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Ah, but in the case where the lock# signal is used, it's known that > the data is not in the cache of the CPU performing the lock operation; > I believe it is also known that the data is not in the cache of any > other CPU. So the CPU performing the L

PIL: match for ImageMagick's display -ping

2006-11-07 Thread Torsten Bronger
Hallöchen! I have to extract the dimensions of many bitmap files. An old Bash script did it with ImageMagick's "display -ping ...". "-ping" means that it extracts the image dimensions efficiently. I suspect it simply doesn't read the image itself. Now the Bash script has been transformed into

Re: assigning values in __init__

2006-11-07 Thread Nick Craig-Wood
Larry Bates <[EMAIL PROTECTED]> wrote: > John Salerno wrote: > > Let's say I'm making a game and I have this base class: > > > > class Character(object): > > > > def __init__(self, name, stats): > > self.name = name > > self.strength = stats[0] > > self.dexterity = st

Re: shutil: permission denied errors on windows

2006-11-07 Thread Antoine De Groote
Yes it's strange, I never had the problem before, either. It seems now to be only the case for folders. A very simple shutil.copy('a', 'b') already fails with the error message. I reinstalled Python, but that didn't change anything... Regards, antoine John Henry wrote: > I use the copy functi

Re: Pyro stability

2006-11-07 Thread Paul Boddie
Beliavsky wrote: > Carl J. Van Arsdall wrote: [Enthusiasm for Pyro, not for those with sensitivity to rude words] > You should watch your language in a forum with thousands of readers. It was quite an endorsement, though. ;-) Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Plot pkg - Multiple Y axes?

2006-11-07 Thread Jeremy Sanders
monkeyboy wrote: > I'm searching for a plotting package that will allow multiple y axes of > different scales. For example I'd like to overlay 4 or 5 time series > with each series having a separate axis. Does anyone know of such a > package? My package veusz allows that... http://home.gna.org/

Re: create global variables?-the full story

2006-11-07 Thread Alistair King
J. Clifford Dyer wrote: >> OK... >> >> from the start. >> >> im trying to develop a simple command line application for determining >> the degree of substitution (DS) on a polymer backbone from elemental >> analysis, i.e., the % weights of different elements in the >> monomer-substituent compound (

Re: Unicode/ascii encoding nightmare

2006-11-07 Thread Paul Boddie
Thomas W wrote: > Ok, I've cleaned up my code abit and it seems as if I've > encoded/decoded myself into a corner ;-). Yes, you may encounter situations where you have some string, you "decode" it (ie. convert it to Unicode) using one character encoding, but then you later "encode" it (ie. convert

Re: why does this unpacking work

2006-11-07 Thread Piet van Oostrum
> Carsten Haese <[EMAIL PROTECTED]> (CH) wrote: >CH> On Fri, 2006-10-20 at 15:14, John Salerno wrote: >>> What seems to be happening is that 'for x,y in t' is acting like: >>> >>> for x in t: >>> for y,z in x: >>> #then it does it correctly >CH> No, it's actually behaving like >CH> for x i

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-07 Thread Ross Ridge
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Ah, but in the case where the lock# signal is used, it's known that > the data is not in the cache of the CPU performing the lock operation; > I believe it is also known that the data is not in the cache of any > other CPU. So the CPU performing the L

Re: using split function

2006-11-07 Thread [EMAIL PROTECTED]
Thanks a lot, I am done with that part. But now I am facing another problem. I am using the code given below where A is a matrix and row is a sequence. But it gives following error: error-- A[a,:]=row ValueError: setting an array element with a sequence. --code---

Python, PHP Developers required for a company in Bangalore.

2006-11-07 Thread prabhusanthanam
Python, PHP Developers required for a company in Bangalore. Hi, We have immediate requirements for Python, PHP Developers with our client in Bangalore. Skillset : Linux/ Solaris/ FreeBSD/ etc. Apache HTTP Server, MySQL Database , PHP , Ruby , Ruby on Rails Web Framework, Python Programming

__init__ function problem

2006-11-07 Thread kelin,[EMAIL PROTECTED]
Hi, Today I read the following sentences, but I can not understand what does the __init__ method of a class do? __init__ is called immediately after an instance of the class is created. It would be tempting but incorrect to call this the constructor of the class. It's tempting, because it looks li

Re: PIL: match for ImageMagick's display -ping

2006-11-07 Thread Steve Holden
Torsten Bronger wrote: > Hallöchen! > > I have to extract the dimensions of many bitmap files. An old Bash > script did it with ImageMagick's "display -ping ...". "-ping" means > that it extracts the image dimensions efficiently. I suspect it > simply doesn't read the image itself. > > Now the

Re: __init__ function problem

2006-11-07 Thread Duncan Booth
"kelin,[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Today I read the following sentences, but I can not understand what > does the __init__ method of a class do? > __init__ is called immediately after an instance of the class is > created. It would be tempting but incorrect to call this the > c

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-07 Thread Joe Seigh
Paul Rubin wrote: > robert <[EMAIL PROTECTED]> writes: > >>>I don't want to discourage you but what about reference >>>counting/memory >>>management for shared objects? Doesn't seem fun for me. >> >>in combination with some simple locking (anyway necessary) I don't >>see a problem in ref-counting.

Re: shutil: permission denied errors on windows

2006-11-07 Thread [EMAIL PROTECTED]
Antoine De Groote schrieb: > Yes it's strange, I never had the problem before, either. It seems now > to be only the case for folders. A very simple > > shutil.copy('a', 'b') > > already fails with the error message. > > I reinstalled Python, but that didn't change anything... > > Regards, > anto

Re: sound processing modules in python - anyone?

2006-11-07 Thread marc . wyburn
I've had a brief look at this and there isn't a sound orientated library as such. You can however use numpy to do stuff like FFTs and there are there is a wave module in python that will allow you to create wavs, you can google for importing wav's into numpy arrays. This seemed like a good idea to

Re: sound processing modules in python - anyone?

2006-11-07 Thread marc . wyburn
I've had a brief look at this and there isn't a sound orientated library as such. You can however use numpy to do stuff like FFTs and there are there is a wave module in python that will allow you to create wavs, you can google for importing wav's into numpy arrays. This seemed like a good idea to

Re: __init__ function problem

2006-11-07 Thread Steven D'Aprano
On Tue, 07 Nov 2006 05:26:07 -0800, kelin,[EMAIL PROTECTED] wrote: > Hi, > > Today I read the following sentences, but I can not understand what > does the __init__ method of a class do? Play around with this class and see if it helps: class MagicStr(str): """Subclass of str with leadi

Simple Tkinter problem

2006-11-07 Thread gmarkowsky
Hi all, I'm trying to write a GUI that will put up multiple widgets in succession. My problem is that each widget also contains the previous widgets when they pop up. How do I reinitialize the widget each time so that it doesn't contain earlier ones? Actually, another question I have is, is there

Re: create global variables?-the full story

2006-11-07 Thread Steven D'Aprano
On Tue, 07 Nov 2006 12:54:36 +0200, Alistair King wrote: > Does anyone knows of a simple way of > determining how much processer time it takes to do these calculations? See the timeit module. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-07 Thread Martin v. Löwis
Paul Rubin schrieb: > "Martin v. Löwis" <[EMAIL PROTECTED]> writes: >> Ah, but in the case where the lock# signal is used, it's known that >> the data is not in the cache of the CPU performing the lock operation; >> I believe it is also known that the data is not in the cache of any >> other CPU. S

Re: sqlite error?

2006-11-07 Thread John Salerno
Frank Millman wrote: > Definitely not. You could have a sql command like this - > > cur.execute("UPDATE table SET col1 = ?, col2 = ? WHERE col3 = ? AND > col4 = ?",(1,2,3,4)) > > The parameters could be scattered throughout the command. Therefore the > substitution is one-for-one from left to ri

Re: Simple Tkinter problem

2006-11-07 Thread Neil Cerutti
On 2006-11-07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm trying to write a GUI that will put up multiple widgets in > succession. My problem is that each widget also contains the > previous widgets when they pop up. How do I reinitialize the > widget each time so that it doesn't contain ea

Re: forwarding *arg parameter

2006-11-07 Thread Tuomas
Steven D'Aprano wrote: > On Mon, 06 Nov 2006 13:03:55 +, Tuomas wrote: > > >>If you read the whole chain you find out what we were talking of. > > > I had already read the whole thread, and I've read it again in case I > missed something the first time, and I still have no idea why you thin

Re: __init__ function problem

2006-11-07 Thread babui
Steven D'Aprano ha escrit: > Once the __new__ method creates the instance and returns, before anything > else happens, the instance's __init__ method is called. This only happens when the object created by __new__ isinstance of the class invoked in the creation statement, that is: s=MagicStr("l

Barry Warsaw giving Python talk at NASA

2006-11-07 Thread A.M. Kuchling
This is at the Goddard campus: --amk -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple Tkinter problem

2006-11-07 Thread gmarkowsky
Here's my Tkinter class: class TwoChoice: def __init__(self, master): frame = Frame(master) frame.pack() m = Label(root, text= maentry) m.pack() n = Label(root, text= fave) n.pack() self.button = Button(frame, text=home_team, command= s

Re: __div__ not recognized automatically

2006-11-07 Thread Anton81
> If you have the > > from __future__ import division > > statement, you need to override __truediv__(), not __div__() That worked after I also added from __future__ import division to all other modules I created. Is it possible that there appears an inconsistency if the division is imported in

Re: Simple Tkinter problem

2006-11-07 Thread jim-on-linux
Greg, Run the following code to see how pack_forget() or grid_forget() works, it makes previous widgets disappear but not go away. If you call grid() or pack() again after using grid_forget() the widget returns. root = Tk() class Ktest: def __init__(self): self.Ftest1() d

Help with installing soappy module on Python 2.4.3 (windows machine)

2006-11-07 Thread [EMAIL PROTECTED]
Hi Folks, I want to install the SOAPpy module on my windows box. I have python 2.4.3 Can you help me with the steps and the URL from where can I get the download..?? TIA. Regards, Asrarahmed -- http://mail.python.org/mailman/listinfo/python-list

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-07 Thread Ross Ridge
Joe Seigh wrote: > Basically there's a race condition where an object containing the > refcount can be deleted between the time you load a pointer to > the object and the time you increment what used to be a refcount > and is possibly something else but definitely undefined. That doesn't really ma

ftplib security support

2006-11-07 Thread vedran
Hello, One simple question.Which security ftplib support,and how to I 'load' these security to ftputil. (Please don't give me security modules) e.g. ftp=FTPHost('myhost','myusername','mypassword',session_factory=ftplib.FTP) is this example well? (for loading ftplib security to ftputil)

But it was yesterday here!

2006-11-07 Thread Sorin Schwimmer
(the quote is from 'Le gendarme et les extra-terrestres', a must-see Frech comedy)Hi All,I'm trying to use the smtplib - I did it so many times already. The import statement fails, as theSMTP name cannot be imported. Digging more, I found that SMTP fails becauseemail.base64MIME cannot be imported (

Re: Plot pkg - Multiple Y axes?

2006-11-07 Thread [EMAIL PROTECTED]
You can try matplotlib. It allows multiple plots in one window. To get the correct rendering of the axis layout needs probably some handwork, but it should be possible. Two axis are not a problem at all. Got through the examples and take a look at the wiki cookbook. All is available at http://matpl

Re: sound processing modules in python - anyone?

2006-11-07 Thread [EMAIL PROTECTED]
Hi, you might want to take a look at pyaudio. A module to read and write audio files. It is based on numpy and wraps the libsndfile library to use it from python. With the capabilites of numpy and scipy you probably have all you need. Here's a link to pyaudio http://www.ar.media.kyoto-u.ac.jp/mem

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-07 Thread Joe Seigh
Ross Ridge wrote: > Joe Seigh wrote: > >>Basically there's a race condition where an object containing the >>refcount can be deleted between the time you load a pointer to >>the object and the time you increment what used to be a refcount >>and is possibly something else but definitely undefined.

Re: shutil: permission denied errors on windows

2006-11-07 Thread John Henry
Okay, it's always good that strange things are repeatable and happens with simple scripts. Are you saying "a" is a folder? So, the failure is only with copying folder? Not individual file? Antoine De Groote wrote: > Yes it's strange, I never had the problem before, either. It seems now > to b

Re: But it was yesterday here!

2006-11-07 Thread Gabriel Genellina
At Tuesday 7/11/2006 13:24, Sorin Schwimmer wrote: I'm trying to use the smtplib - I did it so many times already. The import statement fails, as the SMTP name cannot be imported. Digging more, I found that SMTP fails because email.base64MIME cannot be imported (ImportError:No module named base

ChiPy Monthly Meeting, Thursday 7:00 pm.

2006-11-07 Thread bray
Thursday November 9 2006. 7:00 pm. This may be our best meeting yet. This is our regular Thurs. meeting. In addition stay tuned for a special meeting to welcome Ed Leafe http://chipy.org/EdOnDabo. Please ping the list to tell us what you want to address in your lightning talk. Lets try to get on

ChiPy (Special) Meeting, Tuesday 14th 5:30 pm.

2006-11-07 Thread bray
NOTE: This is a special meeting on next Tuesday in addition to our normal Thursday meeting. Attend both, if you can. Tuesday. November 14 2006. 5:30 pm. Topics -- Ed Leaf on Dabo is an open-source framework for developing desktop (i.e., rich client) applications in Python. Details ==

Re: shutil: permission denied errors on windows

2006-11-07 Thread Antoine De Groote
Yes, that's exactly what was the case... But see my other post, that straightens things up... Thanks! antoine John Henry wrote: > Okay, it's always good that strange things are repeatable and happens > with simple scripts. > > Are you saying "a" is a folder? So, the failure is only with copyi

Re: shutil: permission denied errors on windows

2006-11-07 Thread Antoine De Groote
Thanks for your replies, guys. I found the problem now. Actually the problem arised just before the code that I had in my original post. Here are the 2 lines that mess things up. It's those that are commented out. If not commented, the errors were raised. Clearly there is an error in the secon

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-07 Thread Ross Ridge
Ross Ridge wrote: > That doesn't really make sense. The object can't be deleted because > the thread should already have a reference (directly or indirectly) to > the object, otherwise any access to it can cause the race condition you > describe. Joe Seigh wrote: > True but if the thread didn't a

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-07 Thread Martin v. Löwis
Ross Ridge schrieb: > The thread that shares it increments the reference count before passing > its address to directly another thread or indirectly through a shared > container. To make a specific example, consider this fragment from Objects/fileobject.c: static PyObject * file_repr(PyFileObject

Re: [DLC] ChiPy Monthly Meeting, Thursday 7:00 pm.

2006-11-07 Thread Steve Holden
I don't suppose there's any chance that someone might be passing Schaumberg on their way to this meeting? I'm teaching there, and a ride would avoid me having to rent a car (and hence increase the probability I'd make it). regards Steve [EMAIL PROTECTED] wrote: > Thursday November 9 2006. 7:

But it was yesterday here!

2006-11-07 Thread Sorin Schwimmer
> I bet you have an email.py somewhere in your sources... You won the bet. I owe you one :-)Thanks,Sorin-- http://mail.python.org/mailman/listinfo/python-list

os.path.exists and unicode filenames

2006-11-07 Thread Peter Bienstman
Hi, I'm trying to add support for unicode file names to my application. I'm running into problems with e.g. the os.path.exists routine, which complains if it gets passed a unicode string: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/mnemosyne/pyqt_ui/main_dlg.py",

Re: assigning values in __init__

2006-11-07 Thread John Salerno
John Salerno wrote: > Is this a good way to assign the values to the different attributes? > Should 'stats' be a list/tuple (like this), or should I do *stats instead? Thanks guys! The main suggestion seems to be to use setattr(), so I might give that a try. But I do like Steve's suggestion tha

object data member dumper?

2006-11-07 Thread tom arnall
does anyone know of a utility to do a recursive dump of object data members? -- Posted via a free Usenet account from http://www.teranews.com -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.exists and unicode filenames

2006-11-07 Thread Martin v. Löwis
Peter Bienstman schrieb: > UnicodeEncodeError: 'ascii' codec can't encode characters in position 24-29: > ordinal not in range(128) > > I could try encoding the string in utg-8, but then it wouldn't work under > Windows. > > Is there an elegant cross-platform solution for this? I assume you ar

Character encoding

2006-11-07 Thread mp
I have html document titles with characters like >,  , and ‡. How do I decode a string with these values in Python? Thanks -- http://mail.python.org/mailman/listinfo/python-list

C wrapper

2006-11-07 Thread Sheldon
Hi, Can anyone give me some idea as to what this error means? "ImportError: dynamic module does not define init function " I am new at this and there is still a lot to learn. Any help is appreciated, /Sheldon -- http://mail.python.org/mailman/listinfo/python-list

Re: Character encoding

2006-11-07 Thread i80and
I would suggest using string.replace. Simply replace ' ' with ' ' for each time it occurs. It doesn't take too much code. On Nov 7, 1:34 pm, "mp" <[EMAIL PROTECTED]> wrote: > I have html document titles with characters like >,  , and > ‡. How do I decode a string with these values in Python? >

changing sequence to array

2006-11-07 Thread [EMAIL PROTECTED]
Hi, I am using the code given below where A is a matrix and row is a sequence. But it gives following error: error-- A[a,:]=row ValueError: setting an array element with a sequence. --code #!/usr/bin/python import numpy file1 = open('matrix.txt', 'r')

Re: __init__ function problem

2006-11-07 Thread Carl Banks
kelin,[EMAIL PROTECTED] wrote: > It says the __init__ is called immediately after an instance of the > class is created. What dose "immediately" mean? > And what is difference between the init method and the constructor in > Java? For all intents and purposes, __init__ is a constructor. It isn't

Re: C wrapper

2006-11-07 Thread Farshid Lashkari
Sheldon wrote: > Can anyone give me some idea as to what this error means? > > "ImportError: dynamic module does not define init function " > > I am new at this and there is still a lot to learn. > > Any help is appreciated, Take a look at the documentation for creating extension modules, espe

Tired of spam, unrelated email?

2006-11-07 Thread JFletcher
Post you questions on the python forum at http://www.thescripts.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-07 Thread Ross Ridge
Martin v. Löwis wrote: > How would you propose to fix file_repr to prevent such > a race condition? The race condition you describe is different from the one Joe Seigh described. It's caused because without GIL access to the file object is no longer thread safe, not because reference counting is

Re: Character encoding

2006-11-07 Thread mp
I'd prefer a more generalized solution which takes care of all possible ampersand characters. I assume that there is code already written which does this. Thanks i80and wrote: > I would suggest using string.replace. Simply replace ' ' with ' ' > for each time it occurs. It doesn't take too much

Re: C wrapper

2006-11-07 Thread Sheldon
Farshid Lashkari skrev: > Sheldon wrote: > > Can anyone give me some idea as to what this error means? > > > > "ImportError: dynamic module does not define init function " > > > > I am new at this and there is still a lot to learn. > > > > Any help is appreciated, > > Take a look at the documenta

Re: C wrapper

2006-11-07 Thread Robert Kern
Sheldon wrote: > This function is there and is called init_mymodule() but I have other > functions that are not static. Is the module's name "_mymodule"? Or is it "mymodule"? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by o

Re: Character encoding

2006-11-07 Thread Gabriel Genellina
At Tuesday 7/11/2006 17:10, mp wrote: I'd prefer a more generalized solution which takes care of all possible ampersand characters. I assume that there is code already written which does this. Try the htmlentitydefs module -- Gabriel Genellina Softlab SRL _

Re: Tired of spam, unrelated email?

2006-11-07 Thread skip
Tired of spam, unrelated email? You mean, like your message? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: C wrapper

2006-11-07 Thread Sheldon
Robert Kern skrev: > Sheldon wrote: > > > This function is there and is called init_mymodule() but I have other > > functions that are not static. > > Is the module's name "_mymodule"? Or is it "mymodule"? > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harml

Re: C wrapper

2006-11-07 Thread Gabriel Genellina
At Tuesday 7/11/2006 17:10, Sheldon wrote: > Take a look at the documentation for creating extension modules, > especially the following page: > > http://docs.python.org/ext/methodTable.html > > "The initialization function must be named initname(), where name is the > name of the module, and sh

Re: ctypes, python 2.5, WinFunctionType and _as_parameter_

2006-11-07 Thread Thomas Heller
[EMAIL PROTECTED] schrieb: > Hello, > > how to get at the function address of a WinFunctionType ctypes object ? > With ctypes 1.0, I used just myfunc._as_parameter_ and all was well. > With ctypes 1.0.1, that ships with python 2.5, WinFunctionType has no > longer an _as_parameter_ attribute I thi

Re: C wrapper

2006-11-07 Thread Gabriel Genellina
At Tuesday 7/11/2006 17:27, Sheldon wrote: Here is the file/module name: _msgpps_functions.c Here is the initfunction: PyMODINIT_FUNC init_msgpps_functions(void) { PyObject* m; m=Py_InitModule("_msgpps_functions",_msgpps_functionsMethods); ErrorObject = PyString_FromString("_msgpps_functi

Re: C wrapper

2006-11-07 Thread Sheldon
Hi, > For a module called foo.c the initialization function must be called > initfoo (*not* init_foo) Ok, I fixed this part. Thanks > And what are those non-static functions used for? The *only* purpose > of your module should be to provide the Python bindings... I wrote the C module to do so

Re: C wrapper

2006-11-07 Thread Sheldon
Gabriel Genellina skrev: > At Tuesday 7/11/2006 17:27, Sheldon wrote: > > >Here is the file/module name: _msgpps_functions.c > >Here is the initfunction: > > > >PyMODINIT_FUNC init_msgpps_functions(void) { > > PyObject* m; > > m=Py_InitModule("_msgpps_functions",_msgpps_functionsMethods); > >

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-07 Thread Martin v. Löwis
Ross Ridge schrieb: > Martin v. Löwis wrote: >> How would you propose to fix file_repr to prevent such >> a race condition? > > The race condition you describe is different from the one Joe Seigh > described. It's caused because without GIL access to the file object > is no longer thread safe, no

sqlite query not working

2006-11-07 Thread John Salerno
Hopefully this is enough code to reveal the problem. When I run the program, there are no error messages produced, it's just that the values I enter don't seem to get put into the database, even though the query seems to be ok. def OnSaveRecord(self, event): textfield_values = []

More elegant way to obtain ACLs / permissions for windows directories than using "cacls" dos command?

2006-11-07 Thread dananrg
Is there a standard library module in Python 2.4 (Win32) that will return directory permissions / ACLs (e.g. users, groups, and what rights they have)? Otherwise, I'm faced with sending "cacls dirName" commands via os.popen as below, and then parsing and comparing the text output. Basically, I'd

Re: object data member dumper?

2006-11-07 Thread Bruno Desthuilliers
tom arnall a écrit : > does anyone know of a utility to do a recursive dump of object data members? > What are "object data members" ? (hint: in Python, everything is an object - even functions and methods). What is your real use case ? -- http://mail.python.org/mailman/listinfo/python-list

Dr. Dobb's Python-URL! - weekly Python news and links (Nov 7)

2006-11-07 Thread Cameron Laird
QOTW: "If you want to become a good Python programmer, you really need to get over that 'I need a oneliner' idea." - Fredrik Lundh http://groups.google.com/group/comp.lang.python/msg/9e10957173a20e73 "It is the shortsightedness of the Python core developers that keeps the palindrome related f

Re: sqlite query not working

2006-11-07 Thread Steve Holden
John Salerno wrote: > Hopefully this is enough code to reveal the problem. When I run the > program, there are no error messages produced, it's just that the values > I enter don't seem to get put into the database, even though the query > seems to be ok. > > > def OnSaveRecord(self, even

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-07 Thread Joe Seigh
Martin v. Löwis wrote: > You still didn't say what you would suggest to make it thread-safe > again; most likely, you proposal would be to add locking. If I > understand Joe's approach correctly, he has a solution that does > not involve locking (although I don't understand how it works). > Sun ha

Re: sqlite query not working

2006-11-07 Thread John Salerno
Steve Holden wrote: > Have you tried adding a self.connection.commit() to the code? I don't > know whether sqlite is transactional, but if it is then the changes will > disappear without a commit. Wow, that worked! Now, I know I've done some DB work before (very similar to this) and never used

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Nov 7)

2006-11-07 Thread John Salerno
Cameron Laird wrote: > Fredrik Lundh collects pyidioms: > http://effbot.org/zone/python-lists.htm Not working? -- http://mail.python.org/mailman/listinfo/python-list

Re: sound processing modules in python - anyone?

2006-11-07 Thread Christian Aastorp
On Mon, 6 Nov 2006 23:06:18 +0100 (CET), [EMAIL PROTECTED] wrote: >Hi everyone, >I'm looking for a module for sound processing (manipulating sound objets, >filters, ffts etc.). >I tried Snack, but when i downloaded the package that was supposed to be >for python, there was only the Tk/Tcl stuff (w

Re: sqlite query not working

2006-11-07 Thread Tim Chase
>> Have you tried adding a self.connection.commit() to the >> code? I don't know whether sqlite is transactional, but if >> it is then the changes will disappear without a commit. > > Wow, that worked! Now, I know I've done some DB work before > (very similar to this) and never used commit(), so I

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-07 Thread Chaz Ginger
Joe Seigh wrote: > Martin v. Löwis wrote: >> You still didn't say what you would suggest to make it thread-safe >> again; most likely, you proposal would be to add locking. If I >> understand Joe's approach correctly, he has a solution that does >> not involve locking (although I don't understand h

Re: sqlite query not working

2006-11-07 Thread John Salerno
Tim Chase wrote: > I tinkered with the mx.ODBC drivers a bit and had a similar > difficulty until I realized that it was configured to *not* > autocommit. At least in the mx.ODBC drivers, you can pass a > param ("clear_auto_commit=1") to the Connect() call to restore > "normal" autocommiting beha

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Nov 7)

2006-11-07 Thread Leonhard Vogt
John Salerno schrieb: > Cameron Laird wrote: > >> Fredrik Lundh collects pyidioms: >> http://effbot.org/zone/python-lists.htm > > Not working? Try http://effbot.org/zone/python-list.htm Leonhard -- http://mail.python.org/mailman/listinfo/python-list

Re: Pyro stability

2006-11-07 Thread Carl J. Van Arsdall
Paul Boddie wrote: > Beliavsky wrote: > >> Carl J. Van Arsdall wrote: >> > > [Enthusiasm for Pyro, not for those with sensitivity to rude words] > > >> You should watch your language in a forum with thousands of readers. >> I think you should find better things to complain about and

Re: Dr. Dobb's Python-URL! - weekly Python news and links (Nov 7)

2006-11-07 Thread Chris Lambacher
On Tue, Nov 07, 2006 at 04:15:39PM -0500, John Salerno wrote: > Cameron Laird wrote: > > > Fredrik Lundh collects pyidioms: > > http://effbot.org/zone/python-lists.htm > > Not working? perhaps http://effbot.org/zone/python-list.htm ? -- http://mail.python.org/mailman/listinfo/python-lis

Re: Exploiting Dual Core's with Py_NewInterpreter's separated GIL ?

2006-11-07 Thread Shane Hathaway
robert wrote: > I'd like to use multiple CPU cores for selected time consuming Python > computations (incl. numpy/scipy) in a frictionless manner. > > Interprocess communication is tedious and out of question, so I > thought about simply using a more Python interpreter instances > (Py_NewInterpret

Re: sqlite query not working

2006-11-07 Thread BartlebyScrivener
John Salerno wrote: >> Ah well, I'm sure there was *something* different Are you sure that it's not you were doing SELECT before, as opposed to INSERT? rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Tired of spam, unrelated email?

2006-11-07 Thread Steven D'Aprano
On Tue, 07 Nov 2006 14:28:00 -0600, skip wrote: > Tired of spam, unrelated email? > > You mean, like your message? You know what is really funny? Due to the vagaries of Usenet, I never received the original piece of spam at all, so if you hadn't replied to it, I never would have been bother

Compiling python 2.5 on OS X 10.4.8 with bsddb support

2006-11-07 Thread Yi Qiang
Hi guys, I am trying to compile python 2.5 on my OSX machine so it includes the bsddb module. Currently, when I type 'import bsddb' I get the following traceback: /Users/yi/Software/sage-1.4.1.2/local/lib/python2.5/bsddb/__init__.py in () 49 from bsddb3.dbutils import DeadlockWrap as

Re: Tired of spam, unrelated email?

2006-11-07 Thread BartlebyScrivener
Steven D'Aprano wrote: > Due to the vagaries of Usenet, > I never received the original piece of spam > at all Same here. I do all of my persuing via Google Groups, and sometimes the same thing happens in a legitimate thread. I see somebody responding as the fist message in the thread, but I neve

Re: C wrapper

2006-11-07 Thread Gabriel Genellina
At Tuesday 7/11/2006 17:43, Sheldon wrote: > And what are those non-static functions used for? The *only* purpose > of your module should be to provide the Python bindings... I wrote the C module to do some number crunching. Now I just need to "connect" it to my python program. Should the initm

Re: Pyro stability

2006-11-07 Thread Steve Holden
Carl J. Van Arsdall wrote: > Paul Boddie wrote: > >>Beliavsky wrote: >> >> >>>Carl J. Van Arsdall wrote: >>> >> >>[Enthusiasm for Pyro, not for those with sensitivity to rude words] >> >> >> >>>You should watch your language in a forum with thousands of readers. >>> > > I think you sh

Re: Unicode/ascii encoding nightmare

2006-11-07 Thread Cliff Wells
On Tue, 2006-11-07 at 08:10 +0200, Hendrik van Rooyen wrote: > "John Machin" <[EMAIL PROTECTED]> wrote: > > 8<--- > > > I strongly suggest that you read the docs *FIRST*, and don't "tinker" > > at all. > > > This is *good* advice - its unlikely to be followed

Finding Nonzero Elements in a Sparse Matrix

2006-11-07 Thread deLenn
Hi, Does scipy have an equivalent to Matlab's 'find' function, to list the indices of all nonzero elements in a sparse matrix? Cheers. -- http://mail.python.org/mailman/listinfo/python-list

Re: object data member dumper?

2006-11-07 Thread Steve Holden
Bruno Desthuilliers wrote: > tom arnall a écrit : > >>does anyone know of a utility to do a recursive dump of object data members? >> > > > What are "object data members" ? (hint: in Python, everything is an > object - even functions and methods). > > What is your real use case ? Basically i

Re: object data member dumper?

2006-11-07 Thread tom arnall
Bruno Desthuilliers wrote: > tom arnall a écrit : >> does anyone know of a utility to do a recursive dump of object data >> members? >> > > What are "object data members" ? (hint: in Python, everything is an > object - even functions and methods). > > What is your real use case ? something lik

  1   2   >