pox-0.1a1

2010-06-29 Thread Michael McKerns
pox: utilities for filesystem exploration and automated builds http://www.its.caltech.edu/~mmckerns/software.html # Version 0.1a1: 06/28/10 # Highlights First alpha version for initial release. Pox provides utilities for discovering the user's environment:: - return the user's name,

pathos-0.1a1

2010-06-29 Thread Michael McKerns
pathos: a framework for heterogeneous computing http://www.its.caltech.edu/~mmckerns/software.html # Version 0.1a1: 06/28/10 # Highlights First alpha version for initial release. Pathos provides a configurable distributed parallel-map reduce interface to launching RPC service calls, with::

pyina-0.1a1

2010-06-29 Thread Michael McKerns
pyina: a MPI-based parallel mapper and launcher http://www.its.caltech.edu/~mmckerns/software.html # Version 0.1a1: 06/28/10 # Highlights First alpha version for initial release. Pyina provides a highly configurable parallel map-reduce interface to running MPI jobs, with:: - a map-reduce

dill-0.1a1

2010-06-29 Thread Michael McKerns
dill: a utility for serialization of python objects http://www.its.caltech.edu/~mmckerns/software.html # Version 0.1a1: 06/28/10 # Highlights First alpha version for initial release. Dill is capable of pickling the following standard types:: - none, type, bool, int, long, float, complex,

[ANNOUNCE] PyGObject 2.21.4 - unstable

2010-06-29 Thread Tomeu Vizoso
Hi, I am pleased to announce version 2.21.4 of the Python bindings for GObject. The new release is available from ftp.gnome.org as and its mirrors as soon as its synced correctly: http://download.gnome.org/sources/pygobject/2.21/ What's new since PyGObject 2.21.3? - Build the

[ANN] Six, utilities for supporting Python 2 and 3 with the same code base

2010-06-29 Thread Benjamin Peterson
I've just released for the first time six, a set of helpers for maintaining a code base on Python 2 and 3 simultaneously. It includes fake byte and unicode literals and wrappers for syntax changes between the languages. The license is MIT. You can download it on PyPi:

Third World War is Coming - Who is Webster Tarpley ?

2010-06-29 Thread nanothermite911fbibustards
Third World War is Coming - Who is Webster Tarpley ? http://www.youtube.com/watch?v=jLaaPBV9nqA http://www.youtube.com/watch?v=KV6oKRnM4mY http://www.youtube.com/watch?v=y53R_h-OZAM -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] optphart (alpha2)

2010-06-29 Thread Stephen Hansen
On 6/28/10 10:41 PM, rantingrick wrote: I am pleased to announce optphart (alpha2)! This is just stupid. It isn't worthy of any more elaborate response. You just don't get the point, do you? -- ... Stephen Hansen ... Also: Ixokai ... Mail: me+list/python (AT) ixokai (DOT) io

Re: optphart (alpha2)

2010-06-29 Thread rantingrick
On Jun 29, 1:30 am, Stephen Hansen me+list/pyt...@ixokai.io wrote: This is just stupid. It isn't worthy of any more elaborate response. Well gee thanks Stephen. Why don't you just kick me in the balls while your at it? *Maybe* you don't find it useful. *Maybe* no one will find it useful.

Re: python source code - win/dos executable (on linux)

2010-06-29 Thread Lawrence D'Oliveiro
In message 4c286d71$0$18654$4fafb...@reader3.news.tin.it, superpollo wrote: Lawrence D'Oliveiro ha scritto: Is it really such a hassle to install things on Windows? no, but it *IS* to explain it to dumb users... :-( Can’t you create an installation package that specifies Python and all

Re: os.system: string encoding

2010-06-29 Thread Lawrence D'Oliveiro
In message alpine.deb.1.10.1006251708470.3...@localhost, Peter Kleiweg wrote: How do I set the string encoding for os.system to anything other then UTF-8? Works for me (on Debian Unstable): l...@theon:~ echo $LC_ALL en_NZ.utf8 l...@theon:~ python3.1 Python 3.1.2 (r312:79147,

Re: 回复: I wander which is better? JSP or Pytho n? And is there a place for JSP?

2010-06-29 Thread 戴清灏
Sorry for having delayed to reply. Your response really inspired me. I am a sophomore student in China,My major is computer network. Since so,besides I really love web development,I should focus more attention on Python as it means a lot to web applications. Python is so laconic that it makes me

Re: Python dynamic attribute creation

2010-06-29 Thread Bruno Desthuilliers
Aahz a écrit : In article 4c285e7c$0$17371$426a7...@news.free.fr, Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid wrote: Aahz a écrit : In article 4c2747c1$0$4545$426a7...@news.free.fr, Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote: Python has no pretention

Re: [ANN] optphart (alpha2)

2010-06-29 Thread Steven D'Aprano
On Mon, 28 Jun 2010 22:41:17 -0700, rantingrick wrote: I am pleased to announce optphart (alpha2)! I'm not sure this counts as a project worthy of an official release announcement and a version number, it's more of a recipe. Perhaps you should put it on the ActiveState cookbook?

Re: Python as a scripting language. Alternative to bash script?

2010-06-29 Thread Jorgen Grahn
On Mon, 2010-06-28, John Nagle wrote: On 6/28/2010 7:58 AM, Benjamin Kaplan wrote: How does a program return anything other than an exit code? Ah, yes, the second biggest design mistake in UNIX. Programs have argv and argc, plus environment variables, going in. So, going in, there

Re: Python as a scripting language. Alternative to bash script?

2010-06-29 Thread Jorgen Grahn
On Mon, 2010-06-28, Dave Pawson wrote: I've a fairly long bash script and I'm wondering how easy it would be to port to Python. Main queries are: Ease of calling out to bash to use something like imageMagick or Java? Ease of grabbing return parameters? E.g. convert can return both height

Re: Python as a scripting language. Alternative to bash script?

2010-06-29 Thread eric dexter
On Jun 28, 5:48 am, Dave Pawson dave.paw...@gmail.com wrote: I've a fairly long bash script and I'm wondering how easy it would be to port to Python. Main queries are: Ease of calling out to bash to use something like imageMagick or Java? Ease of grabbing return parameters? E.g. convert can

Re: Why are String Formatted Queries Considered So Magical?

2010-06-29 Thread Nobody
On Tue, 29 Jun 2010 12:30:36 +1200, Lawrence D'Oliveiro wrote: Seriously, almost every other kind of library uses a binary API. What makes databases so special that they need a string-command based API? HTML is also effectively a string-based API. HTML is a data format. The sane way to

Re: Python dynamic attribute creation

2010-06-29 Thread Andre Alexander Bell
On 06/25/2010 03:15 PM, WANG Cong wrote: 1) Modifying a class attribute is metaprogramming, and this is modifying a class, i.e. adding a new attribute to it, thus this should belong to metaprogramming. (I know, strictly speaking, maybe my definition of metaprogramming here is incorrect, I _do_

Re: N00b question: matching stuff with variables.

2010-06-29 Thread Sion Arrowsmith
Stephen Hansen me+list/pyt...@ixokai.io wrote: On 6/28/10 10:29 AM, Ken D'Ambrosio wrote: for line in file: match = re.search((seek),(.*),(.*), line) # Stuck here [ ... ] name, foo, bar = line.split(,) if seek in name: # do something with foo and bar That'll return True

Re: CONTROLLED DEMOLITION INC explosive-charge placement technician Tom ?Sullivan 911 TESTIMONIAL Video

2010-06-29 Thread Gone Fishin'
Now is the time to pay back by defending the CONSTITUTION and first step is spreading the INCONTROVERTIBLE EVIDENCE of the CRIME and the CRIMINALS. You're right. Now please stop posting here. You're not converting anyone, you're alienating them. I'll meet you in the constitutional and 911

Re: Why are String Formatted Queries Considered So Magical?

2010-06-29 Thread Duncan Booth
Owen Jacobson angrybald...@gmail.com wrote: However, not every programming language has the kind of structural flexibility to do that well: a library similar to SQLalchemy would be incredibly clunky (if it worked at all) in, say, Java or C#, and it'd be nearly impossible to pull off in C.

Re: Pydev 1.5.8 Released

2010-06-29 Thread Fabio Zadrozny
On Tue, Jun 29, 2010 at 12:37 AM, ejosvp ejo...@gmail.com wrote: On 28 jun, 22:35, ejosvp ejo...@gmail.com wrote: I have a problem with pydev 1.5.8 An error has occurred. See error log for more details. com.aptana.editor.common.CommonEditorPlugin.getThemeManager()Lcom/

Re: dynamically modify help text

2010-06-29 Thread Thomas Jollans
On 06/29/2010 02:37 AM, Ben Finney wrote: Brian Blais bbl...@bryant.edu writes: On Jun 28, 2010, at 14:25 , Chris Rebert wrote: __doc__ is normally defined on classes, e.g. `A`, not instances, e.g. `a`. help() looks for __doc__ accordingly. so that gets back to my original question: can I

Re: validate string representation of a timedelta

2010-06-29 Thread Thomas Jollans
On 06/29/2010 03:41 AM, CM wrote: I'm looking for a good way to check whether a certain string is valid. It is a string representation of a Python timedelta object, like this: '0:00:03.695000' (But the first place, the hours, could also be double digits) In trying to figure out how to

Re: CONTROLLED DEMOLITION INC explosive-charge placement technician Tom Sullivan 911 TESTIMONIAL Video

2010-06-29 Thread n...@bid.nes
On Jun 26, 12:16 pm, nanothermite911fbibustards nanothermite911fbibusta...@gmail.com wrote: Let's talk about thermite. Do you know anything about thermite? It's a powdered mixture of a metal oxide and another pure metal that, when raised to a specific minimum temperature, allows the metal to

Re: Why are String Formatted Queries Considered So Magical?

2010-06-29 Thread Roy Smith
Nobody nob...@nowhere.com wrote: And what about regular expressions? What about them? As the saying goes: Some people, when confronted with a problem, think I know, I'll use regular expressions. Now they have two problems. That's silly. RE is a good tool. Like all

Re: More MySQL Stuff

2010-06-29 Thread Victor Subervi
On Mon, Jun 28, 2010 at 2:24 PM, Emile van Sebille em...@fenx.com wrote: On 6/28/2010 9:10 AM Victor Subervi said... Any other suggestions? http://www.databaseanswers.org/tutorial4_db_schema/index.htm Thanks. Good tutorial. beno -- http://mail.python.org/mailman/listinfo/python-list

Re: N00b question: matching stuff with variables.

2010-06-29 Thread Stephen Hansen
On 6/29/10 2:51 AM, Sion Arrowsmith wrote: Stephen Hansenme+list/pyt...@ixokai.io wrote: On 6/28/10 10:29 AM, Ken D'Ambrosio wrote: for line in file: match = re.search((seek),(.*),(.*), line) # Stuck here [ ... ] name, foo, bar = line.split(,) if seek in name: # do

Re: Why are String Formatted Queries Considered So Magical?

2010-06-29 Thread Stephen Hansen
On 6/29/10 5:41 AM, Roy Smith wrote: Nobodynob...@nowhere.com wrote: And what about regular expressions? What about them? As the saying goes: Some people, when confronted with a problem, think I know, I'll use regular expressions. Now they have two problems.

Re: optphart (alpha2)

2010-06-29 Thread Stephen Hansen
On 6/28/10 11:50 PM, rantingrick wrote: You just don't get the point, do you? And just what *point* an i supposed to be getting Stephen? That you don't like my contribution? If thats your point then i very much get it. This garbage: optphart is the nemisis of the asinine interfaces and

Re: python source code - win/dos executable (on linux)

2010-06-29 Thread Stephen Hansen
On 6/29/10 12:27 AM, Lawrence D'Oliveiro wrote: In message4c286d71$0$18654$4fafb...@reader3.news.tin.it, superpollo wrote: Lawrence D'Oliveiro ha scritto: Is it really such a hassle to install things on Windows? no, but it *IS* to explain it to dumb users... :-( Can’t you create an

Re: Why Is Escaping Data Considered So Magical?

2010-06-29 Thread Mark Lawrence
On 29/06/2010 01:55, Roy Smith wrote: [snips] The nice thing about null-terminated strings is how portable they have been over various word lengths. The bad thing about null-terminated strings is the number of off-by-one errors they've helped to create. I obviously have never created an

Re: N00b question: matching stuff with variables.

2010-06-29 Thread Tim Golden
On 29/06/2010 15:14, Stephen Hansen wrote: True: but I've personally never seent he point of the csv module unless we're talking about a more complicated csv format, such as one with quoting in fields. I don't know if that's what the OP is working with, but good point: csv might be a good

Re: Why Python3

2010-06-29 Thread Martin v. Loewis
I should point out that this wasn't a mere whimsy on Guido's part. Mathematically, supporting larger-than and less-than comparisons on complex numbers *is* a bug -- they're simply meaningless mathematically. (Which is greater, 2-1i or -1+2i?) However, that's true for many other values that

Re: CONTROLLED DEMOLITION INC explosive-charge placement technician Tom Sullivan 911 TESTIMONIAL Video

2010-06-29 Thread nanothermite911fbibustards
On Jun 29, 5:24 am, n...@bid.nes alien8...@gmail.com wrote: On Jun 26, 12:16 pm, nanothermite911fbibustards nanothermite911fbibusta...@gmail.com wrote:   Let's talk about thermite.   Do you know anything about thermite? It's a powdered mixture of a metal oxide and another pure metal that,

Re: Python dynamic attribute creation

2010-06-29 Thread WANG Cong
On 06/29/10 17:48, Andre Alexander Bell p...@andre-bell.de wrote: On 06/25/2010 03:15 PM, WANG Cong wrote: 1) Modifying a class attribute is metaprogramming, and this is modifying a class, i.e. adding a new attribute to it, thus this should belong to metaprogramming. (I know, strictly

Re: Third World War is Coming - Who is Webster Tarpley ?

2010-06-29 Thread nanothermite911fbibustards
On Jun 28, 11:25 pm, nanothermite911fbibustards nanothermite911fbibusta...@gmail.com wrote: Third World War is Coming - Who is Webster Tarpley ? http://www.youtube.com/watch?v=jLaaPBV9nqAhttp://www.youtube.com/watch?v=KV6oKRnM4mYhttp://www.youtube.com/watch?v=y53R_h-OZAM Third World War is

Re: Python dynamic attribute creation

2010-06-29 Thread WANG Cong
On 06/27/10 12:01, Carl Banks pavlovevide...@gmail.com wrote: On Jun 25, 8:24 pm, WANG Cong xiyou.wangc...@gmail.com wrote: Understand, but please consider my proposal again, if we switched to: setattr(foo, 'new_attr', blah) by default, isn't Python still dynamic as it is? (Please teach me

Re: CONTROLLED DEMOLITION INC explosive-charge placement technician Tom Sullivan 911 TESTIMONIAL Video

2010-06-29 Thread nanothermite911fbibustards
On Jun 29, 5:24 am, n...@bid.nes alien8...@gmail.com wrote: On Jun 26, 12:16 pm, nanothermite911fbibustards nanothermite911fbibusta...@gmail.com wrote:   Let's talk about thermite. SPOOOK MOTHER FUCKER, I will talk what I want to talk. I know you are an ODIOUS SPK, which has many

Python v3.1.2 documentation question

2010-06-29 Thread Ethan Furman
In the glossary section it states: doc nested scope The ability to refer to a variable in an enclosing definition. For instance, a function defined inside another function can refer to variables in the outer function. Note that nested scopes work only for reference and not for assignment

Infinite prime number generator

2010-06-29 Thread Thomas Jollans
I've been toying with Haskell a bit, and after implementing (essentially) the Sieve of Eratosthenes as an infinite list, thus: primes = 1 : foldr elim_mult [] [2..] where elim_mult n l = n : filter ((/=0) . (`mod` n)) l I wondered how easy it would be to do the same thing in Python.

Re: Python dynamic attribute creation

2010-06-29 Thread Chris Rebert
On Tue, Jun 29, 2010 at 9:48 AM, WANG Cong xiyou.wangc...@gmail.com wrote: On 06/27/10 12:01, Carl Banks pavlovevide...@gmail.com wrote: On Jun 25, 8:24 pm, WANG Cong xiyou.wangc...@gmail.com wrote: Understand, but please consider my proposal again, if we switched to: setattr(foo, 'new_attr',

Python profiler usage with objects

2010-06-29 Thread harit
Hi, I have a specific question regarding the usage of profiler. I am new to python programming I am trying to profile a function which I want to invoke as a class method, something like this import profile class Class: def doSomething(): do here .. def callMethod():

Re: Python dynamic attribute creation

2010-06-29 Thread Ethan Furman
WANG Cong wrote: On 06/27/10 12:01, Carl Banks pavlovevide...@gmail.com wrote: On Jun 25, 8:24 pm, WANG Cong xiyou.wangc...@gmail.com wrote: Understand, but please consider my proposal again, if we switched to: setattr(foo, 'new_attr', blah) by default, isn't Python still dynamic as it is?

Re: Python dynamic attribute creation

2010-06-29 Thread Ethan Furman
WANG Cong wrote: On 06/29/10 17:48, Andre Alexander Bell p...@andre-bell.de wrote: As said previously I don't think one should differentiate between meta programming and programming within the language, since the former is nothing different than the latter. If you check other programming

Re: Python dynamic attribute creation

2010-06-29 Thread Stephen Hansen
On 6/29/10 9:48 AM, WANG Cong wrote: On 06/27/10 12:01, Carl Bankspavlovevide...@gmail.com wrote: On Jun 25, 8:24 pm, WANG Congxiyou.wangc...@gmail.com wrote: Understand, but please consider my proposal again, if we switched to: setattr(foo, 'new_attr', blah) by default, isn't Python

Russian Spies ???? This is Hilarious !!!!! Does anyone BELIEVE it ? after 911 Inside JOB and ANTHRAX

2010-06-29 Thread nanothermite911fbibustards
YanQui cry babies using old RACIST formula of Harassment !!! To Harass Muslims :- Make a Movie of Bin Laden from a Studio in Langley Virginia with an actor with SILICONE mask and release on the internet with FBI working on AUTHENTICATING it. Hey YANK Bustards , NO ONE trust you. You have

Re: Python dynamic attribute creation

2010-06-29 Thread Stephen Hansen
On 6/29/10 9:46 AM, WANG Cong wrote: 1) Disallow dynamic attribute creations by assignments _by default_, thus I expect an error when I do: So far I only did tell you _how_ it is in Python. If I understand your question about the design of the language correctly than you would like Python to

Re: Python v3.1.2 documentation question

2010-06-29 Thread Stephen Hansen
On 6/29/10 10:01 AM, Ethan Furman wrote: In the glossary section it states: doc nested scope The ability to refer to a variable in an enclosing definition. For instance, a function defined inside another function can refer to variables in the outer function. Note that nested scopes work only

Re: CONTROLLED DEMOLITION INC explosive-charge placement technician Tom Sullivan 911 TESTIMONIAL Video

2010-06-29 Thread UltimatePatriot
On Tue, 29 Jun 2010 09:31:07 -0700 (PDT), nanothermite911fbibustards nanothermite911fbibusta...@gmail.com wrote: They had military type wireless coordinated cutter charges that they accessed You're a goddamned idiot. You think that we did not go to the moon as well, right? --

Re: CONTROLLED DEMOLITION INC explosive-charge placement technician Tom Sullivan 911 TESTIMONIAL Video

2010-06-29 Thread UltimatePatriot
On Tue, 29 Jun 2010 09:46:06 -0700 (PDT), nanothermite911fbibustards nanothermite911fbibusta...@gmail.com wrote: I know you are an ODIOUS SPK, which has many aliases on newsnet like Uncle Al and you have TWO GOALS !!! Yer a goddamned kook, boy. Run over to the kook group. Uncle Al has

Re: Third World War is Coming - Who is Webster Tarpley ?

2010-06-29 Thread small Pox
On Jun 29, 9:41 am, nanothermite911fbibustards nanothermite911fbibusta...@gmail.com wrote: On Jun 28, 11:25 pm, nanothermite911fbibustards nanothermite911fbibusta...@gmail.com wrote: Third World War is Coming - Who is Webster Tarpley ?

Re: CONTROLLED DEMOLITION INC explosive-charge placement technician Tom Sullivan 911 TESTIMONIAL Video

2010-06-29 Thread Thomas 'PointedEars' Lahn
UltimatePatriot crossposted twice over 4 off-topic newsgroups without Followup-To, replying to an obvious troll: [...] One good thing about Usenet is that you don't have to look for people you can safely put into your killfile; they'll agglomerate automatically. F'up2 set accordingly --

Find slope of function given empirical data.

2010-06-29 Thread Thomas
Hello all. Trying to find slope of function using numpy. Getting close, but results are a bit off. Hope someone out here can help. import numpy as np def deriv(y): x = list(range(len(y))) x.reverse() # Change from [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] x = np.array(x) #to

Re: Russian Spies ???? This is Hilarious !!!!! Does anyone BELIEVE it ? after 911 Inside JOB and ANTHRAX

2010-06-29 Thread small Pox
http://www.youtube.com/watch?v=oNo2kDkstBo http://www.youtube.com/watch?v=3jNuGBCAAg8 http://www.youtube.com/watch?v=9C4umi2eMrM http://www.youtube.com/watch?v=PR6s_Ib0I-M http://www.youtube.com/watch?v=ivTcmbqQCFg http://www.youtube.com/watch?v=6JzupsT-8Sc

Re: CONTROLLED DEMOLITION INC explosive-charge placement technician Tom Sullivan 911 TESTIMONIAL Video

2010-06-29 Thread Bart!
On Tue, 29 Jun 2010 19:58:13 +0200, Thomas 'PointedEars' Lahn pointede...@web.de wrote: UltimatePatriot crossposted twice over 4 off-topic newsgroups without Followup-To, replying to an obvious troll: Whoopie fucking doo, you fucking netkkkop wanna be Usenet PUTZ! Your kill file edit

Re: Why Python3

2010-06-29 Thread Paul Rubin
Martin v. Loewis mar...@v.loewis.de writes: And indeed, that's available, by means of the key= argument to list.sort. Unfortunately what's needed for more generality is the ability to supply a comparison function, which Python2 also offers, but Python3 removes. I gave an example a while back of

MURDEROUS CRIMES of ODOUSLY RACIST FBI BUSTARDS !!!

2010-06-29 Thread small Pox
The MURDEROUS Bustards killed a man who was a SAINT . He ran a sunday soup and food place for the homeless and hungry. http://www.youtube.com/watch?v=Cnz5N9OubCQ http://www.youtube.com/watch?v=Cnz5N9OubCQ http://www.youtube.com/watch?v=Cnz5N9OubCQ http://www.youtube.com/watch?v=Cnz5N9OubCQ

Re: Russian Spies ???? This is Hilarious !!!!! Does anyone BELIEVE it ? after 911 Inside JOB and ANTHRAX

2010-06-29 Thread small Pox
http://www.youtube.com/watch?v=Cnz5N9OubCQ On Jun 29, 11:18 am, small Pox smallpox...@gmail.com wrote: http://www.youtube.com/watch?v=oNo2kDkstBohttp://www.youtube.com/watch?v=3jNuGBCAAg8http://www.youtube.com/watch?v=9C4umi2eMrM

Re: Python as a scripting language. Alternative to bash script?

2010-06-29 Thread Robert Kern
On 6/29/10 4:06 AM, Jorgen Grahn wrote: On Mon, 2010-06-28, John Nagle wrote: On 6/28/2010 7:58 AM, Benjamin Kaplan wrote: How does a program return anything other than an exit code? Ah, yes, the second biggest design mistake in UNIX. Programs have argv and argc, plus environment

Re: C++/Python function call

2010-06-29 Thread Rami Chowdhury
Hi Zohair, On Tuesday 29 June 2010 05:24:26 Zohair M. Abu Shaban wrote: Dear Rami, Thanks for your reply. I am using hardware that uses some libraries on Linux. def set_time_at_next_pps(*args, **kwargs): set_time_at_next_pps(self, usrp2::time_spec_t time_spec) - bool return

Re: I strongly dislike Python 3

2010-06-29 Thread Edward A. Falk
In article mailman.2309.1277758252.32709.python-l...@python.org, Stephen Hansen me+list/pyt...@ixokai.io wrote: Uhmm, just add the parenthesis to your old scripts. You can do that without breaking on 2.x. Only sort of. But in Python 2.6+, you only need to from __future__ import

Re: Infinite prime number generator

2010-06-29 Thread John Posner
On 6/29/2010 12:51 PM, Thomas Jollans wrote: def rprimes(): def elim_mult(n): yield n for p in filter((lambda x:x%n != 0), elim_mult(n+1)): yield p yield 1 for p in elim_mult(2): yield p Thomas, take a look at the thread Generators/iterators, Pythonicity,

Re: C++/Python function call

2010-06-29 Thread Stefan Behnel
Rami Chowdhury, 29.06.2010 20:56: On Tuesday 29 June 2010 05:24:26 Zohair M. Abu Shaban wrote: From: rami.chowdh...@gmail.com On Monday 28 June 2010 12:46:13 Zohair M. Abu Shaban wrote: I have this python function defined as: def set_time_at_next_pps(self, *args, **kwargs):

Re: I strongly dislike Python 3

2010-06-29 Thread geremy condra
On Tue, Jun 29, 2010 at 2:56 PM, Edward A. Falk f...@green.rahul.net wrote: In article mailman.2309.1277758252.32709.python-l...@python.org, Stephen Hansen  me+list/pyt...@ixokai.io wrote: Uhmm, just add the parenthesis to your old scripts. You can do that without breaking on 2.x. Only sort

Re: CONTROLLED DEMOLITION INC explosive-charge placement technician Tom Sullivan 911 TESTIMONIAL Video

2010-06-29 Thread Pieyed Piper
On Tue, 29 Jun 2010 12:49:50 -0600, m II s...@in.the.hat wrote: See you You are worse than Proteus. He IS a retard. You have no excuse, so for you, it must be by choice. Making your mental age below 15 years. How sad. I wonder how long it will take you to notice that I have been calling

Re: refactoring a group of import statements

2010-06-29 Thread Aahz
In article mailman.2202.1277677180.32709.python-l...@python.org, Thomas Jollans tho...@jollans.com wrote: (3) Why not try: import x import y import z except ImportError as exc: display_error_properly(exc) raise exc Why not? Because that destroys the original traceback.

Re: Python v3.1.2 documentation question

2010-06-29 Thread Ethan Furman
Stephen Hansen wrote: On 6/29/10 10:01 AM, Ethan Furman wrote: In the glossary section it states: doc nested scope The ability to refer to a variable in an enclosing definition. For instance, a function defined inside another function can refer to variables in the outer function. Note that

Re: validate string representation of a timedelta

2010-06-29 Thread CM
On Jun 29, 8:00 am, Thomas Jollans tho...@jollans.com wrote: On 06/29/2010 03:41 AM, CM wrote: I'm looking for a good way to check whether a certain string is valid.  It is a string representation of a Python timedelta object, like this:  '0:00:03.695000' (But the first place, the

Re: MURDEROUS CRIMES of ODOUSLY RACIST FBI BUSTARDS !!!

2010-06-29 Thread nanothermite911fbibustards
On Jun 29, 11:35 am, small Pox smallpox...@gmail.com wrote: The MURDEROUS Bustards killed a man who was a SAINT . He ran a sunday soup and food place for the homeless and hungry.

Re: Infinite prime number generator

2010-06-29 Thread Thomas Mlynarczyk
Thomas Jollans schrieb: def primes(): yield 1 1 is not a prime number. Greetings, Thomas -- Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison! (Coluche) -- http://mail.python.org/mailman/listinfo/python-list

Re: Russian Spies ???? This is Hilarious !!!!! Does anyone BELIEVE it ? after 911 Inside JOB and ANTHRAX

2010-06-29 Thread nanothermite911fbibustards
FBI Bustards - No one believes your ODIOUS LIES !!! http://www.youtube.com/watch?v=NLo6Y0weyro On Jun 29, 11:37 am, small Pox smallpox...@gmail.com wrote: http://www.youtube.com/watch?v=Cnz5N9OubCQ On Jun 29, 11:18 am, small Pox smallpox...@gmail.com wrote:

Crimes of YanQui Anglo Saxon ODIOUSLY CRIMINAL Bustards - BLACKWATER, CIA, FBI

2010-06-29 Thread nanothermite911fbibustards
Crimes of YANQUI Bustards http://www.youtube.com/watch?v=SYl6NKrmIfQ The FAT per DIEM FBI bustards use our TAX PAYER MONEY and INCOMPETENCE is UNACCEPTABLE. = http://www.youtube.com/watch?v=lX18zUp6WPY http://www.youtube.com/watch?v=XQapkVCx1HI

Re: Why Python3

2010-06-29 Thread Martin v. Loewis
Am 29.06.2010 20:30, schrieb Paul Rubin: Martin v. Loewis mar...@v.loewis.de writes: And indeed, that's available, by means of the key= argument to list.sort. Unfortunately what's needed for more generality is the ability to supply a comparison function, which Python2 also offers, but

Re: Crimes of YanQui Anglo Saxon ODIOUSLY CRIMINAL Bustards - BLACKWATER, CIA, FBI

2010-06-29 Thread nanothermite911fbibustards
KEY VIDEO of FBI BUSTARD ODIOUSLY CRIMINAL RACISTS http://www.youtube.com/watch?v=LCYKZq9JLnc KEY VIDEO of FBI BUSTARD ODIOUSLY CRIMINAL RACISTS http://www.youtube.com/watch?v=LCYKZq9JLnc KEY VIDEO of FBI BUSTARD ODIOUSLY CRIMINAL RACISTS http://www.youtube.com/watch?v=LCYKZq9JLnc KEY VIDEO

Testimonial VIDEO for Honorable Prime Minister Vladimir Putin of the Russian Federation

2010-06-29 Thread nanothermite911fbibustards
Testimonial VIDEO for Honorable Prime Minister Vladimir Putin of the Russian Federation http://www.youtube.com/watch?v=LCYKZq9JLnc http://www.youtube.com/watch?v=Cnz5N9OubCQ http://www.youtube.com/watch?v=4nP8IdKP9Bc http://www.youtube.com/watch?v=E0_zG0PEh4o

Re: Python dynamic attribute creation

2010-06-29 Thread Carl Banks
On Jun 29, 9:48 am, WANG Cong xiyou.wangc...@gmail.com wrote: On 06/27/10 12:01, Carl Banks pavlovevide...@gmail.com wrote: On Jun 25, 8:24 pm, WANG Cong xiyou.wangc...@gmail.com wrote: Understand, but please consider my proposal again, if we switched to: setattr(foo, 'new_attr',

Re: I strongly dislike Python 3

2010-06-29 Thread Steven D'Aprano
On Tue, 29 Jun 2010 18:56:37 +, Edward A. Falk wrote: Nice. Once 100% of the installed base is at 2.6, I'll finally be able to write code that compatible with 3.0. What's the installed base? Machines you control? Then just install 2.6 on your installed base and be done with it. Or even

[ANN] git JSONRPC web service and matching pyjamas front-end

2010-06-29 Thread Luke Kenneth Casson Leighton
as more than just a proof-of-concept but to get pyjamas out of looking like a nice toy, doesn't do much, great demos, shame about real life, i've created yet another git repository browser. this one, thanks to pyjamas, obviously runs as both a desktop application and also as a web application -

Re: [OT] Re: Why Is Escaping Data Considered So Magical?

2010-06-29 Thread Lawrence D'Oliveiro
In message mailman.2332.1277785175.32709.python-l...@python.org, Kushal Kumaran wrote: On Tue, Jun 29, 2010 at 5:56 AM, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: Why does this work, then: l...@theon:hack cat test.c #include stdio.h int main(int argc, char ** argv) {

Re: Why Is Escaping Data Considered So Magical?

2010-06-29 Thread Lawrence D'Oliveiro
In message slrni2f8v2.j19.grahn+n...@frailea.sa.invalid, Jorgen Grahn wrote: On Sat, 2010-06-26, Lawrence D'Oliveiro wrote: In message slrni297ec.1m5.grahn+n...@frailea.sa.invalid, Jorgen Grahn wrote: I thought it was well-known that the solution is *not* to try to sanitize the input --

RE: Why Python3

2010-06-29 Thread Dino Viehland
Terry wrote: IronPython targets Python 2.6. They plan to release a 2.7 version sometime this year after CPython2.7 is released. They plan to release a 3.2 version early next year, soon after CPython. They should be able to do that because they already have a 3.1 version mostly done (but

Re: Find slope of function given empirical data.

2010-06-29 Thread duncan smith
Thomas wrote: Hello all. Trying to find slope of function using numpy. Getting close, but results are a bit off. Hope someone out here can help. [snip] Why are you generating y-coordinates from the x-coordinates [-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4]? If you're going to use the

Re: git JSONRPC web service and matching pyjamas front-end

2010-06-29 Thread CM
On Jun 29, 6:54 pm, Luke Kenneth Casson Leighton l...@lkcl.net wrote: as more than just a proof-of-concept but to get pyjamas out of looking like a nice toy, doesn't do much, great demos, shame about real life, i've created yet another git repository browser.  this one, thanks to pyjamas,

Re: Why are String Formatted Queries Considered So Magical?

2010-06-29 Thread Carl Banks
On Jun 28, 3:07 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Sun, 27 Jun 2010 21:02:57 -0700, Stephen Hansen me+list/pyt...@ixokai.io declaimed the following in gmane.comp.python.general: (This is an area where parametrized queries is even more important: but I'm not sure if MySQL

The Icelandic Sheepdog,

2010-06-29 Thread Camelot Entertainment
The Icelandic Sheepdog, http://noizeystatic.blogspot.com/2070/06/icelandic-sheepdog-noizey-static-free.html inherently comes from the spitz type, the dogs that landed on iceland by the Vikings. -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] Re: Why Is Escaping Data Considered So Magical?

2010-06-29 Thread Michael Torrie
On 06/29/2010 06:25 PM, Lawrence D'Oliveiro wrote: I have yet to find an architecture or C compiler where it DOESN’T work. Feel free to try and prove me wrong. Okay, I will. Your code passes a char** when a char* is expected. Every compiler I know of will give you a *warning*. Mistaking

Re: Why Is Escaping Data Considered So Magical?

2010-06-29 Thread Michael Torrie
On 06/29/2010 06:26 PM, Lawrence D'Oliveiro wrote: I'm not sure you understood me correctly, because I advocate *not* doing input sanitization. Hard or not -- I don't want to know, because I don't want to do it. But no-one has yet managed to come up with an alternative that involves less

Re: [OT] Re: Why Is Escaping Data Considered So Magical?

2010-06-29 Thread Michael Torrie
On 06/29/2010 10:05 PM, Michael Torrie wrote: #include stdio.h int main(int argc, char ** argv) { char *buf = malloc(512 * sizeof(char)); const int a = 2, b = 3; snprintf(buf, sizeof buf, %d + %d = %d\n, a, b, a + b); ^^ Make that

Re: [OT] Re: Why Is Escaping Data Considered So Magical?

2010-06-29 Thread Michael Torrie
On 06/29/2010 10:17 PM, Michael Torrie wrote: On 06/29/2010 10:05 PM, Michael Torrie wrote: #include stdio.h int main(int argc, char ** argv) { char *buf = malloc(512 * sizeof(char)); const int a = 2, b = 3; snprintf(buf, sizeof buf, %d + %d = %d\n, a, b, a + b);

Re: Why Python3

2010-06-29 Thread John Yeung
On Jun 28, 1:58 pm, OKB (not okblacke) brennospamb...@nobrenspambarn.net wrote: Steven D'Aprano wrote: For the rest of us, you can do a lot with just Python 3.1, with or without C modules. Whether it does *enough* to be considered for deployment depends on what you're deploying it to do.

Re: Why Is Escaping Data Considered So Magical?

2010-06-29 Thread Carl Banks
On Jun 28, 2:44 am, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Carl Banks wrote: Indeed, strncpy does not copy that final NUL if it's at or beyond the nth element.  Probably the most mind-bogglingly stupid thing about the standard C library, which has lots of mind-boggling stupidity.

Re: Python profiler usage with objects

2010-06-29 Thread rik
harit harit.himanshu at gmail.com writes: Hi, I have a specific question regarding the usage of profiler. I am new to python programming I am trying to profile a function which I want to invoke as a class method, something like this import profile class Class: def doSomething():

[issue9077] argparse does not handle arguments correctly after --

2010-06-29 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: No, this is not intentional. Look at the docs for these attributes: parser.largs the current list of leftover arguments, ie. arguments that have been consumed but are neither options nor option arguments. Feel free to modify parser.largs,

[issue4925] Improve error message of subprocess when cannot open

2010-06-29 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: in PC/_subprocess.c, it should be enough to use PyErr_SetFromWindowsErrWithFilename() instead of PyErr_SetFromWindowsErr() -- keywords: +easy nosy: +amaury.forgeotdarc ___ Python tracker

[issue9112] argparse missing documentation for error() method

2010-06-29 Thread Mark Summerfield
New submission from Mark Summerfield m...@qtrac.eu: The argparse module's ArgumentParser class has an error() method that appears to have the same behavior as the optparse error() method, but this method is not mentioned in the documentation. -- assignee: d...@python components:

[issue5180] 3.1 cannot unpickle 2.7-created pickle

2010-06-29 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well, this is not so obviously wrong as you make it sound. If you look closer at object_new(), you will see that in sane situations it reduces to type-tp_alloc(type, 0) call. Today, yes. But tomorrow it may entail additional operations. If

[issue9106] remove numbers from 3-.. level entries in docs toc

2010-06-29 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: This should be taken to the Sphinx tracker, as the feature needs to be implemented first. -- nosy: +georg.brandl status: open - closed ___ Python tracker rep...@bugs.python.org

[issue8799] Hang in lib/test/test_threading.py

2010-06-29 Thread Zsolt Cserna
Changes by Zsolt Cserna zsolt.cse...@morganstanley.com: -- nosy: +csernazs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8799 ___ ___

  1   2   >