On 1/3/2012 11:13 PM, Terry Reedy wrote:
On 1/3/2012 10:06 PM, Andrew Berg wrote:
On 1/3/2012 8:50 PM, Rodrick Brown wrote:
Import FooA doesn't work and I need to use from FooA import FooA
instead? This puzzles me.
Thanks.
If you have a module called FooA with a class called FooA, then import
On 1/3/2012 8:04 PM, Devin Jeanpierre wrote:
Can you give an actual example of such a definition of 'strongly typed
object' that excludes Python objects?
I'd love to, but I neglected to above because I don't really know
where we share ideas, and I wouldn't want to jump ahead and say
something
Sorry for the misarrangement of my code in list, it happens everytime.
I apologized.
From: waitmefore...@hotmail.com
To: python-list@python.org
Subject: python2.7 kill thread and find thread id
Date: Wed, 4 Jan 2012 14:10:46 +0800
Hello,guys!!
I am using python2.7 to write a simple thread
On Tue, Jan 3, 2012 at 9:50 PM, Rodrick Brown wrote:
> I have a class FooB that derives from FooA
>
> i.e.
> class FooB(FooA):
> FooA.__init__(self,...)
>
> Can someone explain why
>
> Import FooA doesn't work and I need to use from FooA import FooA instead?
> This puzzles me.
> Thanks.
>
>
>
>
Hello,guys!!
I am using python2.7 to write a simple thread program which print the current
running thread id
and kill it with this id.
But I have some questions with this.
My code: -from threading
import Threadclass t(Thread): def __init__(
Ben Finney wrote:
I have no idea what it would take to persuade you in particular. I do
know that the combined privileges of being white, male, not-poor, and
English-fluent (and many more privileges, I'm sure) grant both of us the
luxury of barely even perceiving the harm done by a pervasive atmo
On 1/3/2012 10:06 PM, Andrew Berg wrote:
On 1/3/2012 8:50 PM, Rodrick Brown wrote:
Import FooA doesn't work and I need to use from FooA import FooA
instead? This puzzles me.
Thanks.
If you have a module called FooA with a class called FooA, then import
FooA imports the /module/. The class would
On Wed, Jan 4, 2012 at 2:06 PM, Dan Sommers wrote:
> On Wed, 04 Jan 2012 13:37:24 +1100, Chris Angelico wrote:
>
>> And "import pickle" objectifies pickles ...
>
> Not quite: "import pickle" merely readies the machinery that objectifies
> pickles. In order to objectify a pickle, you have to call
On 1/3/2012 8:50 PM, Rodrick Brown wrote:
> Import FooA doesn't work and I need to use from FooA import FooA
> instead? This puzzles me.
> Thanks.
If you have a module called FooA with a class called FooA, then import
FooA imports the /module/. The class would be FooA.FooA, just as the
variable x
On Wed, 04 Jan 2012 13:37:24 +1100, Chris Angelico wrote:
> And "import pickle" objectifies pickles ...
Not quite: "import pickle" merely readies the machinery that objectifies
pickles. In order to objectify a pickle, you have to call pickle.loads:
>>> import pickle # get ready to objectify
I have a class FooB that derives from FooA
i.e.
class FooB(FooA):
FooA.__init__(self,...)
Can someone explain why
Import FooA doesn't work and I need to use from FooA import FooA instead?
This puzzles me.
Thanks.
--
[ Rodrick R. Brown ]
http://www.linkedin.com/in/rodrickbrown
--
http://ma
Steven D'Aprano writes:
> On Wed, 04 Jan 2012 12:54:09 +1100, Ben Finney wrote:
> > It objectifies women.
>
> So you claim.
I'm sure you have a hundred ready rationalisations for why a joke that
has “girlfriend” as a fungible object, together with “car” and “house”
as things to mechanically impo
8 Dihedral wrote:
> This is a good evolution in Python. It is 2012 now and the text I/O part
> is not as important as 10 years ago. The next move of Python could
> be easy integration of C++ libraries.
You mean like with Py++? http://pypi.python.org/pypi/pyplusplus/
> The auto code generatio
On Wed, Jan 4, 2012 at 12:54 PM, Ben Finney wrote:
> It objectifies women. If you can't see how that's harmful to women, I
> haven't the stamina to educate you.
And "import pickle" objectifies pickles. It's deplorable how few
gherkins become programmers, and I think it's because of these
immature
On Jan 4, 12:06 pm, Steven D'Aprano wrote:
> On Tue, 03 Jan 2012 14:21:36 -0800, Peter wrote:
> > I have a program that talks to a device via a serial interface.
> > Structurally it looks like this:
>
> > Program A -> module B -> Serial
>
> I don't understand what this means. Program A points to m
On Jan 4, 6:38 am, Terry Reedy wrote:
> Shredskin compiles a subset of
> Python, or a subset of usages, to C, with similar benefits.
That is, of course, 'Shedskin' and 'C++' :)
+1 for either Cython or Shedskin as your next step for more performant
Python.
--
http://mail.python.org/mailman/listi
On Wed, 04 Jan 2012 12:54:09 +1100, Ben Finney wrote:
> Steven D'Aprano writes:
[...]
>> You're making an assumption there that I don't accept. There is no
>> evidence that it is harmful to *anyone*, men or women.
>
> It objectifies women.
So you claim.
> If you can't see how that's harmful to
Steven D'Aprano writes:
> On Wed, 04 Jan 2012 08:57:59 +1100, Ben Finney wrote:
>
> > Steven D'Aprano writes:
> >
> >> The joke cuts both ways.
> >
> > The fallacy is to ignore the fact that the playing field is not
> > level.
>
> I'm not ignoring the fact of an unequal playing field. (The pla
On Wed, 04 Jan 2012 08:57:59 +1100, Ben Finney wrote:
> Steven D'Aprano writes:
>
>> The joke cuts both ways.
>
> This is the Just World fallacy: you're implying that, because the same
> joke can be applied equally well to women or men, that therefore it is
> equally harmful. The fallacy is to
On Tue, 03 Jan 2012 04:33:45 -0800, Eelco wrote:
>> Why do people use pretty when we already have words that carry more
>> specific meaning? Because they are lazy! And laziness begets stupidity.
>
> No, that would be because they are not autistic. Most people like having
> a repertoire of words w
On Tue, 03 Jan 2012 05:08:47 -0800, Ethan Furman wrote:
[...]
>> "maybe policing uploads is worse than cluttering PyPI's disk space and
>> RSS feed with dumb 1 KB packages." (Matt Chaput)
>>
>> I'd drop the "maybe".
>
> It's hard enough finding what one wants without having to wade through
> cra
On Tue, 03 Jan 2012 14:21:36 -0800, Peter wrote:
> I have a program that talks to a device via a serial interface.
> Structurally it looks like this:
>
> Program A -> module B -> Serial
I don't understand what this means. Program A points to module B, which
points to ... what is Serial? Where i
> This strikes me as petty hair-splitting.
Maybe it is! I don't know what "petty" means.
> 1. By tacking on the qualification, I was acknowledging that someone,
> somewhere, might controvert it. If you allow for arbitrary redefinitions of
> words, you could claim that any statement is an opinion.
On Tue, 03 Jan 2012 17:13:17 -0600, mixolydian wrote:
> I would like some advice on:
> 1. IDEs
Avoid them. Everything you need can be used with two applications:
- a programmer's text editor;
- a decent terminal (console) application.
A decent text editor will allow you to have multiple files
mixolydian writes:
> I want to get into Python progamming for both local database
> applications and dynamic web pages. Maybe some Q&D scripts.
Welcome to the Python community. You have found a good general-purpose
programming language, and I hope you find the right help for what you're
trying t
On Tuesday, January 03, 2012 07:27:32 PM D'Arcy Cain did opine:
> On 12-01-03 01:24 PM, gene heskett wrote:
> > The solution is to chop the link between google.groups and this list.
> > But that subject has been declared verboten. Too much inconvenience
> > to ask the googlers to subscribe to the
On 2-1-2012 20:32, K Richard Pixley wrote:
> Where would I look to find the current expected status of python3 on MacOsX
> Lion?
>
> The distributed binaries aren't capable of allowing extensions that use gcc.
>
> I can build the source naked, but then it lacks some libraries, notably,
> readli
On Jan 4, 9:34 am, wesley chun wrote:
> fwiw, i've given a related talk a couple of times on this subject, the
> most recent of which was at EuroPython this
> summer:http://ep2011.europython.eu/conference/talks/writing-books-using-pyth...
>
> the content includes a couple of the tools mentioned i
I want to get into Python progamming for both local database applications and
dynamic web pages. Maybe some Q&D scripts.
There is a ton of excellent language books.
I have downloaded and installed 2.7.2 and got it working by pasting samples
into IDLE, and uploading to my web server and doing tri
Terry Reedy writes:
> On 1/3/2012 1:13 PM, Sean Wolfe wrote:
>
> > I have a theoretical / philosophical question regarding strong vs
> > duck typing in Python. Let's say we wanted to type strongly in
> > Python
>
> Python objects are strongly typed, in any sensible meaning of the
> term. What you
Benoit Thiell wrote:
> I am experiencing a puzzling problem with both Python 2.4 and Python
> 2.6 on CentOS 5. I'm looking for an explanation of the problem and
> possible solutions. Here is what I did:
>
> Python 2.4.3 (#1, Sep 21 2011, 19:55:41)
> IPython 0.8.4 -- An enhanced Interactive Python
Hi.
I am experiencing a puzzling problem with both Python 2.4 and Python
2.6 on CentOS 5. I'm looking for an explanation of the problem and
possible solutions. Here is what I did:
Python 2.4.3 (#1, Sep 21 2011, 19:55:41)
IPython 0.8.4 -- An enhanced Interactive Python.
In [1]: def test():
...
fwiw, i've given a related talk a couple of times on this subject, the
most recent of which was at EuroPython this summer:
http://ep2011.europython.eu/conference/talks/writing-books-using-python-open-source-software
the content includes a couple of the tools mentioned in this thread as
well as som
Sean Wolfe writes:
> Hello everybody, I'm a happy pythonista newly subscribed to the group.
Welcome!
> I have a theoretical / philosophical question regarding strong vs duck
> typing in Python. Let's say we wanted to type strongly in Python
There may be an unstated assumption there, and your w
I have a program that talks to a device via a serial interface.
Structurally it looks like this:
Program A -> module B -> Serial
I want to add a protocol layer around the serial port without
modifying any of the modules above and I want to be able to use BOTH
cases of the program whenever conveni
Peter Otten <__pete...@web.de> writes:
> If you want more women in IT go to a local school and show the girls
> things they can do with a computer that they find fun and interesting.
> If you have a daughter try more Lego and less Barbies.
I have no objection to doing those things *as well as* re
Steven D'Aprano writes:
> The joke cuts both ways.
This is the Just World fallacy: you're implying that, because the same
joke can be applied equally well to women or men, that therefore it is
equally harmful. The fallacy is to ignore the fact that the playing
field is not level.
Yes, that same
On 1/3/2012 4:06 PM, Devin Jeanpierre wrote:
Python objects are strongly typed, in any sensible meaning of the term.
There are people that hold definitions of strong typing that preclude
Python. Those people think their definition is reasonable, but at the
Can you give an actual example of su
On 3 January 2012 20:38, Terry Reedy wrote:
> On 1/3/2012 1:13 PM, Sean Wolfe wrote:
>
> I have a theoretical / philosophical question regarding strong vs duck
>> typing in Python. Let's say we wanted to type strongly in Python and
>>
>
> Python objects are strongly typed, in any sensible meanin
> Python objects are strongly typed, in any sensible meaning of the term.
There are people that hold definitions of strong typing that preclude
Python. Those people think their definition is reasonable, but at the
same time haven't confused static typing with strong typing. I guess
the problem is
Neil Cerutti wrote:
> On 2012-01-03, Stefan Krah wrote:
> > $ ./python -m timeit -n 100 '"%s" % 7.928137192'
> > 100 loops, best of 3: 0.0164 usec per loop
>
> % is faster, but not by an order of magnitude.
>
> On my machine:
>
> C:\WINDOWS>python -m timeit -n 100 -s "n=7.92" "'%s'
Neil Cerutti wrote:
On 2012-01-03, Stefan Krah wrote:
Andrew Berg wrote:
To add my opinion on it, I find format() much more readable and easier
to understand (with the exception of the {} {} {} {} syntax), and would
love to see %-style formatting phased out.
For me the %-style is much more r
> I tested 10 million matches on my computer using capturing groups and it took
> ~ 6 seconds, but only ~ 2 seconds with non-capturing params.
Are you talking about Python or Perl? I can't reproduce this in
Python. Best I can do is a 3:4 ratio between running times. ('(a)*
versus '(?:a)*)
Also,
On 1/3/2012 1:13 PM, Sean Wolfe wrote:
I have a theoretical / philosophical question regarding strong vs duck
typing in Python. Let's say we wanted to type strongly in Python and
Python objects are strongly typed, in any sensible meaning of the term.
What you mean is statically or explicitly t
Devin Jeanpierre wrote:
"one obvious way" != "only one way"
Which way is the obvious way? Why is it obvious?
Apparently, %-style is obvious to C and similar coders, while {}-style
is obvious to Java and similar coders.
:)
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 03 Jan 2012 15:45:20 +1000, Ashton Fagg wrote:
> I'm working with an embedded machine, which is using a Python script to
> oversee the acquisition of some data. The supervisor script, which is
> run by crontab every 5 minutes, relies on an environment variable to be
> set. I've tried to
> Interesting. I read the list using gmail, and I never saw the
> original post. IIn fact I rarely see any spam at all. Apparently,
> somebody at google knows how to identify spam. I wonder why they can't
> do it for google groups.
> [I also wonder if anybody will see this post, coming from an ev
From: "Devin Jeanpierre"
Subject: Re: Regular expression : non capturing groups are faster ?
>> You meant Perl Documentation, didn't you ?
>
> I guess that works too. I did mean Python, though -- its intent is to
> say "you shouldn't worry about this", but in the process it says "this
> does no
On 3 January 2012 19:46, Neil Cerutti wrote:
> On 2012-01-03, Stefan Krah wrote:
> > Andrew Berg wrote:
> >> To add my opinion on it, I find format() much more readable and easier
> >> to understand (with the exception of the {} {} {} {} syntax), and would
> >> love to see %-style formatting ph
> "one obvious way" != "only one way"
Which way is the obvious way? Why is it obvious?
For me, sprintf-formatting is "obviously" easier to use (less typing)
unless you're pulling values from a dictionary or object, or already
have all the variables stored in a dict you can pass in with **d.
-- D
On 1/3/2012 13:13, Sean Wolfe wrote:
> What I am driving at is, if we are coding in python but looking for
> more performance, what if we had an option to 1) restrict ourselves
> somewhat by using strong typing to 2) make it easy to compile or
> convert down to C++ and thereby gain more performance
Hi All
i have downloaded "xmldiff-0.6.10" from their official site (http://
www.logilab.org/859).
I have tried installing the same on my 32 bit Windows 7 OS using the
command "setup.py install" but below exceptions are thrown in the
console.
please help me out in installing this package on Windows
Ian Kelly wrote:
http://mail.python.org/pipermail/python-dev/2009-September/092399.html
Thanks, that link is very informative.
Here's the link to the last discussion last February:
http://mail.python.org/pipermail/python-dev/2011-February/108155.html
~Ethan~
--
http://mail.python.org/mailm
On 2012-01-03, Stefan Krah wrote:
> Andrew Berg wrote:
>> To add my opinion on it, I find format() much more readable and easier
>> to understand (with the exception of the {} {} {} {} syntax), and would
>> love to see %-style formatting phased out.
>
> For me the %-style is much more readable. A
On 2012-01-03, David Harks wrote:
> On 1/3/2012 12:13 PM, Sean Wolfe wrote:
>> if we are coding in python but looking for
>> more performance,
>
> Are you in fact in this situation? Despite years of folks
> mentioning how Python is 'slower than C++', I've seen a project
> where a developer churned
On Tue, Jan 3, 2012 at 2:24 PM, Benjamin Kaplan
wrote:
> On Tue, Jan 3, 2012 at 1:49 PM, D'Arcy Cain wrote:
>> On 12-01-03 01:24 PM, gene heskett wrote:
>>>
>>> The solution is to chop the link between google.groups and this list. But
>>> that subject has been declared verboten. Too much inconve
On 12-01-03 02:24 PM, Benjamin Kaplan wrote:
:0 Hir
* ^List-Id:.*python-list.python.org
* ^From:.*@gmail.com
* ^Newsgroups:.*
/dev/null
--
Wouldn't that just kill everything sent from a gmail account? That's
not the same thing as Google Groups. The mailing list posts, at least,
have an "Organi
> Put simply, it doesn't occur often enough to be worth it. The cost
> outweighs the potential benefit.
I don't buy it. You could backtrack instead of failing for \b+ and
\b*, and it would be almost as fast as this optimization.
-- Devin
On Tue, Jan 3, 2012 at 1:57 PM, MRAB wrote:
> On 03/01/20
> You meant Perl Documentation, didn't you ?
I guess that works too. I did mean Python, though -- its intent is to
say "you shouldn't worry about this", but in the process it says "this
does not exist" (a lie).
"slightly better performance" would be accurate, as said by Goyvaerts/
-- Devin
On T
On Tue, Jan 3, 2012 at 1:49 PM, D'Arcy Cain wrote:
> On 12-01-03 01:24 PM, gene heskett wrote:
>>
>> The solution is to chop the link between google.groups and this list. But
>> that subject has been declared verboten. Too much inconvenience to ask the
>> googlers to subscribe to the real list I
On Tue, Jan 3, 2012 at 12:51 PM, Robert Sjoblom
wrote:
> On 3 January 2012 16:21, Joel Goldstick wrote:
>> --
>
> Joel, when you start your emails with this (two dashes) some email
> readers (gmail among them) will think you're ending your email; I have
> to expand your post because it thinks tha
On 1/3/2012 12:13 PM, Sean Wolfe wrote:
if we are coding in python but looking for
more performance,
Are you in fact in this situation? Despite years of folks mentioning how
Python is 'slower than C++', I've seen a project where a developer
churned out a feature using Python's generators that
On 03/01/2012 09:45, Devin Jeanpierre wrote:
\\b\\b and \\b{2} aren't equivalent ?
This sounds suspiciously like a bug!
Why the wording is "should never" ? Repeating a zero-width assertion is not
forbidden, for instance :
import re
re.compile("\\b\\b\w+\\b\\b")
<_sre.SRE_Pattern obje
On 12-01-03 01:24 PM, gene heskett wrote:
The solution is to chop the link between google.groups and this list. But
that subject has been declared verboten. Too much inconvenience to ask the
googlers to subscribe to the real list I guess. Because my spamassassin
Perhaps they just need to be r
On 12-01-03 01:13 PM, Sean Wolfe wrote:
Hello everybody, I'm a happy pythonista newly subscribed to the group.
Welcome.
The question is, given this possibility, would this get us closer to
being able to compile down to a language like C or C++?
That's "a" question. "The" question is "do yo
Tue, 3 Jan 2012 09:58:35 -0800 (PST)
Adam Skutt a écrit:
> If you're really insistent on using the sox(1) command-line tools to play
> your sounds, then you'll have to send SIGINT or SIGTERM in order to tell it
> to terminate (which can be done just by calling the terminate() method).
>
> Which i
On Tuesday, January 03, 2012 01:13:08 PM John Ladasky did opine:
> On Jan 3, 7:40 am, BV wrote:
> > MOST COMMON QUESTIONS ASKED BY NON-MUSLIMS
>
> Q0. Why do thousand-line religious posts appear in comp.lang.python?
Already discussed, at considerable length & I got told off.
The solution is to
On Tue, Jan 3, 2012 at 1:13 PM, Sean Wolfe wrote:
> Hello everybody, I'm a happy pythonista newly subscribed to the group.
> How is it going?
> I have a theoretical / philosophical question regarding strong vs duck
> typing in Python. Let's say we wanted to type strongly in Python and
> were willi
On Jan 3, 2012 6:55 AM, "Ethan Furman" wrote:
>
> Ian Kelly wrote:
>>
>> I'm not sure it's true that "there are no plans to do so in the
>> foreseeable future." According to the release notes from Python 3.0,
>> % formatting was supposed to be deprecated in Python 3.1.
>
>
> Eric Smith wrote (fro
Hello everybody, I'm a happy pythonista newly subscribed to the group.
How is it going?
I have a theoretical / philosophical question regarding strong vs duck
typing in Python. Let's say we wanted to type strongly in Python and
were willing to compromise our code to the extent necessary, eg not
cha
On Jan 3, 10:09 am, Jérôme wrote:
> Tue, 3 Jan 2012 06:12:59 -0800 (PST)
> Adam Skutt a écrit:
>
> > The conservative approach is to use another IPC mechanism to talk to
> > the process, such as a pipe or a socket. Why are you trying to send
> > the child process SIGINT in the first place?
>
> Sa
> Ok,
>
> After reading all posts (thanks a lot), I am considering to use the
> following base metaclass for all metaclasses that must lead to
> pickleable instances (not pickleable classes):
>
>
> import sys
>
> class Meta(type):
>def __new__(mcls, name, bases, attrs):
>cls = type.__ne
On Jan 3, 7:40 am, BV wrote:
> MOST COMMON QUESTIONS ASKED BY NON-MUSLIMS
Q0. Why do thousand-line religious posts appear in comp.lang.python?
--
http://mail.python.org/mailman/listinfo/python-list
On 3 January 2012 16:21, Joel Goldstick wrote:
> --
Joel, when you start your emails with this (two dashes) some email
readers (gmail among them) will think you're ending your email; I have
to expand your post because it thinks that what is hidden is the
signature. Just thought you should know.
Tue, 3 Jan 2012 17:24:44 +0100
Jérôme a écrit:
> > Too many libraries do too many questionable things with signal handlers
> > so I find it much safer and easier just to avoid the damn things whenever
> > possible.
>
> My small program _seems to_ work with the dirty hacks I already exposed.
> Yet
Tue, 3 Jan 2012 07:03:08 -0800 (PST)
Adam Skutt a écrit:
> On Jan 3, 4:38 am, Jérôme wrote:
> > I have an application that can spawn a subprocess to play a beep. I want
> > it to kill the subprocess when exiting.
>
> Why? You shouldn't need to send a signal to tell the process to
> terminate: i
davidfx於 2012年1月1日星期日UTC+8上午2時19分34秒寫道:
> Hello everyone,
> I just have a quick question about .format and %r %s %d.
>
> Should we always be using .format() for formatting strings or %?
>
> Example a = 'apples'
> print "I love {0}.".format(a)
>
> If I wanted to put .format into a
On 2012-01-03, Neil Cerutti wrote:
> On 2012-01-03, Stefan Krah wrote:
>> Neil Cerutti wrote:
>>> > In the real-world telco benchmark for _decimal, replacing the
>>> > single line
>>> >
>>> > outfil.write("%s\n" % t)
>>> >
>>> > with
>>> >
>>> > outfil.write("{}\n".format(t))
>>> >
>>> >
On Jan 3, 4:38 am, Jérôme wrote:
> I have an application that can spawn a subprocess to play a beep. I want it
> to kill the subprocess when exiting.
Why? You shouldn't need to send a signal to tell the process to
terminate: it should terminate when its stdin is closed or when it's
done playing
On Tue, Jan 3, 2012 at 9:13 AM, Ganesh Kumar wrote:
> Hi Guys,
>
> I want parse multiple line. with re.module, this is my given string
> http://dpaste.com/680760/ I have try with re.compile module. I want parse
> two line mac address and channel,
> I have done with for mac address finding
>
> r =
On Jan 1, 7:43 pm, MRAB wrote:
> On 02/01/2012 03:14, David Goldsmith wrote:
>
>
>
>
>
>
>
>
>
> > On Jan 1, 7:05 am, Tim Golden wrote:
> >> On 01/01/2012 12:05, David Goldsmith wrote:
> >> >> ie can the Python process creating the directories,
>
> >> > Yes.
>
> >> >> and a subproces
On 2012-01-03, Stefan Krah wrote:
> Neil Cerutti wrote:
>> > In the real-world telco benchmark for _decimal, replacing the
>> > single line
>> >
>> > outfil.write("%s\n" % t)
>> >
>> > with
>> >
>> > outfil.write("{}\n".format(t))
>> >
>> > adds 23% to the runtime. I think %-style formatt
On Jan 2, 11:53 pm, Cameron Simpson wrote:
> On 02Jan2012 19:16, Adam Skutt wrote:
> | On Jan 2, 8:44 pm, Cameron Simpson wrote:
> | > On 02Jan2012 20:31, Devin Jeanpierre wrote:
> | > | > I think that catching the exception is probably the most Pythonic way.
> | > |
> | > | It's the only corre
Tue, 3 Jan 2012 06:12:59 -0800 (PST)
Adam Skutt a écrit:
> The conservative approach is to use another IPC mechanism to talk to
> the process, such as a pipe or a socket. Why are you trying to send
> the child process SIGINT in the first place?
Say, you've got an application that plays a sound f
Le 03/01/2012 12:56, Devin Jeanpierre a écrit :
The second assertion sounds more likely. It seems very odd that Python and
Perl implementations are divergent on this point. Any opinion ?
The Python documentation oversimplifies.
You meant Perl Documentation, didn't you ?
It's a commun opinio
On Jan 3, 3:58 am, Chris Angelico wrote:
> On Tue, Jan 3, 2012 at 7:44 PM, Jérôme wrote:
> > If so, I don't see how I can protect myself from that. Checking the process
> > is alive and then hoping that the time interval for the race condition is so
> > small that there are few chances for that t
On Jan 3, 3:44 am, Jérôme wrote:
> Mon, 2 Jan 2012 19:16:50 -0800 (PST)
> Adam Skutt a écrit:
>
> > No. It is possible (however unlikely) for EPERM to be legitimately
> > returned in this case. Anything other than EINVAL should be
> > interpreted as "The child process is dead". Hence why you sho
Neil Cerutti wrote:
> > In the real-world telco benchmark for _decimal, replacing the
> > single line
> >
> > outfil.write("%s\n" % t)
> >
> > with
> >
> > outfil.write("{}\n".format(t))
> >
> > adds 23% to the runtime. I think %-style formatting should not
> > be deprecated at all.
>
Hi Guys,
I want parse multiple line. with re.module, this is my given string
http://dpaste.com/680760/ I have try with re.compile module. I want parse
two line mac address and channel,
I have done with for mac address finding
r = re.compile("^Searching for OPUSH on (\w\w(:\w\w)+)")
for channel f
Marko Rauhamaa writes:
> Mysterious 8-bit characters appear in the string returned by strftime.
>
> $ python
> Python 2.7.2 (default, Oct 27 2011, 01:36:46)
> [GCC 4.6.1 20111003 (Red Hat 4.6.1-10)] on linux2
> Type "help", "copyright", "credits" or "license" for more information
On 2012-01-03, Stefan Krah wrote:
> Andrew Berg wrote:
>> To add my opinion on it, I find format() much more readable and easier
>> to understand (with the exception of the {} {} {} {} syntax), and would
>> love to see %-style formatting phased out.
>
> For me the %-style is much more readable. A
Am 03.01.2012 14:40, schrieb Adam Skutt:
On Jan 3, 7:31 am, Heiko Wundram wrote:
Yes, it can be avoided, that's what the default SIGCHLD-handling
(keeping the process as a zombie until it's explicitly collected by a
wait*()) is for, which forces the PID not to be reused by the operating
system
Ian Kelly wrote:
I'm not sure it's true that "there are no plans to do so in the
foreseeable future." According to the release notes from Python 3.0,
% formatting was supposed to be deprecated in Python 3.1.
Eric Smith wrote (from a thread on pydev in 02-2011):
> The last thread on this I have
On Jan 3, 7:31 am, Heiko Wundram wrote:
> Am 03.01.2012 02:19, schrieb Adam Skutt:
>
> > On Jan 2, 6:09 pm, Jérôme wrote:
> >> What is the clean way to avoid this race condition ?
>
> > The fundamental race condition cannot be removed nor avoided. Ideally,
> > avoid the need to send the subproces
Peter Otten wrote:
Lie Ryan wrote:
On 01/02/2012 11:20 PM, Peter Otten wrote:
Felinx Lee wrote:
I have removed those packages (girlfriend and others) from PyPI forever,
I apologize for that.
The thought police has won :(
I think the community has a right to defend themselves against trolls
On Tue, Jan 3, 2012 at 10:47 PM, Stefan Krah wrote:
> For me the %-style is much more readable.
It's also very similar to C's printf, which means it's similar to
everything else that's similar to printf. That makes it instantly
grokkable to many many people, which is a Good Thing. It's like using
Mysterious 8-bit characters appear in the string returned by strftime.
$ python
Python 2.7.2 (default, Oct 27 2011, 01:36:46)
[GCC 4.6.1 20111003 (Red Hat 4.6.1-10)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time, locale
>
> Why do people use pretty when we already have words that carry more
> specific meaning? Because they are lazy! And laziness begets
> stupidity.
No, that would be because they are not autistic. Most people like
having a repertoire of words with subtly different meanings in their
natural language,
Am 03.01.2012 02:19, schrieb Adam Skutt:
On Jan 2, 6:09 pm, Jérôme wrote:
What is the clean way to avoid this race condition ?
The fundamental race condition cannot be removed nor avoided. Ideally,
avoid the need to send the subprocess a signal in the first place. If
it cannot be avoided, th
From: "candide"
Subject: Regular expression : non capturing groups are faster ?
Excerpt from the Regular Expression HOWTO
(http://docs.python.org/howto/regex.html#non-capturing-and-named-groups) :
---
It should be mentioned that there’s no performan
1 - 100 of 115 matches
Mail list logo