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 guys

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, win32com.client.Dispatch(

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 copy-edit

learn ajax

2010-03-02 Thread groups_ads12
ajax.learn.net.in afc ajax ajax ajax and php ajax and php building resp

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 i

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 corn

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 thi

Re: Verifying My Troublesome Linkage Claim between Python and Win7

2010-03-02 Thread alex23
"W. eWatson" 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 could try this, a

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, otherwi

Re: Adding to a module's __dict__?

2010-03-02 Thread Roy Smith
In article , Chris Rebert wrote: > On Mon, Mar 1, 2010 at 8:27 PM, 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 > >

Re: Adding to a module's __dict__?

2010-03-02 Thread Steve Holden
Roy Smith wrote: > In article , > Chris Rebert wrote: > >> On Mon, Mar 1, 2010 at 8:27 PM, 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

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 the

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 d

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 registratio

Re: Adding to a module's __dict__?

2010-03-02 Thread Roy Smith
On Mar 2, 8:33 am, Steve Holden 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 machine- process the C

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' fo

Re: Email Script

2010-03-02 Thread Victor Subervi
On Tue, Mar 2, 2010 at 11:48 AM, Victor Subervi wrote: > 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 = '

Re: Adding to a module's __dict__?

2010-03-02 Thread Steve Holden
Roy Smith wrote: > On Mar 2, 8:33 am, Steve Holden 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 goin

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 , D'Arcy J.M. Cain 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 database server. >Swapping is your enemy. Also, put your log/journ

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 -- http://mail.python.org/mailman/listinfo/python-list

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 wi

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 Francis 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 of JSON), but

Re: Is this secure?

2010-03-02 Thread Robert Kern
On 2010-02-28 01:28 AM, Aahz wrote: In article, Robert Kern 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 reading up on the APIs available on your targeted platforms. Are you sure

Re: Adding to a module's __dict__?

2010-03-02 Thread Carl Banks
On Mar 2, 5:21 am, Roy Smith wrote: > In article , >  Chris Rebert wrote: > > > > > On Mon, Mar 1, 2010 at 8:27 PM, 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-le

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, therefore

Re: Email Script

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

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 that.

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. Howe

Re: Call Signtool using python

2010-03-02 Thread enda man
On Mar 2, 2:46 pm, "Matt Mitchell" 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 information contai

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 t

Re: Docstrings considered too complicated

2010-03-02 Thread Andreas Waldenburger
On Mon, 01 Mar 2010 21:09:39 + Mark Lawrence 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. > > > a company that works

Re: Docstrings considered too complicated

2010-03-02 Thread Andreas Waldenburger
On Tue, 02 Mar 2010 09:48:47 +1100 Ben Finney 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 share my superiority com

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, like:

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: itera

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 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", > "http://timestamp.verisign.

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 Francis wrote: Patrick Maupin wrote: This not only seriously stretching the meaning of the term "superset" (as Python is most definitely no

Re: freebsd and multiprocessing

2010-03-02 Thread Tim Arnold
On Mar 2, 11:52 am, Philip Semanchuk 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: > > > ImportE

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 recall

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 Pa

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 s

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 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 tho

Re: Queue peek?

2010-03-02 Thread Raymond Hettinger
On Mar 2, 8:29 am, Veloz 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? Am curious about

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 im

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 2

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 something

Re: conditional import into global namespace

2010-03-02 Thread Jerry Hill
On Tue, Mar 2, 2010 at 12:46 PM, 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? Just impo

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 , Giorgos Tzampanakis 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? I have

Re: freebsd and multiprocessing

2010-03-02 Thread Tim Arnold
On Mar 2, 12:59 pm, Tim Arnold wrote: > On Mar 2, 11:52 am, Philip Semanchuk 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 > > > plat

Re: Email Script

2010-03-02 Thread Victor Subervi
On Tue, Mar 2, 2010 at 12:56 PM, Victor Subervi wrote: > On Tue, Mar 2, 2010 at 11:53 AM, Victor Subervi > wrote: > >> On Tue, Mar 2, 2010 at 11:48 AM, Victor Subervi >> wrote: >> >>> Hi; >>> I have the following code: >>> >>> def my_mail(): >>> user, passwd, db, host = login() >>> database

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 Francis wrote: Patrick Maupin wrote: This not only seriously stretching the meaning of the term

Re: Queue peek?

2010-03-02 Thread Veloz
On Mar 2, 1:18 pm, Raymond Hettinger wrote: > On Mar 2, 8:29 am, Veloz 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 pyt

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 wrote: On Mar 2, 11:52 am, Philip Semanchuk 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 th

Re: Draft PEP on RSON configuration file format

2010-03-02 Thread Patrick Maupin
On Mar 2, 11:59 am, Terry Reedy 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 possibly look bett

Re: Queue peek?

2010-03-02 Thread MRAB
Veloz wrote: On Mar 2, 1:18 pm, Raymond Hettinger wrote: On Mar 2, 8:29 am, Veloz 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 que

Re: Queue peek?

2010-03-02 Thread Martin P. Hellwig
On 03/02/10 19:44, MRAB wrote: 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 the

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 Stut

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 Python

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/ > parallelpytho

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 m

Re: Docstrings considered too complicated

2010-03-02 Thread Ben Finney
Andreas Waldenburger 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, and I'm glad we don't

Re: Broken references in postings

2010-03-02 Thread Ben Finney
Grant Edwards 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. -- \ “Contentment is a

Re: Writing an assembler in Python

2010-03-02 Thread Holger Mueller
Giorgos Tzampanakis 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 coding as

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: http://localhost

Re: Queue peek?

2010-03-02 Thread mk
Daniel Stutzbach wrote: On Tue, Mar 2, 2010 at 1:58 PM, Martin P. Hellwig 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 types are thread safe. Bot

Re: Docstrings considered too complicated

2010-03-02 Thread Andreas Waldenburger
On Tue, 02 Mar 2010 19:05:25 +0100 Jean-Michel Pichavant 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 ... and I'm >

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 q

Re: Queue peek?

2010-03-02 Thread John Krukoff
On Tue, 2010-03-02 at 22:54 +0100, mk wrote: > 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. T

Re: Docstrings considered too complicated

2010-03-02 Thread Andreas Waldenburger
On Wed, 03 Mar 2010 08:22:40 +1100 Ben Finney wrote: > Andreas Waldenburger 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 surpri

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 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 modules that it has. -

Re: Docstrings considered too complicated

2010-03-02 Thread Albert van der Horst
In article , Mel wrote: >Jean-Michel Pichavant wrote: >> Andreas Waldenburger wrote: >>> On Fri, 26 Feb 2010 09:09:36 -0600 Tim Daneliuk >>> wrote: Reminiscent of: mov AX,BX ; Move the contents of BX into AX > >>> Well, there might be some confusion there as to what gets

Re: Broken references in postings

2010-03-02 Thread Aahz
In article , Grant Edwards 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 that (unless it's been fixed) In-Reply-To: does

Re: Is this secure?

2010-03-02 Thread Aahz
In article , Robert Kern wrote: >On 2010-02-28 01:28 AM, Aahz wrote: >> In article, >> Robert Kern 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 reading up on the APIs

Re: Docstrings considered too complicated

2010-03-02 Thread Aahz
In article <20100302225156.67171...@geekmail.invalid>, Andreas Waldenburger 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* point. -- Aahz (a...@pyt

Re: Docstrings considered too complicated

2010-03-02 Thread Grant Edwards
On 2010-03-02, Albert van der Horst 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 DEC's RSTS or RSX.

Re: Email Script

2010-03-02 Thread Steve Holden
Victor Subervi wrote: > On Tue, Mar 2, 2010 at 11:48 AM, Victor Subervi 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. http://en.wikipedia.org/wiki/Ca

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 > 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 b

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 bey

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 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 ludicrou

Re: Docstrings considered too complicated

2010-03-02 Thread Ben Finney
Andreas Waldenburger 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 code *does* affect, th

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 -- http://mail

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, which

Re: Draft PEP on RSON configuration file format

2010-03-02 Thread Paul Rubin
Steven D'Aprano 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 edit because, among other things,

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 supe

Re: Queue peek?

2010-03-02 Thread MRAB
John Krukoff wrote: On Tue, 2010-03-02 at 22:54 +0100, mk wrote: 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

Re: Multiprocessing problem

2010-03-02 Thread Matt Chaput
If the main process doesn't get the results from the queue until the worker processes terminate, and the worker processes don't terminate until they've put their results in the queue, and the pipe consequently fills up, then deadlock can result. The queue never fills up... on platforms with qsiz

  1   2   >