EPD 6.1 Upcoming Webinars

2010-03-02 Thread Amenity Applewhite
March is shaping up to be as busy as ever: planning SciPy 2010 (http://conference.scipy.org/scipy2010 ), two great webinars...and a new release of EPD! *Enthought Python Distribution 6.1* In EPD 6.1, NumPy and SciPy are dynamically linked against the MKL linear algebra routines. This allows

OSSCamp Chandigarh April 2010 - Open Source Is The Future

2010-03-02 Thread Rishabh Verma
Hello All, OSSCamp is again being organized in Chandigarh on April 10, 2010. This is another step ahead to foster the open source community in the city beautiful. This event is a purely community organized event by some of the open source evangelists of Chandigarh and it would be great if you

Re: How to find an COM object in using of pywin32

2010-03-02 Thread Alf P. Steinbach
* Steven Woody: Hi, I want to interactive with an OLE application with pywin32. The problem is I get totally no idea how to find the object in OLEView and how to figure out it's interface. With pywin32's example, I even don't understand that in the below statement,

Re: Method / Functions - What are the differences?

2010-03-02 Thread Bruno Desthuilliers
John Posner a écrit : On 3/1/2010 2:59 PM, Bruno Desthuilliers wrote: Answer here: http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/bd71264b6022765c/3a77541bf9d6617d#doc_89d608d0854dada0 I really have to put this in the wiki :-/ Bruno, I performed a light

learn ajax

2010-03-02 Thread groups_ads12
ajax.learn.net.in http://www.ajax.learn.net.in/ afc ajax http://www.ajax.learn.net.in/videos/index.php?search=afc+ajax ajax http://www.ajax.learn.net.in/videos/index.php?search=ajax ajax and php http://www.ajax.learn.net.in/videos/index.php?search=ajax+and+php ajax and php building responsive

Re: Draft PEP on RSON configuration file format

2010-03-02 Thread Daniel Fetchinson
But you are working on a solution in search of a problem. The really smart thing to do would be pick something more useful to work on. We don't need another configuration language. I can't even say yet another because there's already a yet another called yaml. And in case you are new

Re: Adding to a module's __dict__?

2010-03-02 Thread Jean-Michel Pichavant
Roy Smith wrote: From inside a module, I want to add a key-value pair to the module's __dict__. I know I can just do: FOO = 'bar' at the module top-level, but I've got 'FOO' as a string and what I really need to do is __dict__['Foo'] = 'bar' When I do that, I get NameError: name '__dict__'

Re: (and about tests) Re: Pedantic pickling error after reload?

2010-03-02 Thread Robert
well, reloading is the thing which I do most in coding practice :-) For me its a basic thing like cell proliferation in biology. I simply never do it. It has subtle issues, one of them you found, others you say you work around by introducing actual frameworks. But you might well forget some

Call Signtool using python

2010-03-02 Thread enda man
Hi, I want to call the Windows signtool to sign a binary from a python script. Here is my script: // os.chdir('./Install/activex/cab') subprocess.call([signtool, sign, /v, /f, webph.pfx, /t, http://timestamp.verisign.com/scripts/timstamp.dll;, WebPh.exe ]) // But I am getting this error:

Re: Verifying My Troublesome Linkage Claim between Python and Win7

2010-03-02 Thread alex23
W. eWatson wolftra...@invalid.com wrote: My claim is that if one creates a program in a folder that reads a file in the folder it and then copies it to another folder, it will read  the data file in the first folder, and not a changed file in the new folder. I'd appreciate it if some w7 users

Re: How to use python to register a service (an existing .exe file)

2010-03-02 Thread coldpizza
instsrv.exe does not come with Windows by default, but I guess it should be possible to add a service using the win32 built-in `sc` command line tool. Try `sc create` from a console. The app you want to install as a service will still have to be compliant with the win32 service interface,

Re: Adding to a module's __dict__?

2010-03-02 Thread Roy Smith
In article mailman.96.1267508316.23598.python-l...@python.org, Chris Rebert c...@rebertia.com wrote: On Mon, Mar 1, 2010 at 8:27 PM, Roy Smith r...@panix.com wrote: From inside a module, I want to add a key-value pair to the module's __dict__.  I know I can just do: FOO = 'bar' at

Re: Adding to a module's __dict__?

2010-03-02 Thread Steve Holden
Roy Smith wrote: In article mailman.96.1267508316.23598.python-l...@python.org, Chris Rebert c...@rebertia.com wrote: On Mon, Mar 1, 2010 at 8:27 PM, Roy Smith r...@panix.com wrote: From inside a module, I want to add a key-value pair to the module's __dict__. Â I know I can just do: FOO

Re: Method / Functions - What are the differences?

2010-03-02 Thread John Posner
On 3/2/2010 3:57 AM, Bruno Desthuilliers wrote: With the instance object (if any) and class object available, it's easy to create a method object that wraps the function object. That's perfect. Fixed. But there's also a typo to fix in the Python implementation of the Method object: in

os.fdopen() issue in Python 3.1?

2010-03-02 Thread Albert Hopkins
I have a snippet of code that looks like this: pid, fd = os.forkpty() if pid == 0: subprocess.call(args) else: input = os.fdopen(fd).read() ... This seems to work find for CPython 2.5 and 2.6 on my Linux system. However, with CPython 3.1 I

Re: Adding to a module's __dict__?

2010-03-02 Thread Mel
Roy Smith wrote: [ ... ] Why is it unwise? The use case is I'm importing a bunch of #define constants from a C header file. I've got triples that I want to associate; the constant name, the value, and a string describing it. The idea is I want to put in the beginning of the module:

RE: Call Signtool using python

2010-03-02 Thread Matt Mitchell
I think you need to use the /p switch to pass signtool.exe a password when using the /f switch. Check out http://msdn.microsoft.com/en-us/library/8s9b9yaz%28VS.80%29.aspx for more info. --- The information contained in this electronic message and any attached

Python training in Florida, April 27-29

2010-03-02 Thread Mark Lutz
Tired of the Winter weather? Make your plans now to attend our upcoming Florida Python training seminar in April. This 3-day public class will be held on April 27-29, in Sarasota, Florida. It is open to both individual and group enrollments. For more details on the class, as well as

Re: Adding to a module's __dict__?

2010-03-02 Thread Roy Smith
On Mar 2, 8:33 am, Steve Holden st...@holdenweb.com wrote: And how important is it to make sure that whatever data your program processes doesn't overwrite the actual variable names you want to use to program the processing? Oh, I see what you're saying. You're thinking I was going to

Email Script

2010-03-02 Thread Victor Subervi
Hi; I have the following code: def my_mail(): user, passwd, db, host = login() database = MySQLdb.connect(host, user, passwd, db) cursor= database.cursor() ourEmail1 = 'mari...@globalsolutionsgroup.vi' ourEmail1 = 'p...@globalsolutionsgroup.vi' ourEmail2 = 'benoismyn...@gmail.com'

Re: Email Script

2010-03-02 Thread Victor Subervi
On Tue, Mar 2, 2010 at 11:48 AM, Victor Subervi victorsube...@gmail.comwrote: Hi; I have the following code: def my_mail(): user, passwd, db, host = login() database = MySQLdb.connect(host, user, passwd, db) cursor= database.cursor() ourEmail1 = 'mari...@globalsolutionsgroup.vi'

Re: Adding to a module's __dict__?

2010-03-02 Thread Steve Holden
Roy Smith wrote: On Mar 2, 8:33 am, Steve Holden st...@holdenweb.com wrote: And how important is it to make sure that whatever data your program processes doesn't overwrite the actual variable names you want to use to program the processing? Oh, I see what you're saying. You're thinking

Re: Adding to a module's __dict__?

2010-03-02 Thread John Posner
On 3/2/2010 10:19 AM, Roy Smith wrote: Somewhat sadly, in my case, I can't even machine process the header file. I don't, strictly speaking, have a header file. What I have is a PDF which documents what's in the header file, and I'm manually re- typing the data out of that. Sigh. Here's an

Re: taking python enterprise level?...

2010-03-02 Thread Aahz
In article mailman.99.1267513003.23598.python-l...@python.org, D'Arcy J.M. Cain da...@druid.net wrote: Put as much memory as you can afford/fit into your database server. It's the cheapest performance boost you can get. If you have a serious application put at least 4GB into your dedicated

Queue peek?

2010-03-02 Thread Veloz
Hi all I'm looking for a queue that I can use with multiprocessing, which has a peek method. I've seen some discussion about queue.peek but don't see anything in the docs about it. Does python have a queue class with peek semantics? Michael --

freebsd and multiprocessing

2010-03-02 Thread Tim Arnold
Hi, I'm intending to use multiprocessing on a freebsd machine (6.3 release, quad core, 8cpus, amd64). I see in the doc that on this platform I can't use synchronize: ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed

Re: Draft PEP on RSON configuration file format

2010-03-02 Thread Robert Kern
On 2010-03-01 22:55 PM, Terry Reedy wrote: On 3/1/2010 7:56 PM, Patrick Maupin wrote: On Mar 1, 5:57 pm, Erik Max Francism...@alcyone.com wrote: Patrick Maupin wrote: This not only seriously stretching the meaning of the term superset (as Python is most definitely not even remotely a superset

Re: Is this secure?

2010-03-02 Thread Robert Kern
On 2010-02-28 01:28 AM, Aahz wrote: In articlemailman.247.1267115557.4577.python-l...@python.org, Robert Kernrobert.k...@gmail.com wrote: If you are storing the password instead of making your user remember it, most platforms have some kind of keychain secure password storage. I recommend

Re: Adding to a module's __dict__?

2010-03-02 Thread Carl Banks
On Mar 2, 5:21 am, Roy Smith r...@panix.com wrote: In article mailman.96.1267508316.23598.python-l...@python.org,  Chris Rebert c...@rebertia.com wrote: On Mon, Mar 1, 2010 at 8:27 PM, Roy Smith r...@panix.com wrote: From inside a module, I want to add a key-value pair to the module's

Re: freebsd and multiprocessing

2010-03-02 Thread Philip Semanchuk
On Mar 2, 2010, at 11:31 AM, Tim Arnold wrote: Hi, I'm intending to use multiprocessing on a freebsd machine (6.3 release, quad core, 8cpus, amd64). I see in the doc that on this platform I can't use synchronize: ImportError: This platform lacks a functioning sem_open implementation,

Re: Email Script

2010-03-02 Thread Victor Subervi
On Tue, Mar 2, 2010 at 11:53 AM, Victor Subervi victorsube...@gmail.comwrote: On Tue, Mar 2, 2010 at 11:48 AM, Victor Subervi victorsube...@gmail.comwrote: Hi; I have the following code: def my_mail(): user, passwd, db, host = login() database = MySQLdb.connect(host, user, passwd,

Re: Adding to a module's __dict__?

2010-03-02 Thread MRAB
John Posner wrote: On 3/2/2010 10:19 AM, Roy Smith wrote: Somewhat sadly, in my case, I can't even machine process the header file. I don't, strictly speaking, have a header file. What I have is a PDF which documents what's in the header file, and I'm manually re- typing the data out of

Re: os.fdopen() issue in Python 3.1?

2010-03-02 Thread MRAB
Albert Hopkins wrote: I have a snippet of code that looks like this: pid, fd = os.forkpty() if pid == 0: subprocess.call(args) else: input = os.fdopen(fd).read() ... This seems to work find for CPython 2.5 and 2.6 on my Linux system.

Re: Call Signtool using python

2010-03-02 Thread enda man
On Mar 2, 2:46 pm, Matt Mitchell mmitch...@transparent.com wrote: I think you need to use the /p switch to pass signtool.exe a password when using the /f switch. Check outhttp://msdn.microsoft.com/en-us/library/8s9b9yaz%28VS.80%29.aspxfor more info. --- The

Re: Adding to a module's __dict__?

2010-03-02 Thread Terry Reedy
On 3/2/2010 11:18 AM, John Posner wrote: On 3/2/2010 10:19 AM, Roy Smith wrote: Somewhat sadly, in my case, I can't even machine process the header file. I don't, strictly speaking, have a header file. What I have is a PDF which documents what's in the header file, and I'm manually re- typing

Re: Docstrings considered too complicated

2010-03-02 Thread Andreas Waldenburger
On Mon, 01 Mar 2010 21:09:39 + Mark Lawrence breamore...@yahoo.co.uk wrote: Andreas Waldenburger wrote: [snip] We did not buy code. If it were written in C or such, we would never get to see it. It's not our concern. /W From your original post. quote a company that

Re: Docstrings considered too complicated

2010-03-02 Thread Andreas Waldenburger
On Tue, 02 Mar 2010 09:48:47 +1100 Ben Finney ben+pyt...@benfinney.id.au wrote: It's not our concern. Then I don't see what that problem is. There is none. I was griping about how stupid they are. That is a personal problem I have with their *code* (not software), and I thought I'd just

conditional import into global namespace

2010-03-02 Thread mk
Hello everyone, I have a class that is dependent on subprocess functionality. I would like to make it self-contained in the sense that it would import subprocess if it's not imported yet. What is the best way to proceed with this? I see a few possibilities: 1. do a class level import,

case do problem

2010-03-02 Thread Tracubik
hi, i've to convert from Pascal this code: iterations=0; count=0; REPEAT; iterations = iterations+1; ... IF (genericCondition) THEN count=count+1; ... CASE count OF: 1: m = 1 2: m = 10 3: m = 100 UNTIL count = 4 OR iterations = 20 i do something like this:

Broken references in postings

2010-03-02 Thread Grant Edwards
I've noticed recently that a lot of the refernces and in-reply-to headers in c.l.p are broken, resulting in the inability to move from a child to a parent in a tree. For example in a recent reply (subejct: os.fdopen() issue in Python 3.1?), the references and in-reply-to headers both contained:

Re: case do problem

2010-03-02 Thread Tracubik
additional information: when count=4 i haven't to change the m value, so i have to do nothing or something like m = m Nico -- http://mail.python.org/mailman/listinfo/python-list

Re: Call Signtool using python

2010-03-02 Thread Chris Rebert
On Tue, Mar 2, 2010 at 3:34 AM, enda man emann...@gmail.com wrote: Hi, I want to call the Windows signtool to sign a binary from a python script. Here is my script: // os.chdir('./Install/activex/cab') subprocess.call([signtool, sign, /v, /f, webph.pfx, /t,

Re: Draft PEP on RSON configuration file format

2010-03-02 Thread Terry Reedy
On 3/2/2010 11:34 AM, Robert Kern wrote: On 2010-03-01 22:55 PM, Terry Reedy wrote: On 3/1/2010 7:56 PM, Patrick Maupin wrote: On Mar 1, 5:57 pm, Erik Max Francism...@alcyone.com wrote: Patrick Maupin wrote: This not only seriously stretching the meaning of the term superset (as Python is

Re: freebsd and multiprocessing

2010-03-02 Thread Tim Arnold
On Mar 2, 11:52 am, Philip Semanchuk phi...@semanchuk.com wrote: On Mar 2, 2010, at 11:31 AM, Tim Arnold wrote: Hi, I'm intending to use multiprocessing on a freebsd machine (6.3 release, quad core, 8cpus, amd64). I see in the doc that on this platform I can't use synchronize:

Re: case do problem

2010-03-02 Thread Alf P. Steinbach
* Tracubik: hi, i've to convert from Pascal this code: iterations=0; count=0; REPEAT; iterations = iterations+1; ... IF (genericCondition) THEN count=count+1; ... CASE count OF: 1: m = 1 2: m = 10 3: m = 100 Uhm, is this syntactically valid Pascal? As I

Re: case do problem

2010-03-02 Thread Alf P. Steinbach
* Alf P. Steinbach: * Tracubik: hi, i've to convert from Pascal this code: iterations=0; count=0; REPEAT; iterations = iterations+1; ... IF (genericCondition) THEN count=count+1; ... CASE count OF: 1: m = 1 2: m = 10 3: m = 100 Uhm, is this syntactically valid

Re: case do problem

2010-03-02 Thread Alf P. Steinbach
* Alf P. Steinbach: * Alf P. Steinbach: * Tracubik: hi, i've to convert from Pascal this code: iterations=0; count=0; REPEAT; iterations = iterations+1; ... IF (genericCondition) THEN count=count+1; ... CASE count OF: 1: m = 1 2: m = 10 3: m = 100 Uhm, is this

Re: Docstrings considered too complicated

2010-03-02 Thread Jean-Michel Pichavant
Andreas Waldenburger wrote: On Tue, 02 Mar 2010 09:48:47 +1100 Ben Finney ben+pyt...@benfinney.id.au wrote: It's not our concern. Then I don't see what that problem is. There is none. I was griping about how stupid they are. That is a personal problem I have with their

Re: Queue peek?

2010-03-02 Thread Raymond Hettinger
On Mar 2, 8:29 am, Veloz michaelve...@gmail.com wrote: Hi all I'm looking for a queue that I can use with multiprocessing, which has a peek method. I've seen some discussion about queue.peek but don't see anything in the docs about it. Does python have a queue class with peek semantics?

Re: conditional import into global namespace

2010-03-02 Thread MRAB
mk wrote: Hello everyone, I have a class that is dependent on subprocess functionality. I would like to make it self-contained in the sense that it would import subprocess if it's not imported yet. What is the best way to proceed with this? I see a few possibilities: 1. do a class level

Re: os.fdopen() issue in Python 3.1?

2010-03-02 Thread Terry Reedy
On 3/2/2010 9:24 AM, Albert Hopkins wrote: I have a snippet of code that looks like this: pid, fd = os.forkpty() if pid == 0: subprocess.call(args) else: input = os.fdopen(fd).read() ... This seems to work find for CPython 2.5 and

Re: case do problem

2010-03-02 Thread MRAB
Tracubik wrote: hi, i've to convert from Pascal this code: iterations=0; count=0; REPEAT; iterations = iterations+1; ... IF (genericCondition) THEN count=count+1; ... CASE count OF: 1: m = 1 2: m = 10 3: m = 100 UNTIL count = 4 OR iterations = 20 i do

Re: conditional import into global namespace

2010-03-02 Thread Jerry Hill
On Tue, Mar 2, 2010 at 12:46 PM, mk mrk...@gmail.com wrote: Hello everyone, I have a class that is dependent on subprocess functionality. I would like to make it self-contained in the sense that it would import subprocess if it's not imported yet. What is the best way to proceed with this?

Re: Email Script

2010-03-02 Thread mk
Where do you take class Email from? There's no info in your mail on this. Regards, mk -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing an assembler in Python

2010-03-02 Thread Albert van der Horst
In article xns9d28186af890cfdnbgui7uhu5h8hrn...@127.0.0.1, Giorgos Tzampanakis g...@hw.ac.uk wrote: I'm implementing a CPU that will run on an FPGA. I want to have a (dead) simple assembler that will generate the machine code for me. I want to use Python for that. Are there any libraries that can

Re: freebsd and multiprocessing

2010-03-02 Thread Tim Arnold
On Mar 2, 12:59 pm, Tim Arnold a_j...@bellsouth.net wrote: On Mar 2, 11:52 am, Philip Semanchuk phi...@semanchuk.com wrote: On Mar 2, 2010, at 11:31 AM, Tim Arnold wrote: Hi, I'm intending to use multiprocessing on a freebsd machine (6.3 release, quad core, 8cpus, amd64). I see in the

Re: Email Script

2010-03-02 Thread Victor Subervi
On Tue, Mar 2, 2010 at 12:56 PM, Victor Subervi victorsube...@gmail.comwrote: On Tue, Mar 2, 2010 at 11:53 AM, Victor Subervi victorsube...@gmail.comwrote: On Tue, Mar 2, 2010 at 11:48 AM, Victor Subervi victorsube...@gmail.comwrote: Hi; I have the following code: def my_mail():

Re: Draft PEP on RSON configuration file format

2010-03-02 Thread Robert Kern
On 2010-03-02 11:59 AM, Terry Reedy wrote: On 3/2/2010 11:34 AM, Robert Kern wrote: On 2010-03-01 22:55 PM, Terry Reedy wrote: On 3/1/2010 7:56 PM, Patrick Maupin wrote: On Mar 1, 5:57 pm, Erik Max Francism...@alcyone.com wrote: Patrick Maupin wrote: This not only seriously stretching the

Re: Queue peek?

2010-03-02 Thread Veloz
On Mar 2, 1:18 pm, Raymond Hettinger pyt...@rcn.com wrote: On Mar 2, 8:29 am, Veloz michaelve...@gmail.com wrote: Hi all I'm looking for a queue that I can use with multiprocessing, which has a peek method. I've seen some discussion about queue.peek but don't see anything in the docs

Re: freebsd and multiprocessing

2010-03-02 Thread Philip Semanchuk
On Mar 2, 2010, at 1:31 PM, Tim Arnold wrote: On Mar 2, 12:59 pm, Tim Arnold a_j...@bellsouth.net wrote: On Mar 2, 11:52 am, Philip Semanchuk phi...@semanchuk.com wrote: On Mar 2, 2010, at 11:31 AM, Tim Arnold wrote: Hi, I'm intending to use multiprocessing on a freebsd machine (6.3

Re: Draft PEP on RSON configuration file format

2010-03-02 Thread Patrick Maupin
On Mar 2, 11:59 am, Terry Reedy tjre...@udel.edu wrote: To me, comparing object notation with programming language is not helpful to the OP's purpose. Yes, I agree, it was a distraction. I fell into the trap of responding to the ludicrous claim that if X is a superset of Y, then X cannot

Re: Queue peek?

2010-03-02 Thread MRAB
Veloz wrote: On Mar 2, 1:18 pm, Raymond Hettinger pyt...@rcn.com wrote: On Mar 2, 8:29 am, Veloz michaelve...@gmail.com wrote: Hi all I'm looking for a queue that I can use with multiprocessing, which has a peek method. I've seen some discussion about queue.peek but don't see anything in the

Re: Queue peek?

2010-03-02 Thread Martin P. Hellwig
On 03/02/10 19:44, MRAB wrote: cut information, such as when it was completed, the status (OK or failed), etc. You might want to wrap it in a class with locks (mutexes) to ensure it's threadsafe. What actually happens if multiple threads at the same time, write to a shared dictionary (Not using

Re: os.fdopen() issue in Python 3.1?

2010-03-02 Thread Albert Hopkins
On Tue, 2010-03-02 at 13:25 -0500, Terry Reedy wrote: To get help, or report a bug, for something like this, be as specific as possible. 'Linux' may be too generic. This is on Python on Gentoo Linux x64 with kernel 2.6.33. However, with CPython 3.1 I get: input =

Re: os.fdopen() issue in Python 3.1?

2010-03-02 Thread Albert Hopkins
On Tue, 2010-03-02 at 17:32 +, MRAB wrote: The documentation also mentions the 'pty' module. Have you tried that instead? I haven't but I'll give it a try. Thanks. -a -- http://mail.python.org/mailman/listinfo/python-list

Re: Queue peek?

2010-03-02 Thread Daniel Stutzbach
On Tue, Mar 2, 2010 at 1:58 PM, Martin P. Hellwig martin.hell...@dcuktec.org wrote: What actually happens if multiple threads at the same time, write to a shared dictionary (Not using the same key)? All of Python's built-in types are thread safe. Both updates will happen. -- Daniel

Re: conditional import into global namespace

2010-03-02 Thread mk
Jerry Hill wrote: Just import subprocess at the top of your module. If subprocess hasn't been imported yet, it will be imported when your module is loaded. If it's already been imported, your module will use the cached version that's already been imported. In other words, it sounds like

Re: freebsd and multiprocessing

2010-03-02 Thread Pop User
On 3/2/2010 12:59 PM, Tim Arnold wrote: I'll write some test programs using multiprocessing and see how they go before committing to rewrite my current code. I've also been looking at 'parallel python' although it may have the same issues. http://www.parallelpython.com/ parallelpython

Re: cpan for python?

2010-03-02 Thread R Fritz
On 2010-02-28 06:31:56 -0800, sstein...@gmail.com said: On Feb 28, 2010, at 9:28 AM, Someone Something wrote: Is there something like cpan for python? I like python's syntax, but Iuse perl because of cpan and the tremendous modules that it has. -- Please search the mailing list archives.

Re: Adding to a module's __dict__?

2010-03-02 Thread Dave Angel
Terry Reedy wrote: On 3/2/2010 11:18 AM, John Posner wrote: On 3/2/2010 10:19 AM, Roy Smith wrote: Somewhat sadly, in my case, I can't even machine process the header file. I don't, strictly speaking, have a header file. What I have is a PDF which documents what's in the header file, and I'm

Re: Docstrings considered too complicated

2010-03-02 Thread Ben Finney
Andreas Waldenburger use...@geekmail.invalid writes: Don't get me wrong; our whole system is more fragile than I find comfortable. But I guess getting 10ish different parties around the globe to work in complete unison is quite a feat, and I'm surprised it even works as it is. But it does,

Re: Broken references in postings

2010-03-02 Thread Ben Finney
Grant Edwards inva...@invalid.invalid writes: Or is it just individual news/mail clients that are broken? This, I believe. Many clients mess up the References and In-Reply-To fields, in the face of many years of complaint to the vendors. Most free-software clients get it right, AFAICT. -- \

Re: Writing an assembler in Python

2010-03-02 Thread Holger Mueller
Giorgos Tzampanakis g...@hw.ac.uk wrote: I'm implementing a CPU that will run on an FPGA. I want to have a (dead) simple assembler that will generate the machine code for me. I want to use Python for that. Are there any libraries that can help me with the parsing of the assembly code? Why

Multiprocessing problem

2010-03-02 Thread Matt Chaput
Hi, I'm having a problem with the multiprocessing package. I'm trying to use a simple pattern where a supervisor object starts a bunch of worker processes, instantiating them with two queues (a job queue for tasks to complete and an results queue for the results). The supervisor puts all the

CGI, POST, and file uploads

2010-03-02 Thread Mitchell L Model
Can someone tell me how to upload the contents of a (relatively small) file using an HTML form and CGI in Python 3.1? As far as I can tell from a half-day of experimenting, browsing, and searching the Python issue tracker, this is broken. Very simple example: html head /head body

Re: Queue peek?

2010-03-02 Thread mk
Daniel Stutzbach wrote: On Tue, Mar 2, 2010 at 1:58 PM, Martin P. Hellwig martin.hell...@dcuktec.org mailto:martin.hell...@dcuktec.org wrote: What actually happens if multiple threads at the same time, write to a shared dictionary (Not using the same key)? All of Python's built-in

Re: Docstrings considered too complicated

2010-03-02 Thread Andreas Waldenburger
On Tue, 02 Mar 2010 19:05:25 +0100 Jean-Michel Pichavant jeanmic...@sequans.com wrote: Andreas Waldenburger wrote: I had hoped that everyone just read it, went like Oh geez., smiled it off with a hint of lesson learned and got back to whatever it was they were doing. Alas, I was wrong

Re: Method / Functions - What are the differences?

2010-03-02 Thread Eike Welk
John Posner wrote: I've updated the text at this location: http://cl1p.net/bruno_0301.rst/ I think this is a very useful writeup! It would be perfect with a little bit of introduction that says: 1. - What it is: The rough details of method look-up; 2. - which contains some of the

Re: Queue peek?

2010-03-02 Thread John Krukoff
On Tue, 2010-03-02 at 22:54 +0100, mk wrote: snip No need to use synchro primitives like locks? I know that it may work, but that strikes me as somehow wrong... I'm used to using things like Lock().acquire() and Lock().release() when accessing shared data structures, whatever they are.

Re: Docstrings considered too complicated

2010-03-02 Thread Andreas Waldenburger
On Wed, 03 Mar 2010 08:22:40 +1100 Ben Finney ben+pyt...@benfinney.id.au wrote: Andreas Waldenburger use...@geekmail.invalid writes: Don't get me wrong; our whole system is more fragile than I find comfortable. But I guess getting 10ish different parties around the globe to work in

Verace Hospitality Late Night Dinner

2010-03-02 Thread Sugar Dining Den and Social Club
Title: NYCLUBINFO INC Unsubscribe | Complain | Edit Profile | Confirm 31 Kimberly Drive East Northport NY 11731 -- http://mail.python.org/mailman/listinfo/python-list

Re: cpan for python?

2010-03-02 Thread TomF
On 2010-03-02 13:14:50 -0800, R Fritz rfr...@u.washington.edu said: On 2010-02-28 06:31:56 -0800, sstein...@gmail.com said: On Feb 28, 2010, at 9:28 AM, Someone Something wrote: Is there something like cpan for python? I like python's syntax, but Iuse perl because of cpan and the tremendous

Re: Docstrings considered too complicated

2010-03-02 Thread Albert van der Horst
In article hm9cbc$9p...@speranza.aioe.org, Mel mwil...@the-wire.com wrote: Jean-Michel Pichavant wrote: Andreas Waldenburger wrote: On Fri, 26 Feb 2010 09:09:36 -0600 Tim Daneliuk tun...@tundraware.com wrote: Reminiscent of: mov AX,BX ; Move the contents of BX into AX Well,

Re: Broken references in postings

2010-03-02 Thread Aahz
In article hmjiuc$7p...@reader1.panix.com, Grant Edwards inva...@invalid.invalid wrote: I've noticed recently that a lot of the refernces and in-reply-to headers in c.l.p are broken, resulting in the inability to move from a child to a parent in a tree. One issue with the mail/news gateway is

Re: Is this secure?

2010-03-02 Thread Aahz
In article mailman.120.1267548006.23598.python-l...@python.org, Robert Kern robert.k...@gmail.com wrote: On 2010-02-28 01:28 AM, Aahz wrote: In articlemailman.247.1267115557.4577.python-l...@python.org, Robert Kernrobert.k...@gmail.com wrote: If you are storing the password instead of making

Re: Docstrings considered too complicated

2010-03-02 Thread Aahz
In article 20100302225156.67171...@geekmail.invalid, Andreas Waldenburger use...@geekmail.invalid wrote: Sorry, you guys drained all the funny out of me. Don't let a few nitpickers do that! I thought it was funny; after that, just remember that every Usenet thread drifts away from *your*

Re: Docstrings considered too complicated

2010-03-02 Thread Grant Edwards
On 2010-03-02, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: No nothing clever, nothing conscious, just reinventing the wheel badly. Next time you tell me that the MSDOS file system was well thought out :-) Just a mediocre copy of the CP/M filesystem, which was in turn copied from

Re: Email Script

2010-03-02 Thread Steve Holden
Victor Subervi wrote: On Tue, Mar 2, 2010 at 11:48 AM, Victor Subervi victorsube...@gmail.com [...] This sends only the first of the two emails. Why doesn't it work to send the second? What do? TIA, beno Should I put a timer between instances of Email? Np.

Re: Multiprocessing problem

2010-03-02 Thread Matt Chaput
On 3/2/2010 3:59 PM, Matt Chaput wrote: I'm trying to use a simple pattern where a supervisor object starts a bunch of worker processes, instantiating them with two queues (a job queue for tasks to complete and an results queue for the results). The supervisor puts all the jobs in the job

Re: Docstrings considered too complicated

2010-03-02 Thread Steven D'Aprano
On Tue, 02 Mar 2010 22:51:56 +0100, Andreas Waldenburger wrote: On Tue, 02 Mar 2010 19:05:25 +0100 Jean-Michel Pichavant jeanmic...@sequans.com wrote: Andreas Waldenburger wrote: I had hoped that everyone just read it, went like Oh geez., smiled it off with a hint of lesson learned

Re: Docstrings considered too complicated

2010-03-02 Thread Steven D'Aprano
On Tue, 02 Mar 2010 23:19:09 +0100, Andreas Waldenburger wrote: We demand testable quality standards, but not of their code. We demand it of their software. We say *what* we want, they decide *how* they'll do it. Noncompliance will be fined, by a contractually agreed amount. Everything beyond

Re: Draft PEP on RSON configuration file format

2010-03-02 Thread Steven D'Aprano
On Tue, 02 Mar 2010 11:30:32 -0800, Patrick Maupin wrote: On Mar 2, 11:59 am, Terry Reedy tjre...@udel.edu wrote: To me, comparing object notation with programming language is not helpful to the OP's purpose. Yes, I agree, it was a distraction. I fell into the trap of responding to the

Re: Docstrings considered too complicated

2010-03-02 Thread Ben Finney
Andreas Waldenburger use...@geekmail.invalid writes: It works. They are supposed to make it work. And that's what they do. Whether or not they put their docstrings in the place they should does not change that their code works. No-one has been denying that. What the quality of their source

Re: os.fdopen() issue in Python 3.1?

2010-03-02 Thread Albert Hopkins
On Tue, 2010-03-02 at 17:32 +, MRAB wrote: The documentation also mentions the 'pty' module. Have you tried that instead? I tried to use pty.fork() but it also produces the same error. I also tried passing 'r', and 'rb' to fdopen() but it didn't make any difference. -a --

Re: os.fdopen() issue in Python 3.1?

2010-03-02 Thread Albert Hopkins
This appears to be Issue 5380[1] which is still open. I've cc'ed myself to that issue. [1] http://bugs.python.org/issue5380 -- http://mail.python.org/mailman/listinfo/python-list

Image.frombuffer and warning

2010-03-02 Thread News123
Hi, I am using the PIL function from_buffer in python 2.6.4 I am having the line im2 = Image.frombuffer('L',(wx,wy),buf) I receive the warning: ./pytest.py:63: RuntimeWarning: the frombuffer defaults may change in a future release; for portability, change the call to read: frombuffer(mode,

python 2.6: how to modify a PIL image from C without copying forth and back

2010-03-02 Thread News123
Hi, I created a grayscale image with PIL. Now I would like to write a C function, which reads a;most all pixels and will modify a few of them. My current approach is: - transform the image to a string() - create a byte array huge enough to contain the resulting image - call my c_function,

Re: Draft PEP on RSON configuration file format

2010-03-02 Thread Paul Rubin
Steven D'Aprano st...@remove-this-cybersource.com.au writes: (3) which implies that all JSON files are valid RSON files. If you reject the logical conclusion that RSON must therefore also be too hard to edit, then perhaps JSON isn't too hard to edit either. I would say that JSON is hard to

Re: Multiprocessing problem

2010-03-02 Thread MRAB
Matt Chaput wrote: Hi, I'm having a problem with the multiprocessing package. I'm trying to use a simple pattern where a supervisor object starts a bunch of worker processes, instantiating them with two queues (a job queue for tasks to complete and an results queue for the results). The

Re: Queue peek?

2010-03-02 Thread MRAB
John Krukoff wrote: On Tue, 2010-03-02 at 22:54 +0100, mk wrote: snip No need to use synchro primitives like locks? I know that it may work, but that strikes me as somehow wrong... I'm used to using things like Lock().acquire() and Lock().release() when accessing shared data structures,

  1   2   >