Re: PHP vs. Python

2012-09-24 Thread tejas . tank . mca
On Thursday, 23 December 2004 03:33:36 UTC+5:30, (unknown) wrote: Anyone know which is faster? I'm a PHP programmer but considering getting into Python ... did searches on Google but didn't turn much up on this. Thanks! Stephen Here some helpful gudance.

unpacking with default values

2008-07-17 Thread McA
Hi all, probably a dumb question, but I didn't find something elegant for my problem so far. In perl you can unpack the element of a list to variables similar as in python (a, b, c = [0, 1, 2]), but the number of variables need not to fit the number of list elements. That means, if you have less

Re: unpacking with default values

2008-07-17 Thread McA
On 17 Jul., 18:33, Gary Herron [EMAIL PROTECTED] wrote: In Python 2.x, you can't do that directly, but you should be able to create a function that lengthens or shortens an input tuple of arguments to the correct length so you can do: a,c,b = fix(1,2) d,e,f = fix(1,2,3,4) However, the

Re: Logging to different addressees

2008-07-16 Thread McA
Hi Vinay, thank you for being so patient. On 16 Jul., 01:21, Vinay Sajip [EMAIL PROTECTED] wrote: On Jul 15, 5:17 pm, McA [EMAIL PROTECTED] wrote: If you added the admin sink handler to the root logger, you're done. Isn't that the first thing above? What do you mean? I gave you

Re: Logging to different addressees

2008-07-16 Thread McA
On 16 Jul., 15:38, Vinay Sajip [EMAIL PROTECTED] wrote: On Jul 16, 8:55 am, McA [EMAIL PROTECTED] wrote: messages tologging.getLogger('tree.leave') would also show up inlogging.getLogger('tree') automatically? Yes. Ok. Hope not to bother. Use the propagate flag, which is mentioned

Logging to different addressees

2008-07-15 Thread McA
Hi all, I need a recommendation. I would to like to use the logging module to create log messages the following way: a) Every log message does go to a admin sink. b) The logging of special messages should go to the admin sink AND to a sink specifically for a certain addressee. c) I don't want to

Re: Logging to different addressees

2008-07-15 Thread McA
Hi Vinary, thank you for answering. I start be proud that the author of the logging package himself is answering. :-) On 15 Jul., 15:51, Vinay Sajip [EMAIL PROTECTED] wrote: On Jul 15, 1:27 pm, McA [EMAIL PROTECTED] wrote: Add a handler to the root logger (or common_logger) to send