Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-15 Thread Pascal Chambon
Hi, cool down, people, if anything gave FOSS a bad reputation, that's well the old pyjamas website (all broken, because "wheel must be reinvented here"), and most of all the "terror management" that occurred on its mailing list. Previously I had always considered open-source as a benevolent st

Re: GIL in alternative implementations

2011-05-30 Thread Pascal Chambon
us as we don't need to protect ref counts or use interlocked operations for ref counting. *From:* python-list-bounces+dinov=exchange.microsoft@python.org [mailto:python-list-bounces+dinov=exchange.microsoft@python.org] *On Behalf Of *Pascal Chambon *Sent:* Friday, May 27, 20

Re: Directly calling python's function arguments dispatcher

2010-12-13 Thread Pascal Chambon
Le 12/12/2010 23:41, Peter Otten a écrit : Pascal Chambon wrote: I've encountered several times, when dealing with adaptation of function signatures, the need for explicitly resolving complex argument sets into a simple variable mapping. Explanations. Consider that function: def f

Directly calling python's function arguments dispatcher

2010-12-12 Thread Pascal Chambon
Hello I've encountered several times, when dealing with adaptation of function signatures, the need for explicitly resolving complex argument sets into a simple variable mapping. Explanations. Consider that function: def foo(a1, a2, *args, **kwargs): pass calling foo(1, a2=2, a3=3) wi

Troubles with python internationalization

2010-05-25 Thread Pascal Chambon
Hello I'm studying the migration of my website (mixed english and french languages...) to a properly localized architecture. From what I've read so far, using translation "tags" (or quick phrases) in the code, and translating them to every target language (including english) sounds a better appr

Re: Castrated traceback in sys.exc_info()

2010-03-23 Thread Pascal Chambon
Gabriel Genellina a écrit : En Mon, 22 Mar 2010 15:20:39 -0300, Pascal Chambon escribió: Allright, here is more concretely the problem : ERROR:root:An error Traceback (most recent call last): File "C:/Users/Pakal/Desktop/aaa.py", line 7, in c return d() File "C:/User

Re: Castrated traceback in sys.exc_info()

2010-03-22 Thread Pascal Chambon
Gabriel Genellina a écrit : En Wed, 17 Mar 2010 09:42:06 -0300, Pascal Chambon escribió: traceback functions indeed allow the manipulation of exception tracebacks, but the root problem is that anyway, since that traceback is incomplete, your "traceback.format_exc().splitlines()"

Precedence of py, pyd, so, egg, and folder modules/packages when importing

2010-03-20 Thread Pascal Chambon
Hello, I've run into a slight issue when turning my package hierarchy into a parallel hierarchy of compiled cython extensions. Fue to the compilation process, pure python and C modules must have the basename, and they're located in the same folders. Is there any way for me to ensure that, if

Re: Castrated traceback in sys.exc_info()

2010-03-17 Thread Pascal Chambon
Hello, traceback functions indeed allow the manipulation of exception tracebacks, but the root problem is that anyway, since that traceback is incomplete, your "traceback.format_exc().splitlines()" will only provide frames for callee (downward) functions, not caller (upward) ones, starting from th

Intra-package C extensions with freeze.py

2010-01-13 Thread Pascal Chambon
Hello everyone Some times ago, I've had unexpected problems while trying to freeze some scripts into a standalone executable with the "freeze.py" script. I had already done it : normally, you simply freeze pure python modules into a standalone executable, you package it along with python extens

Re: Direct interaction with subprocess - the curse of blocking I/O

2009-07-02 Thread Pascal Chambon
Thank you all for the comments you might want something like Expect. Yes "Expect" deals with such things, unfortunately it's posix only (due to the PTY module requirement...); whereas I'd like to find generic ways (i.e at least windows/linux/mac recipes) The latter is inherently tricky (wh

Direct interaction with subprocess - the curse of blocking I/O

2009-06-29 Thread Pascal Chambon
Hello everyone I've had real issues with subprocesses recently : from a python script, on windows, I wanted to "give control" to a command line utility, i.e forward user in put to it and display its output on console. It seems simple, but I ran into walls : - subprocess.communicate() only deal

Re: stand alone exec

2009-05-11 Thread Pascal Chambon
Hello It sounds indeed like a runtime library problem... You should run a dependancy finder (like dependency walker - http://www.dependencywalker.com/) on your executable, and thus see what might be lacking on other systems. I know that on *nix systems there are tools to see more precisely wha

Re: Thread locking question.

2009-05-09 Thread Pascal Chambon
grocery_stocker a écrit : On May 9, 8:36 am, Piet van Oostrum wrote: grocery_stocker (gs) wrote: gs> The following code gets data from 5 different websites at the "same gs> time". gs> #!/usr/bin/python gs> import Queue gs> import threading gs> import urllib2 gs> import time

Re: php to python code converter

2009-05-08 Thread Pascal Chambon
D'Arcy J.M. Cain a écrit : On Fri, 08 May 2009 17:19:13 +0200 Pascal Chambon wrote: That's funny, I was precisely thinking about a php to python converter, some weeks ago. Such a tool, allowing for example to convert some CMS like Drupal to python, would be a killer app, when w

Re: php to python code converter

2009-05-08 Thread Pascal Chambon
D'Arcy J.M. Cain a écrit : On Fri, 08 May 2009 17:19:13 +0200 Pascal Chambon wrote: That's funny, I was precisely thinking about a php to python converter, some weeks ago. Such a tool, allowing for example to convert some CMS like Drupal to python, would be a killer app, when w

Re: php to python code converter

2009-05-08 Thread Pascal Chambon
Hello That's funny, I was precisely thinking about a php to python converter, some weeks ago. Such a tool, allowing for example to convert some CMS like Drupal to python, would be a killer app, when we consider the amount of php code available. But of course, there are lots of issues that'd

Re: Which one is best Python or Java for developing GUI applications?

2009-05-08 Thread Pascal Chambon
On Thu, May 7, 2009 at 1:42 PM, Pascal Chambon mailto:chambon.pas...@wanadoo.fr>> wrote: Hello When a lot of code using wxwidgets is in place, it's sure that moving to qt is a big task ; even though, thanks to qt's GUI designer, it's possible to quickly re

Re: Which one is best Python or Java for developing GUI applications?

2009-05-05 Thread Pascal Chambon
Chris Rebert a écrit : On Tue, May 5, 2009 at 12:26 AM, Paul Rudin wrote: Paul Rubin writes: srinivasan srinivas writes: Could you tell me does Python have any advantages over Java for the development of GUI applications? Yes.

Re: Daemonic processes in multiprocessing - solved

2009-05-02 Thread Pascal Chambon
Pascal Chambon a écrit : Hello everyone I've just read the doc of the (awesome) "multiprocessing" module, and there are some little things I don't understand, concerning daemon processes (see quotes below). When a python process exits, the page says it attempts to jo

Re: for with decimal values?

2009-05-02 Thread Pascal Chambon
Aahz a écrit : In article , Esmail wrote: Is there a Python construct to allow me to do something like this: for i in range(-10.5, 10.5, 0.1): ... If there is such a thing already available, I'd like to use it, otherwise I can write a function to mimic this, but I thought I'd chec

Re: Warning of missing side effects

2009-05-02 Thread Pascal Chambon
Tobias Weber a écrit : Hi, being new to Python I find remarkable that I don't see any side effects. That's especially true for binding. First, it is a statement, so this won't work: if x = q.pop(): print x # output only true values Second, methods in the standard library either retu

Re: File handling problem.

2009-05-02 Thread Pascal Chambon
subhakolkata1...@gmail.com a écrit : Dear Group, I am using Python2.6 and has created a file where I like to write some statistical values I am generating. The statistical values are generating in a nice way, but as I am going to write it, it is not taking it, the file is opening or closing prop

Re: Tools for web applications

2009-05-01 Thread Pascal Chambon
Concerning Desktop applications, I would really suggestion PyQt. I don't know if it's "easyToLearn", but with its GUI designer you can very quickly get a cool looking application (and if you need to extend your app later, it offers, imo, much more possibilities that other toolkits I've tried).

Re: Generator oddity

2009-05-01 Thread Pascal Chambon
ops...@batnet.com a écrit : I'm a little baffled by the inconsistency here. Anyone have any explanations? def gen(): ... yield 'a' ... yield 'b' ... yield 'c' ... [c1 + c2 for c1 in gen() for c2 in gen()] ['aa', 'ab', 'ac', 'ba', 'bb', 'bc', 'ca', 'cb', 'cc']

Re: import and package confusion

2009-04-29 Thread Pascal Chambon
Actually, the parethesis mean "calling" the object. "Callable" objects can be of different types : -functions - in which case they get executed -classes (or metaclasses) - in which case they get "instantiated" (with all the protocol : __new__(), __init__()...) -other objects - in which case the

Re: Marshal vs pickle...

2009-04-25 Thread Pascal Chambon
Hello I've never run into a discussion on pickle vs marshal, but clearly if the point is to exchange data between different clients, or to store it, pickle is the preferred solution, as masrhal is really too low level and its format too unstable. Indeed, the problem of pickle is that at the co

Daemonic processes in multiprocessing

2009-04-25 Thread Pascal Chambon
Hello everyone I've just read the doc of the (awesome) "multiprocessing" module, and there are some little things I don't understand, concerning daemon processes (see quotes below). When a python process exits, the page says it attempts to join all its children. Is this just a design choic

Re: and [True,True] --> [True, True]?????

2009-04-20 Thread Pascal Chambon
AggieDan04 a écrit : On Apr 20, 2:03 am, bdb112 wrote: Is there any obvious reason why [False,True] and [True,True] gives [True, True] Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] X and Y == (Y if X else X) X or Y == (X if X else Y) [False, True] is t

Re: Interest in generational GC for Python

2009-04-20 Thread Pascal Chambon
Martin v. Löwis a écrit : Is there any interest in generational garbage collection in Python these days ? Anyone working on it ? This is the time machine at work: the garbage collector in CPython *is* generational (with three generations). Regards, Martin -- http://mail.python.org/mailma

Re: iterate to make multiple variables?

2009-04-20 Thread Pascal Chambon
Mark Tolonen a écrit : "Tairic" wrote in message news:95ea7bdf-2ae8-4e5e-a613-37169bb36...@w35g2000prg.googlegroups.com... Hi, I'm somewhat new to programming and especially to python. Today I was attempting to make a sudoku-solver, and I wanted to put numbers into sets call box1, box2, ...

Re: How can I get path/name of the softlink to my python script when executing it

2009-04-19 Thread Pascal Chambon
Hello I fear that in this case the whole indirection operations on softlink occur only in the shell, and that the final command is only executed as if it were called directly on the real file... Have you tried typing "python ./waf", to see how the resolution occurs in that case ? Regards,

Re: print as a function in 2.5 ?

2009-04-19 Thread Pascal Chambon
Hello, I had found some article on this some months ago, can't remember where exactly... But if you don't want harassments, I'd just advise you to create a function with a properly specific name (like "exprint()"), and to make it mimic closely the signature and behaviour of Py3k's print() fu

Re: The Python standard library and PEP8

2009-04-19 Thread Pascal Chambon
I agree that there are still some styling inconsistencies in python stdlib, but I'm not advocating a cleaning because I've always found camelCase much prettier than those multi_underscore_methods :p Concerning the length property of strings, isn't the __len__() method sufficient ? I know they'

Re: Python interpreter speed

2009-04-19 Thread Pascal Chambon
Hello I'm not expert in low level languages, but I'd say that Python and Java are "compiled" to bytecodes of similar level. The difference lies in the information contained in those bytecodes : java is statically typed, so attribute access and other basic operations are rather quick, allowing