GENOCIDE IN THE TWENTY-FIRST CENTURY IN SYRIA !!!!!!!!!!!!!!

2012-03-11 Thread BV BV
GENOCIDE IN THE TWENTY-FIRST CENTURY IN SYRIA SCHOKING ASSAD REGIME SYRIA http://www.youtube.com/watch?v=5H1NL8aOlsg http://www.youtube.com/watch?v=jZP51eRKy34 http://www.youtube.com/watch?v=e7AY8hSUjVc http://www.youtube.com/watch?v=g3ZPbUcKI-k&feature=related BABY TORTURED TO DEATH h

How Python empowers Java?

2012-03-11 Thread Ashish Aggarwal
I am a Java developer but new to Python. I am trying to assess, as what are new capabilities that Python will provide me if I use it with Java. Guys can you please help me? -- http://mail.python.org/mailman/listinfo/python-list

Re: html5lib not thread safe. Is the Python SAX library thread-safe?

2012-03-11 Thread John Nagle
On 3/11/2012 2:45 PM, Cameron Simpson wrote: On 11Mar2012 13:30, John Nagle wrote: | "html5lib" is apparently not thread safe. | (see "http://code.google.com/p/html5lib/issues/detail?id=189";) | Looking at the code, I've only found about three problems. | They're all the usual "cached in a g

Re: What's the best way to parse this HTML tag?

2012-03-11 Thread John Salerno
On Mar 11, 7:28 pm, Roy Smith wrote: > In article > <239c4ad7-ac93-45c5-98d6-71a434e1c...@r21g2000yqa.googlegroups.com>, >  John Salerno wrote: > > > > > > > > > > > Getting the time that the song is played is easy, because the time is > > wrapped in a tag all by itself with a class attribute th

Re: Raise X or Raise X()?

2012-03-11 Thread MRAB
On 11/03/2012 23:59, Steven D'Aprano wrote: On Sun, 11 Mar 2012 12:04:55 -0700, bvdp wrote: Which is preferred in a raise: X or X()? Both. Always use raise "X(*args)" when you need to provide arguments (which you should always do for exceptions meant for the caller to see). The form "raise

Re: Raise X or Raise X()?

2012-03-11 Thread bvdp
Thanks all for the comments. > Personally, I used "raise X" to mean "this doesn't need arguments and > should never have any" and "raise X()" to mean "this needs arguments but > I'm too lazy to provide them right now". Think of it as a FIXME. Yes, that makes as much sense as anything else :)

Re: How to break long method name into more than one line?

2012-03-11 Thread Roy Smith
In article <4f5d4390$0$29891$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: > You can't split tokens over multiple lines, or put any whitespace > between them. Well, if you truly wanted to be perverse, you could write some kind of decorator: @make_long_named_test_method('some',

Re: How to break long method name into more than one line?

2012-03-11 Thread Steven D'Aprano
On Sun, 11 Mar 2012 11:53:45 -0700, Herman wrote: > I am trying to stick to the rule described in the TDD book that, each > test method name consists of the method name to be tested, inputs and > the expected outputs. *The* TDD book? There's only one? Surely not. That rule sounds utterly impract

Re: What's the best way to parse this HTML tag?

2012-03-11 Thread Roy Smith
In article <239c4ad7-ac93-45c5-98d6-71a434e1c...@r21g2000yqa.googlegroups.com>, John Salerno wrote: > Getting the time that the song is played is easy, because the time is > wrapped in a tag all by itself with a class attribute that has a > specific value I can search for. But the actual song

Re: Raise X or Raise X()?

2012-03-11 Thread Steven D'Aprano
On Sun, 11 Mar 2012 12:04:55 -0700, bvdp wrote: > Which is preferred in a raise: X or X()? Both. Always use raise "X(*args)" when you need to provide arguments (which you should always do for exceptions meant for the caller to see). The form "raise X, args" should be considered discouraged, a

Re: How to know that two pyc files contain the same code

2012-03-11 Thread Gelonida N
On 03/11/2012 08:06 AM, Steven D'Aprano wrote: > What if one merely changed the order of definition? Instead of: > > def foo(): pass > def bar(): pass > > one had this? > > def bar(): pass > def foo(): pass > > It depends on why the OP cares if they are "identical". I can imagine use- > cases w

Re: [RFC] PEP 3143: supplementary group list concerns

2012-03-11 Thread Jan Pokorný
On 12/03/12 09:27 +1100, Ben Finney wrote: Jan Pokorný writes: in the light of a recent spot in Python Paste [1], I've come across the python-daemon [2] implementation and found it also lacks support for supplementary groups. Thank you for your interest in ‘python-daemon’. To know specifica

What's the best way to parse this HTML tag?

2012-03-11 Thread John Salerno
I'm using Beautiful Soup to extract some song information from a radio station's website that lists the songs it plays as it plays them. Getting the time that the song is played is easy, because the time is wrapped in a tag all by itself with a class attribute that has a specific value I can searc

Re: Launching A Truly Disjoint Process

2012-03-11 Thread Cameron Simpson
On 11Mar2012 17:34, Dave Angel wrote: | On 03/11/2012 05:01 PM, Ami Tavory wrote: | >I'm encountering a problem using the multiprocessing module to create a | > process that is truly disjoint from the parent process: i.e., one that | > contains no "memory" of the parent process, nor any record

Re: [RFC] PEP 3143: supplementary group list concerns

2012-03-11 Thread Ben Finney
Jan Pokorný writes: > in the light of a recent spot in Python Paste [1], I've come across > the python-daemon [2] implementation and found it also lacks support > for supplementary groups. Thank you for your interest in ‘python-daemon’. To know specifically what you're referring to in most of t

Re: Raise X or Raise X()?

2012-03-11 Thread Chris Rebert
On Sun, Mar 11, 2012 at 1:37 PM, Irmen de Jong wrote: > On 11-3-2012 20:04, bvdp wrote: >> Which is preferred in a raise: X or X()? I've seen both. In my specific case >> I'm dumping out of a deep loop: >> >> try: >>   for ... >>     for ... >>       for ... >>         if match: >>            rai

Re: html5lib not thread safe. Is the Python SAX library thread-safe?

2012-03-11 Thread Cameron Simpson
On 11Mar2012 13:30, John Nagle wrote: | "html5lib" is apparently not thread safe. | (see "http://code.google.com/p/html5lib/issues/detail?id=189";) | Looking at the code, I've only found about three problems. | They're all the usual "cached in a global without locking" bug. | A few locks would

Re: Launching A Truly Disjoint Process

2012-03-11 Thread Dave Angel
On 03/11/2012 05:01 PM, Ami Tavory wrote: Hello, I'm encountering a problem using the multiprocessing module to create a process that is truly disjoint from the parent process: i.e., one that contains no "memory" of the parent process, nor any record in the parent process that it is its ch

Launching A Truly Disjoint Process

2012-03-11 Thread Ami Tavory
Hello, I'm encountering a problem using the multiprocessing module to create a process that is truly disjoint from the parent process: i.e., one that contains no "memory" of the parent process, nor any record in the parent process that it is its child. This originated in a pygtk problem, but I

Re: Raise X or Raise X()?

2012-03-11 Thread Irmen de Jong
On 11-3-2012 20:04, bvdp wrote: > Which is preferred in a raise: X or X()? I've seen both. In my specific case > I'm dumping out of a deep loop: > > try: > for ... > for ... > for ... > if match: >raise StopInteration() > else ... > > except StopInteratio

html5lib not thread safe. Is the Python SAX library thread-safe?

2012-03-11 Thread John Nagle
"html5lib" is apparently not thread safe. (see "http://code.google.com/p/html5lib/issues/detail?id=189";) Looking at the code, I've only found about three problems. They're all the usual "cached in a global without locking" bug. A few locks would fix that. But html5lib calls the XML SAX par

Re: How to break long method name into more than one line?

2012-03-11 Thread Roy Smith
In article , Herman wrote: > I am trying to stick to the rule described in the TDD book that, each > test method name consists of the method name to be tested, inputs and > the expected outputs. It takes up a lot of space and my company has a > rule of limiting 79 characters (or 80) per line. I

Raise X or Raise X()?

2012-03-11 Thread bvdp
Which is preferred in a raise: X or X()? I've seen both. In my specific case I'm dumping out of a deep loop: try: for ... for ... for ... if match: raise StopInteration() else ... except StopInteration: print "found it" -- http://mail.python.org/mailma

How to break long method name into more than one line?

2012-03-11 Thread Herman
I am trying to stick to the rule described in the TDD book that, each test method name consists of the method name to be tested, inputs and the expected outputs. It takes up a lot of space and my company has a rule of limiting 79 characters (or 80) per line. I found that def abcdeef\ dddaaa(self):

Re: Why are some unicode error handlers "encode only"?

2012-03-11 Thread Terry Reedy
On 3/11/2012 10:37 AM, Steven D'Aprano wrote: At least two standard error handlers are documented as working for encoding only: xmlcharrefreplace backslashreplace See http://docs.python.org/library/codecs.html#codec-base-classes and http://docs.python.org/py3k/library/codecs.html Why is this?

Re: Why are some unicode error handlers "encode only"?

2012-03-11 Thread Walter Dörwald
On 11.03.12 15:37, Steven D'Aprano wrote: At least two standard error handlers are documented as working for encoding only: xmlcharrefreplace backslashreplace See http://docs.python.org/library/codecs.html#codec-base-classes and http://docs.python.org/py3k/library/codecs.html Why is this? I

Re: Software Engineer -

2012-03-11 Thread Chris Withers
On 11/03/2012 09:00, Blue Line Talent wrote: Blue Line Talent is looking for a mid-level software engineer with experience in a combination of Please don't spam this list with jobs, use the Python job board instead: http://www.python.org/community/jobs/ cheers, Chris -- Simplistix - Content

Software Engineer - Storage, Python, C++, Java - Broomfield, CO

2012-03-11 Thread Blue Line Talent
Blue Line Talent is looking for a mid-level software engineer with experience in a combination of Python, C/C++ and/or Java. Experience developing middleware is helpful. The Engineer will join an exciting start-up environment in a newly established location. This is an outstanding opportunity for a

Why are some unicode error handlers "encode only"?

2012-03-11 Thread Steven D'Aprano
At least two standard error handlers are documented as working for encoding only: xmlcharrefreplace backslashreplace See http://docs.python.org/library/codecs.html#codec-base-classes and http://docs.python.org/py3k/library/codecs.html Why is this? I don't see why they shouldn't work for decodi

Re: newb __init__ inheritance

2012-03-11 Thread Peter Otten
Ian Kelly wrote: > On Sun, Mar 11, 2012 at 5:40 AM, Ian Kelly wrote: >>> 2. Is the mro function available only on python3? >> >> No, but it is available only on new-style classes. If you try it on a >> classic class, you'll get an AttributeError. > > And by the way, you probably shouldn't call

Re: newb __init__ inheritance

2012-03-11 Thread Ian Kelly
On Sun, Mar 11, 2012 at 5:40 AM, Ian Kelly wrote: >> 2. Is the mro function available only on python3? > > No, but it is available only on new-style classes.  If you try it on a > classic class, you'll get an AttributeError. And by the way, you probably shouldn't call the mro method directly. Tha

Re: newb __init__ inheritance

2012-03-11 Thread Ian Kelly
On Sun, Mar 11, 2012 at 4:56 AM, hyperboogie wrote: > 1. What do you mean by "subclassing `object`"? In Python 2 there are two different types of classes: classic classes, which are retained for backward compatibility, and new-style classes, which were introduced in Python 2.2. Classic classes a

Re: newb __init__ inheritance

2012-03-11 Thread Chris Rebert
On Sun, Mar 11, 2012 at 3:56 AM, hyperboogie wrote: > On Sunday, March 11, 2012 12:38:27 PM UTC+2, Chris Rebert wrote: >> On Sun, Mar 11, 2012 at 3:18 AM, hyperboogie wrote: >> >> > thank you everyone... >> > Still things are not working as expected... what am I doing wrong? >> >> > # cat test.p

Re: newb __init__ inheritance

2012-03-11 Thread hyperboogie
On Sunday, March 11, 2012 12:38:27 PM UTC+2, Chris Rebert wrote: > On Sun, Mar 11, 2012 at 3:18 AM, hyperboogie wrote: > > > thank you everyone... > > Still things are not working as expected... what am I doing wrong? > > > # cat test.py > > #!/usr/bin/python > > > > class A(): > > You should be

Re: newb __init__ inheritance

2012-03-11 Thread Chris Rebert
On Sun, Mar 11, 2012 at 3:18 AM, hyperboogie wrote: > thank you everyone... > Still things are not working as expected... what am I doing wrong? > # cat test.py > #!/usr/bin/python > > class A(): You should be subclassing `object`, but that's a minor point which isn't the cause of your problem.

Re: newb __init__ inheritance

2012-03-11 Thread hyperboogie
On Mar 11, 12:47 am, "Colin J. Williams" wrote: > On 10/03/2012 12:58 PM, Colin J. Williams wrote:> On 08/03/2012 10:25 AM, > hyperboogie wrote: > >> Hello everyone. > > [snip] > > main() > > I'm not sure that the class initialization is required. > > > Good luck, > > > Colin W. > > When I wrote

Re: How to re-implement the crypt.crypt function?

2012-03-11 Thread Cosmia Luna
On Sunday, March 11, 2012 4:16:52 AM UTC+8, Christian Heimes wrote: > Am 10.03.2012 20:33, schrieb Cosmia Luna: > > I'm not searching for a full solution and only want to know how to use > > hashlib to create a equivalent string like > > If you chance your mind and choose to use a full solution,