Announce: Linux Desktop Testing Project (LDTP) 2.1.0 released

2011-01-04 Thread Nagappan Alagappan
Hello, About LDTP: Linux Desktop Testing Project is aimed at producing high quality test automation framework (using GNOME / Python) and cutting-edge tools that can be used to test Linux Desktop and improve it. It uses the Accessibility libraries to poke through the application's user interface.

ANN: elffile-0.001

2011-01-04 Thread K. Richard Pixley
Announcing the first release of elffile! Elffile is a pure python implementation of a library which reads and writes ELF format object files Current features: * Elffile is pure python so installation is easy. * Elffile has been tested on python versions 2.[67] and 3.[012]. * Reads both 32

JSONBOT 0.6 RELEASED

2011-01-04 Thread Bart Thate
Hello world and the best wishes for 2011 for all of you ! i'm pleased to announce version 0.6 of JSONBOT, a release that saw it's complete codebase refactored. Things have moved into their own package, making it easier to distribute JSONBOT to the various OS around. I even renamed the name of the

Sphinx 1.0.6 released

2011-01-04 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm happy to announce the release of Sphinx 1.0.6, a bug-fix release in the 1.0 series, fixing a number of bugs and regressions in the 1.0 line of releases. What is it? === Sphinx is a tool that makes it easy to create intelligent

Qt with PyDev

2011-01-04 Thread RP Khare
I installed Aptana PyDev plugin to Aptana Studio 3 Beta. I want to write my first GUI application using Python and I want to use Qt for it. How to integrate Qt into PyDev, or is there any other alternative IDE to work with

Re: CPython on the Web

2011-01-04 Thread John Nagle
On 1/3/2011 11:13 PM, azakai wrote: On Jan 3, 10:11 pm, John Naglena...@animats.com wrote: On 1/1/2011 11:26 PM, azakai wrote: Hello, I hope this will be interesting to people here: CPython running on the web, http://syntensity.com/static/python.html That isn't a new implementation of

Re: list 2 dict?

2011-01-04 Thread DevPlayer
or only convert the item when you need it leaving the lists as the source lyst = [1, 2, 3, 4, 5, 6, 7, 'a', 8, 'b'] func = lambda alist, index: dict([(lyst[index*2], lyst[(index*2)+1]),]) func(lyst, 0) {1: 2} func(lyst, 2) {5: 6} ## or as a function def func(lyst, index):

Matrix multiplication

2011-01-04 Thread Zdenko
Please, can anybody write me a simple recursive matrix multiplication using multiple threads in Python, or at least show me some guidelines how to write it myself Thank You -- http://mail.python.org/mailman/listinfo/python-list

PyPi question

2011-01-04 Thread wander.lairson
Dear all, I am the PyUSB author and recently I was asked to update pyusb package in the PyPi. The point is that I am not the maintainer and don't know who is. Now I need to contact the current package maintainer but I could not find how to do so through PyPi (as maintainer's email does not show).

Re: Matrix multiplication

2011-01-04 Thread Ulrich Eckhardt
Zdenko wrote: Please, can anybody write me a simple recursive matrix multiplication using multiple threads in Python, or at least show me some guidelines how to write it myself No problem, I just need your bank account data to withdraw the payment and the address of your teacher whom to send

CFP - ViNOrg 11 - 1st International Conference on Virtual and Networked Organizations: Emergent Technologies and Tools

2011-01-04 Thread CFP - 1st International Conference on Virtual and Networked Organizations Emergent Technologies and Tools
ViNOrg 11 1st International Conference on Virtual and Networked Organizations Emergent Technologies and Tools -- Paper submission deadline: April 17, 2011 -- http://www.2100projects.org/vinorg11 vin...@2100projects.org -- Dear Professor, It is our great

Re: Matrix multiplication

2011-01-04 Thread Grégory Leocadie
On 4 jan, 11:15, Ulrich Eckhardt ulrich.eckha...@dominolaser.com wrote: Zdenko wrote: Please, can anybody write me a simple recursive matrix multiplication using multiple threads in Python, or at least show me some guidelines how to write it myself No problem, I just need your bank

Re: CPython on the Web

2011-01-04 Thread Carl Banks
On Jan 3, 4:55 pm, azakai alonmozi...@gmail.com wrote: But through a combination of optimizations on the side of Emscripten (getting all LLVM optimizations to work when compiling to JS) and on the side of the browsers (optimizing accesses on typed arrays in JS, etc.), then I hope the code will

Re: Matrix multiplication

2011-01-04 Thread Zdenko
On 4.1.2011 11:15, Ulrich Eckhardt wrote: Zdenko wrote: Please, can anybody write me a simple recursive matrix multiplication using multiple threads in Python, or at least show me some guidelines how to write it myself No problem, I just need your bank account data to withdraw the payment and

Re: Python comparison matrix

2011-01-04 Thread DevPlayer
Awesome, thanks so much for you efforts and sharing. Idea: It would be great if we put this table into a python program where I can run a script against this table and a Python source code module (file) so that it would spit out a list of strings showing what python versions work with said source

Re: Interrput a thread

2011-01-04 Thread gervaz
On 4 Gen, 07:13, Jean-Paul Calderone calderone.jeanp...@gmail.com wrote: On Jan 3, 6:17 pm, Adam Skutt ask...@gmail.com wrote: On Jan 3, 5:24 pm, Jean-Paul Calderone calderone.jeanp...@gmail.com wrote: Of course.  The whole point here is not about threads vs processes. It's about

Re: Interrput a thread

2011-01-04 Thread Fuzzyman
On Dec 29 2010, 11:31 pm, gervaz ger...@gmail.com wrote: Hi all, I need to stop a threaded (using CTR+C or kill) application if it runs too much or if I decide to resume the work later. I come up with the following test implementation but I wanted some suggestion from you on how I can

Re: Interrput a thread

2011-01-04 Thread Fuzzyman
On Jan 4, 3:12 pm, Fuzzyman fuzzy...@gmail.com wrote: On Dec 29 2010, 11:31 pm, gervaz ger...@gmail.com wrote: Hi all, I need to stop a threaded (using CTR+C or kill) application if it runs too much or if I decide to resume the work later. I come up with the following test implementation

Re: Qt with PyDev

2011-01-04 Thread Gary Herron
On 01/04/2011 12:00 AM, RP Khare wrote: I installed Aptana PyDev plugin to Aptana Studio 3 Beta. I want to write my first GUI application using Python and I want to use Qt for it. How to integrate Qt into PyDev, or is there any other alternative IDE to work with Qt? element Font

Re: Interrput a thread

2011-01-04 Thread Roy Smith
In article 2ebc11a5-1b45-4faa-97b9-c84f0db01...@k22g2000yqh.googlegroups.com, Fuzzyman fuzzy...@gmail.com wrote: It is unsafe to terminate an os level thread at an arbitrary point because it may be executing code in a critical section. [...] The standard advice is to use a flag and do

Re: Matrix multiplication

2011-01-04 Thread DevPlayer
I would be very suprised if you achieve faster results threading this problem. There's been much discussed on benefits or lack thereof to threading in Python (or in general). Threading is best used in situations where you are doing different kinds of tasks. For example if you want to do your

Re: Matrix multiplication

2011-01-04 Thread DevPlayer
BTW http://www.python.org/dev/peps/pep-0211/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Matrix multiplication

2011-01-04 Thread DevPlayer
See section titled: 'array' or 'matrix'? Which should I use? at http://www.scipy.org/NumPy_for_Matlab_Users BTW http://www.python.org/dev/peps/pep-0211/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Matrix multiplication

2011-01-04 Thread Dan Stromberg
On Tue, Jan 4, 2011 at 4:22 AM, Zdenko okn...@gmail.com wrote: On 4.1.2011 11:15, Ulrich Eckhardt wrote: Zdenko wrote: Please, can anybody write me a simple recursive matrix multiplication using multiple threads in Python, or at least show me some guidelines how to write it myself No

Regular Expression for Finding and Deleting comments

2011-01-04 Thread Jeremy
I am trying to write a regular expression that finds and deletes (replaces with nothing) comments in a string/file. Comments are defined by the first non-whitespace character is a 'c' or a dollar sign somewhere in the line. I want to replace these comments with nothing which isn't too hard.

Re: Interrput a thread

2011-01-04 Thread Fuzzyman
On Jan 4, 3:31 pm, Roy Smith r...@panix.com wrote: In article 2ebc11a5-1b45-4faa-97b9-c84f0db01...@k22g2000yqh.googlegroups.com,  Fuzzyman fuzzy...@gmail.com wrote: It is unsafe to terminate an os level thread at an arbitrary point because it may be executing code in a critical section.

Re: CPython on the Web

2011-01-04 Thread gry
On Jan 4, 1:11 am, John Nagle na...@animats.com wrote: On 1/1/2011 11:26 PM, azakai wrote: Hello, I hope this will be interesting to people here: CPython running on the web, http://syntensity.com/static/python.html That isn't a new implementation of Python, but rather CPython 2.7.1,

Re: CPython on the Web

2011-01-04 Thread Gerry Reno
On 01/04/2011 12:38 PM, gry wrote: On Jan 4, 1:11 am, John Nagle na...@animats.com wrote: On 1/1/2011 11:26 PM, azakai wrote: Hello, I hope this will be interesting to people here: CPython running on the web, http://syntensity.com/static/python.html

Need your website?

2011-01-04 Thread apustilnik
Need a website for your enterprise or personal profile? Contact us now d212desi...@hotmail.com http://www.d212.com.ar Yours sincerely. -- http://mail.python.org/mailman/listinfo/python-list

Need your website?

2011-01-04 Thread apustilnik
Need a website for your enterprise or personal profile? Contact us now d212desi...@hotmail.com http://www.d212.com.ar Yours sincerely. -- http://mail.python.org/mailman/listinfo/python-list

Re: list 2 dict?

2011-01-04 Thread DevPlayer
Here is something totally the opposite of a nice one liner: A hackish module with a bloated generator. Feel free to comment, so I can learn the errors of my ways. Try not to be too mean though. Try to think of the attached file as a demonstration of ideas instead of good coding practices. Don't

Re: list 2 dict?

2011-01-04 Thread DevPlayer
The shorter version: This doesn't need any x = iter(list) line. perhaps more useful if you have a bunch of lists to be converted through out your code. def dictit(lyst): i = 0 while i len(lyst): yield lyst[i], lyst[i+1] i = i + 2 l = [1, 2, 3, 4, 5, 6, 7, 'a', 8, 'b']

opinion: comp lang docs style

2011-01-04 Thread Xah Lee
a opinion piece. 〈The Idiocy of Computer Language Docs〉 http://xahlee.org/comp/idiocy_of_comp_lang.html -- The Idiocy of Computer Language Docs Xah Lee, 2011-01-03 Worked with Mathematica for a whole day yesterday, after about 10 years hiatus.

Re: Regular Expression for Finding and Deleting comments

2011-01-04 Thread MRAB
On 04/01/2011 17:11, Jeremy wrote: I am trying to write a regular expression that finds and deletes (replaces with nothing) comments in a string/file. Comments are defined by the first non-whitespace character is a 'c' or a dollar sign somewhere in the line. I want to replace these comments

Re: list 2 dict?

2011-01-04 Thread MRAB
On 04/01/2011 05:33, Paul Rubin wrote: Octavian Rasnitaorasn...@gmail.com writes: If I want to create a dictionary from a list... l = [1, 2, 3, 4, 5, 6, 7, 'a', 8, 'b'] dict(l[i:i+2] for i in xrange(0,len(l),2)) seems simplest to me. Or: dict(zip(l[0 : : 2], l[1 : : 2])) --

Re: Regular Expression for Finding and Deleting comments

2011-01-04 Thread Jeremy
On Tuesday, January 4, 2011 11:26:48 AM UTC-7, MRAB wrote: On 04/01/2011 17:11, Jeremy wrote: I am trying to write a regular expression that finds and deletes (replaces with nothing) comments in a string/file. Comments are defined by the first non-whitespace character is a 'c' or a

Re: Regular Expression for Finding and Deleting comments

2011-01-04 Thread MRAB
On 04/01/2011 19:37, Jeremy wrote: On Tuesday, January 4, 2011 11:26:48 AM UTC-7, MRAB wrote: On 04/01/2011 17:11, Jeremy wrote: I am trying to write a regular expression that finds and deletes (replaces with nothing) comments in a string/file. Comments are defined by the first

Error python + cx_Oracle :Oracle-Error-Message: ORA-01036: illegal variable name/number

2011-01-04 Thread Mauricio Martinez Garcia
Hi, i need help with the next error: ERR_PYTHON:Oracle-Error-Message: ORA-01036: illegal variable name/number, i used the cx_Oracle module, and the error not is only Oracle Error. The error its for that python don't translate the query, with the variables :VARIABLE when the VARIABLE is a

Re: Interrput a thread

2011-01-04 Thread Jean-Paul Calderone
On Jan 4, 12:31 pm, Fuzzyman fuzzy...@gmail.com wrote: On Jan 4, 3:31 pm, Roy Smith r...@panix.com wrote: In article 2ebc11a5-1b45-4faa-97b9-c84f0db01...@k22g2000yqh.googlegroups.com,  Fuzzyman fuzzy...@gmail.com wrote: It is unsafe to terminate an os level thread at an arbitrary

Trying to decide between PHP and Python

2011-01-04 Thread Google Poster
About once a year, I have to learn yet another programming language. Given all the recommendations (an outstanding accolade from Bruce Eckel, author of Thinking in Java) I have set my aim to Python. Sounds kinda cool. The indentation-as-block is unique, but that is how I always indent, anyway.

Re: opinion: comp lang docs style

2011-01-04 Thread Jason Earl
On Tue, Jan 04 2011, Xah Lee wrote: a opinion piece. 〈The Idiocy of Computer Language Docs〉 http://xahlee.org/comp/idiocy_of_comp_lang.html -- The Idiocy of Computer Language Docs Xah Lee, 2011-01-03 Worked with Mathematica for a whole

Re: opinion: comp lang docs style

2011-01-04 Thread Google Poster
On Jan 4, 12:24 pm, Xah Lee xah...@gmail.com wrote: a opinion piece. 〈The Idiocy of Computer Language Docs〉http://xahlee.org/comp/idiocy_of_comp_lang.html -- The Idiocy of Computer Language Docs Xah Lee, 2011-01-03 Worked with Mathematica

Re: Trying to decide between PHP and Python

2011-01-04 Thread Dan M
On Tue, 04 Jan 2011 12:20:42 -0800, Google Poster wrote: About once a year, I have to learn yet another programming language. Given all the recommendations (an outstanding accolade from Bruce Eckel, author of Thinking in Java) I have set my aim to Python. Sounds kinda cool. The

Re: opinion: comp lang docs style

2011-01-04 Thread Terry Reedy
On 1/4/2011 1:24 PM, an Arrogant Ignoramus wrote: what he called a opinion piece. I normally do not respond to trolls, but while expressing his opinions, AI made statements that are factually wrong at least as regards Python and its practitioners. 1. He correctly notes that the Python

Re: Troll Alert (do not click)

2011-01-04 Thread Google Poster
On Jan 4, 8:19 am, SHILPA shilparani9...@gmail.com wrote:            UNSEEN HOT SEXY PHOTOS  http://karomasti9.blogspot.com/2011/01/never.html                         SEXY DIYA MIRZA    http://karomasti9.blogspot.com/2010/12/diya-mirza.html                         HOT AISHWARIYA

Re: Trying to decide between PHP and Python

2011-01-04 Thread Google Poster
On Jan 4, 2:29 pm, Dan M catd...@gmail.com wrote: On Tue, 04 Jan 2011 12:20:42 -0800, Google Poster wrote: About once a year, I have to learn yet another programming language. Given all the recommendations (an outstanding accolade from Bruce Eckel, author of Thinking in Java) I have set my

Re: Trying to decide between PHP and Python

2011-01-04 Thread Dan M
On Tue, 04 Jan 2011 12:32:28 -0800, Google Poster wrote: Not to mention that it took me 9 minutes to get a reply from you... Quite speedy community support. That is a very important parameter in my technology decisions these days. Thanks! -Ramon This Usenet group is a truly awesome

Re: String building using join

2011-01-04 Thread Arnaud Delobelle
gervaz ger...@gmail.com writes: Hi all, I would like to ask you how I can use the more efficient join operation in a code like this: class Test: ... def __init__(self, v1, v2): ... self.v1 = v1 ... self.v2 = v2 ... def prg(l): ... txt = ... for x in l:

Re: Trying to decide between PHP and Python

2011-01-04 Thread Google Poster
On Jan 4, 2:34 pm, Dan M catd...@gmail.com wrote: On Tue, 04 Jan 2011 12:32:28 -0800, Google Poster wrote: Not to mention that it took me 9 minutes to get a reply from you... Quite speedy community support. That is a very important parameter in my technology decisions these days.

Re: Trying to decide between PHP and Python

2011-01-04 Thread Benjamin Kaplan
On Tue, Jan 4, 2011 at 3:20 PM, Google Poster gopos...@jonjay.com wrote: About once a year, I have to learn yet another programming language. Given all the recommendations (an outstanding accolade from Bruce Eckel, author of Thinking in Java) I have set my aim to Python. Sounds kinda cool.

JSONBOT 0.6 RELEASED

2011-01-04 Thread Bart Thate
Hello world and the best wishes for 2011 for all of you ! i'm pleased to announce version 0.6 of JSONBOT, a release that saw it's complete codebase refactored. Things have moved into their own package, making it easier to distribute JSONBOT to the various OS around. I even renamed the name of the

Re: Trying to decide between PHP and Python

2011-01-04 Thread Chris Rebert
On Tue, Jan 4, 2011 at 12:29 PM, Dan M catd...@gmail.com wrote: On Tue, 04 Jan 2011 12:20:42 -0800, Google Poster wrote: About once a year, I have to learn yet another programming language. Given all the recommendations (an outstanding accolade from Bruce Eckel, author of Thinking in Java) I

Re: Trying to decide between PHP and Python

2011-01-04 Thread Alan Meyer
I confess that I haven't used php so someone correct me if I'm wrong. Looking at the history of the two languages, it is my impression that php originated as a language for web/CGI development which eventually added features enabling it to be used (sparingly) as a general purpose language.

Re: Trying to decide between PHP and Python

2011-01-04 Thread Alex Willmer
On Jan 4, 8:20 pm, Google Poster gopos...@jonjay.com wrote: Can any of you nice folks post a snippet of how to perform a listing of the current directory and save it in a string? Something like this: $ setenv FILES = `ls` Bonus: Let's say that I want to convert the names of the files to

Re: Error python + cx_Oracle :Oracle-Error-Message: ORA-01036: illegal variable name/number

2011-01-04 Thread Ian Kelly
On Tue, Jan 4, 2011 at 12:57 PM, Mauricio Martinez Garcia morfeo...@gmail.com wrote: Hi, i need help with the next error: ERR_PYTHON:Oracle-Error-Message: ORA-01036: illegal variable name/number, i used the cx_Oracle module, and the error not is only Oracle Error. The error its for that

Re: Trying to decide between PHP and Python

2011-01-04 Thread Stef Mientki
As to choice between Python and PHP, I would say learn anything but PHP. Even Perl has fewer tentacles than PHP. type this in a form field 2.2250738585072011e-308 http://www.exploringbinary.com/php-hangs-on-numeric-value-2-2250738585072011e-308/ cheers, Stef --

Re: Trying to decide between PHP and Python

2011-01-04 Thread Ben Finney
Google Poster gopos...@jonjay.com writes: On Jan 4, 2:34 pm, Dan M catd...@gmail.com wrote: This Usenet group is a truly awesome resource. My kinda place. :-) Can I ask, since you'll be joining us here, that you use your name (“Ramon” according to your signature, but preferably a full

Re: Trying to decide between PHP and Python

2011-01-04 Thread Tomasz Rola
On Tue, 4 Jan 2011, Dan M wrote: As to choice between Python and PHP, I would say learn anything but PHP. Even Perl has fewer tentacles than PHP. However, the quality of code depends heavily on who writes it. My impression is that more folks of I did it and it works so it is good, right?

Re: Trying to decide between PHP and Python

2011-01-04 Thread Google Poster
On Jan 4, 3:09 pm, Alex Willmer a...@moreati.org.uk wrote: On Jan 4, 8:20 pm, Google Poster gopos...@jonjay.com wrote: Can any of you nice folks post a snippet of how to perform a listing of the current directory and save it in a string? Something like this: $ setenv FILES = `ls`

Re: Troll Alert (do not click)

2011-01-04 Thread Steven D'Aprano
On Tue, 04 Jan 2011 12:30:21 -0800, Google Poster wrote: [snip spam] Good lord, why the hell are you RE-POSTING spam??? Did you actually think it was HELPFUL to defeat everyone's anti-spam filters? Most people won't see the original spam, and then you helpfully resend it. Thanks a lot, if not

Re: Trying to decide between PHP and Python

2011-01-04 Thread Steven D'Aprano
On Tue, 04 Jan 2011 13:09:13 -0800, Alex Willmer wrote: You could also combine this into one line: import os filenames_lower = [fn.lower() for fn in os.listdir('.')] That's two lines :) Here are a couple of nicely obfuscated one-liners: [name.lower() for name in

Re: Trying to decide between PHP and Python

2011-01-04 Thread Alan Meyer
On 1/4/2011 4:22 PM, Google Poster wrote: The syntax reminds me of Lots of Interspersed Silly Parentheses (L.I.S.P.), but without the parentheses. I haven't heard that version before. The one I heard was: Lots of Irritating Single Parentheses. Alan --

Re: Matrix multiplication

2011-01-04 Thread Steven D'Aprano
On Tue, 04 Jan 2011 13:22:33 +0100, Zdenko wrote: I wrote these two codes for example: this one is naive way of matrix multiplication using one thread [...] this one is using two threads, each one is multiplying half of matrix [...] why is second one more than twice slower than first when

Re: opinion: comp lang docs style

2011-01-04 Thread ru...@yahoo.com
On 01/04/2011 01:34 PM, Terry Reedy wrote: On 1/4/2011 1:24 PM, an Arrogant Ignoramus wrote: what he called a opinion piece. I normally do not respond to trolls, but while expressing his opinions, AI made statements that are factually wrong at least as regards Python and its practitioners.

Re: Trying to decide between PHP and Python

2011-01-04 Thread Roy Smith
In article 4d23a29d.7030...@yahoo.com, Alan Meyer amey...@yahoo.com wrote: On 1/4/2011 4:22 PM, Google Poster wrote: The syntax reminds me of Lots of Interspersed Silly Parentheses (L.I.S.P.), but without the parentheses. I haven't heard that version before. The one I heard was:

Re: Trying to decide between PHP and Python

2011-01-04 Thread Tomasz Rola
On Tue, 4 Jan 2011, Roy Smith wrote: In article 4d23a29d.7030...@yahoo.com, Alan Meyer amey...@yahoo.com wrote: On 1/4/2011 4:22 PM, Google Poster wrote: The syntax reminds me of Lots of Interspersed Silly Parentheses (L.I.S.P.), but without the parentheses. I haven't heard

Re: Interrput a thread

2011-01-04 Thread Adam Skutt
On Jan 4, 10:12 am, Fuzzyman fuzzy...@gmail.com wrote: This is a case that .NET (C#) handles better than Python or Java. Nope, read the documentation for Thread.Abort() carefully. Thread.Abort() can cause termination inside a static constructor, which is very bad. You sure your application

Re: Trying to decide between PHP and Python

2011-01-04 Thread Roy Smith
In article pine.lnx.4.64.1101050239500.7...@tau.ceti.pl, Tomasz Rola rto...@ceti.com.pl wrote: Heh. One day, guys, when you have nothing better to do, try writing a parser for Lisp-like language (Common Lisp, Scheme, whatever). After that, do the same with some other language of your

Re: Trying to decide between PHP and Python

2011-01-04 Thread Ben Finney
Tomasz Rola rto...@ceti.com.pl writes: Heh. One day, guys, when you have nothing better to do, try writing a parser for Lisp-like language (Common Lisp, Scheme, whatever). After that, do the same with some other language of your preference (Python, Java, whatever). Compare time and code

Re: Trying to decide between PHP and Python

2011-01-04 Thread Tomasz Rola
On Wed, 5 Jan 2011, Ben Finney wrote: Tomasz Rola rto...@ceti.com.pl writes: Heh. One day, guys, when you have nothing better to do, try writing a parser for Lisp-like language (Common Lisp, Scheme, whatever). After that, do the same with some other language of your preference (Python,

Re: Matrix multiplication

2011-01-04 Thread John Nagle
On 1/4/2011 2:15 AM, Ulrich Eckhardt wrote: Zdenko wrote: Please, can anybody write me a simple recursive matrix multiplication using multiple threads in Python, or at least show me some guidelines how to write it myself No problem, I just need your bank account data to withdraw the payment

Re: Interrput a thread

2011-01-04 Thread John Nagle
On 1/4/2011 6:11 PM, Adam Skutt wrote: On Jan 4, 10:12 am, Fuzzymanfuzzy...@gmail.com wrote: This is a case that .NET (C#) handles better than Python or Java. Nope, read the documentation for Thread.Abort() carefully. Thread.Abort() can cause termination inside a static constructor, which

Re: Trying to decide between PHP and Python

2011-01-04 Thread Aahz
In article e5f25444-c4fc-4a24-ac74-e9a5344ac...@k14g2000pre.googlegroups.com, Google Poster gopos...@jonjay.com wrote: The syntax reminds me of Lots of Interspersed Silly Parentheses (L.I.S.P.), but without the parentheses. You're not the first person to make that observation:

Re: Trying to decide between PHP and Python

2011-01-04 Thread Aahz
In article roy-bde7f0.19310104012...@news.panix.com, Roy Smith r...@panix.com wrote: In article 4d23a29d.7030...@yahoo.com, Alan Meyer amey...@yahoo.com wrote: On 1/4/2011 4:22 PM, Google Poster wrote: The syntax reminds me of Lots of Interspersed Silly Parentheses (L.I.S.P.), but without

Which coding style is better? public API or private method inside class definition

2011-01-04 Thread Inyeol
For example: I'm writing simple class: class Numbers: def __init__(self, numbers): self._numbers = numbers def get_all(self): for number in self._numbers: yield number If I want to add another method for yielding even numbers only, I

Re: Which coding style is better? public API or private method inside class definition

2011-01-04 Thread Inyeol
I found typo after posting: local name 'numbers' and 'number' are mixed. Plz don't report bug but focus on coding style only :-) -- http://mail.python.org/mailman/listinfo/python-list

Just Starting in on programming

2011-01-04 Thread Thai
I was told this was good and some of the easier way to start programming. I'm just wondering if this statement is true and if so what is it I should do to really start getting in there and go ahead and start using some other languages. Thank you those who reply and help in advance

Re: Which coding style is better? public API or private method inside class definition

2011-01-04 Thread Josh English
I think it depends on where you're willing to deal with changes. As it stands, if you make changes to get_all that will effect the way get_even works. If there's a logical chain that your code needs to follow and such changes would be acceptable, use them, because it's easier to change one

Problem inserting an element where I want it using lxml

2011-01-04 Thread Alan Meyer
I'm having some trouble inserting elements where I want them using the lxml ElementTree (Python 2.6). I presume I'm making some wrong assumptions about how lxml works and I'm hoping someone can clue me in. I want to process an xml document as follows: For every occurrence of a particular

Re: Just Starting in on programming

2011-01-04 Thread Corey Richardson
On 01/05/2011 12:22 AM, Thai wrote: I was told this was good and some of the easier way to start programming. I'm just wondering if this statement is true and if so what is it I should do to really start getting in there and go ahead and start using some other languages. Thank

Re: Problem inserting an element where I want it using lxml

2011-01-04 Thread Josh English
Here's a trimmed down version of how I did this (using ElementTree standalone, but the API should be the same) This is from a class definition and the _elem attribute is a link to an ElementTree.Element object. ... def _add_elem(self, tagName, text, attrib ={}): _add_elem(tagName,

Re: Problem inserting an element where I want it using lxml

2011-01-04 Thread Josh English
Oh, and I usually use a separate function to indent my xml for readability when I need to actually look at the xml. It's easier than trying to change the element in situ and make it look nice. Josh -- http://mail.python.org/mailman/listinfo/python-list

Re: opinion: comp lang docs style

2011-01-04 Thread Steven D'Aprano
On Tue, 04 Jan 2011 15:17:37 -0800, ru...@yahoo.com wrote: If one wants to critique the 'Python Docs', especially as regards to usefulness to beginners, one must start with the Tutorial; and if one wants to use if statements as an example, one must start with the above. No. The language

Re: opinion: comp lang docs style

2011-01-04 Thread Alice Bevan–McGregor
On 2011-01-04 22:29:31 -0800, Steven D'Aprano said: In any case, your assumption that any one documentation work should stand on its own merits is nonsense -- *nothing* stands alone. +1 How many RFCs still in use today don't start with: The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL

Re: Matrix multiplication

2011-01-04 Thread Tim Roberts
Zdenko okn...@gmail.com wrote: Please, can anybody write me a simple recursive matrix multiplication using multiple threads in Python, or at least show me some guidelines how to write it myself Matrix multiplication is not generally done recursively. There's no conceptual gain. It makes more

Re: Problem inserting an element where I want it using lxml

2011-01-04 Thread Stefan Behnel
Alan Meyer, 05.01.2011 06:57: I'm having some trouble inserting elements where I want them using the lxml ElementTree (Python 2.6). I presume I'm making some wrong assumptions about how lxml works and I'm hoping someone can clue me in. I want to process an xml document as follows: For every

Re: Trying to decide between PHP and Python

2011-01-04 Thread Octavian Rasnita
From: Tomasz Rola rto...@ceti.com.pl On Tue, 4 Jan 2011, Dan M wrote: As to choice between Python and PHP, I would say learn anything but PHP. Even Perl has fewer tentacles than PHP. However, the quality of code depends heavily on who writes it. My impression is that more folks of I did it

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-01-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It might be instructive to look at how NumPy itself manages sharing of ndarray data and ownership of the corresponding structs. I meant to find time to look at this over the break. -- ___ Python

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-01-04 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: BTW, I agree that it looks as though significant changes might be needed. I wonder whether it would make sense to exclude the Py_buffer struct fro m the Stable ABI PEP for now. -- ___ Python

[issue10760] tarfile doesn't handle sysfs well

2011-01-04 Thread Lars Gustäbel
Changes by Lars Gustäbel l...@gustaebel.de: -- assignee: - lars.gustaebel components: +Library (Lib) -None nosy: +lars.gustaebel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10760 ___

[issue10761] tarfile.extractall fails to overwrite symlinks

2011-01-04 Thread Lars Gustäbel
Changes by Lars Gustäbel l...@gustaebel.de: -- assignee: - lars.gustaebel nosy: +lars.gustaebel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10761 ___

[issue10516] Add list.clear() and list.copy()

2011-01-04 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10516 ___ ___

[issue10821] gethostbyname(gethostname()) is wrong when IP is changed

2011-01-04 Thread Petr Sklenář
New submission from Petr Sklenář pskle...@redhat.com: version: tried python 2.6 on rhel55 tried python-2.7-8 on fedora14 Steps to Reproduce: 1. install machine, have a fixed hostname up to mac address 1.1.1.1 = machine.something.com 2. wait a week or longer when your local dhcp server changes

[issue5945] PyMapping_Check returns 1 for lists

2011-01-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Right, calling PyMapping_Check() was never particularly reliable, and extension modules depending on it probably always had subtle bugs. Perhaps it would be nice if we provided a C API to at least some of the ABC package. In the meantime,

[issue10821] gethostbyname(gethostname()) is wrong when IP is changed

2011-01-04 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: This is not a Python issue. gethostbyname() and gethostname() are just a wrapper for the OS's functions of the same name; you'd get the same result when coding the example in C. -- nosy: +georg.brandl resolution: - invalid status:

[issue10819] ValueError on repr(closed_socket_file)

2011-01-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Fixed by r87730. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10819 ___

[issue10785] parser: store the filename as an unicode object

2011-01-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: err_clear() should set err-filename to NULL. -- versions: -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10785 ___

[issue10822] test_getgroups failure under Solaris

2011-01-04 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: Under OpenSolaris, I get the following failure: $ pfexec ./python -m test test_posix [1/1] test_posix test test_posix failed -- Traceback (most recent call last): File /home/antoine/py3k/cc/Lib/test/test_posix.py, line 402, in test_getgroups

[issue9344] please add posix.getgrouplist()

2011-01-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I can't say anything about the functionality, but the patch looks good to me (works under Linux and Solaris - the latter missing getgrouplist()). -- nosy: +pitrou stage: needs patch - commit review

[issue9535] Pending signals are inherited by child processes

2011-01-04 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Yes I'd do it in PyOS_AfterFork. Simpler patch based on gdb's attached. Private functions shouldn't use the PyXX_CamelCase() convention :) Otherwise, looks good. -- ___ Python tracker

  1   2   3   >