Re: Threads vs Processes

2006-07-26 Thread Chance Ginger
On Wed, 26 Jul 2006 10:54:48 -0700, Carl J. Van Arsdall wrote: Alright, based a on discussion on this mailing list, I've started to wonder, why use threads vs processes. So, If I have a system that has a large area of shared memory, which would be better? I've been leaning towards

Re: Way for see if dict has a key

2006-06-30 Thread Chance Ginger
On Fri, 30 Jun 2006 10:19:46 +, Michele Petrazzo wrote: Hi ng, what the preferred way for see if the dict has a key? We have a lot of solutions: key in dict key in dict.keys() dict.has_key(key) ... but what the better or the more pythonic? Thanks, Michele It is a religious

Re: Python to C converter

2006-06-07 Thread Chance Ginger
Isn't Pyrex for writing extensions to Python? As for PyPy, I didn't scroll down far enough to see the compiler info. It does say it is Python written in Python at the top. Shedskin is nothing but a compiler. On Wed, 07 Jun 2006 19:13:27 +0200, Carl Friedrich Bolz wrote: Chance Ginger wrote

Re: Python to C converter

2006-06-05 Thread Chance Ginger
If you are looking for a real python to C, well in this case C++ look for the shedskin compiler. It will take a rather nice subset of Python and generate C++ code from it. It is still rather experimental but I have been using it. Chance G. On Mon, 05 Jun 2006 07:19:39 -0700, Fuzzyman wrote:

Decorators, Identity functions and execution...

2006-04-09 Thread Chance Ginger
If I define a decorator like: def t(x) : def I(x) : return x return I and use it like: @t(X) def foo(a) : # definition of foo... pass or maybe this: @t(X) @(Y) def bar(a) : # The definition of bar... Will in encounter much of a penalty in executing

Re: Decorators, Identity functions and execution...

2006-04-09 Thread Chance Ginger
On Sun, 09 Apr 2006 09:51:18 +0200, Fredrik Lundh wrote: Chance Ginger wrote: If I define a decorator like: def t(x) : def I(x) : return x return I ... you get a syntax error. It isn't a syntax error...I tried it before I posted. In fact def t(x) : def I(x) : return x

Re: Decorators, Identity functions and execution...

2006-04-09 Thread Chance Ginger
-0700, Carl Banks wrote: Chance Ginger wrote: On Sun, 09 Apr 2006 09:51:18 +0200, Fredrik Lundh wrote: Chance Ginger wrote: If I define a decorator like: def t(x) : def I(x) : return x return I ... you get a syntax error. It isn't a syntax error...I tried it before I posted

Detecting arguments of a function - possible?

2006-03-17 Thread Chance Ginger
I am trying to write a tool to examine a function (I'd like it to work with pyc files only). So here are a few questions I have; any pointers would be very welcome. Can I determine the number of arguments required of a function? Is there a way to detect is the function will throw an exception (I

Writing 'C' structures out in cPickle format?

2006-03-14 Thread Chance Ginger
I have a problem that I am trying to solve. I have two different systems - one written in C and another in Python. I would like the two to exchange some information. On the Python side I decided to use cPickle. On the C side I would write a library that can read the cPickle and generate the

Writing an applilcation that can easily adapt to any language

2006-03-01 Thread Chance Ginger
I am rather new at Python so I want to get it right. What I am doing is writing a rather large application with plenty of places that strings will be used. Most of the strings involve statements of one kind or another. I would like to make it easy for the support people to port the application