Re: Argument of the bool function

2011-04-09 Thread Robert Kern
On 2011-04-09 23:15 , rusi wrote: On Apr 10, 8:35 am, Grant Edwards wrote: On 2011-04-09, Lie Ryan wrote: On 04/09/11 08:59, candide wrote: Le 09/04/2011 00:03, Ethan Furman a ?crit : > bool([x]) dir([object]) Not very meaningful, isn't it ? The error says it unambiguously, dir()

Re: python on iPad (PyPad)

2011-04-09 Thread Matt Schinckel
On Apr 9, 2:13 pm, Jon Dowdall wrote: > Hi All, > > Sorry for the blatant advertising but hope some of you may be interested > to know that I've created an iPad application containing the python > interpreter and a simple execution environment. It's available in iTunes > athttp://itunes.apple.com/

How to structure a multi-steps(and substeps) scripts

2011-04-09 Thread 超 李
Hi everybody. I wrote a script and it's code structure like this: def step1:    local_var1 = ...    # some other variable definitions for step1    def substep11:        pass    def substep12:        pass    # more substeps def step2:    local_var1 = ...    # some other variable definitions for st

Re: Argument of the bool function

2011-04-09 Thread rusi
On Apr 10, 8:35 am, Grant Edwards wrote: > On 2011-04-09, Lie Ryan wrote: > > > On 04/09/11 08:59, candide wrote: > >> Le 09/04/2011 00:03, Ethan Furman a ?crit : > > >>>  > bool([x]) > >> dir([object]) > >> Not very meaningful, isn't it ? > > > The error says it unambiguously, dir() does not tak

Re: Argument of the bool function

2011-04-09 Thread Grant Edwards
On 2011-04-09, Lie Ryan wrote: > On 04/09/11 08:59, candide wrote: >> Le 09/04/2011 00:03, Ethan Furman a ?crit : >> >>> > bool([x]) >> dir([object]) >> Not very meaningful, isn't it ? > > The error says it unambiguously, dir() does not take *keyword* > arguments; instead dir() takes *position

Re: Retrieving Python Keywords

2011-04-09 Thread Steven D'Aprano
On Sun, 10 Apr 2011 03:28:10 +0200, candide wrote: > Python is very good at introspection, so I was wondering if Python (2.7) > provides any feature to retrieve the list of its keywords (and, as, > assert, break, ...). import keyword -- Steven -- http://mail.python.org/mailman/listinfo/python

Re: Retrieving Python Keywords

2011-04-09 Thread John Connor
Actually this is all it takes: import keywords print keywords.kwlist --jac On Sat, Apr 9, 2011 at 8:57 PM, Chris Angelico wrote: > On Sun, Apr 10, 2011 at 11:28 AM, candide wrote: >> Python is very good at introspection, so I was wondering if Python (2.7) >> provides any feature to retrieve the

Re: Retrieving Python Keywords

2011-04-09 Thread Terry Reedy
On 4/9/2011 9:28 PM, candide wrote: Python is very good at introspection, so I was wondering if Python (2.7) provides any feature to retrieve the list of its keywords (and, as, assert, break, ...). Yes. (Look in the manuals, or try the obvious imports ;-) -- Terry Jan Reedy -- http://mail.pyt

Re: Retrieving Python Keywords

2011-04-09 Thread Chris Angelico
On Sun, Apr 10, 2011 at 11:28 AM, candide wrote: > Python is very good at introspection, so I was wondering if Python (2.7) > provides any feature to retrieve the list of its keywords (and, as, assert, > break, ...). I don't know about any other way, but here's a really REALLY stupid method. For

Re: [OT] Free software versus software idea patents

2011-04-09 Thread Ben Finney
Steven D'Aprano writes: > On Thu, 07 Apr 2011 07:50:56 +1000, Ben Finney wrote: > > > Steven D'Aprano writes: > > > >> Mono is free, open source software that is compatible with .NET > > […] > > > > It's difficult to take a claim of “free” seriously for a technology > > (Mono) that knowingly i

Retrieving Python Keywords

2011-04-09 Thread candide
Python is very good at introspection, so I was wondering if Python (2.7) provides any feature to retrieve the list of its keywords (and, as, assert, break, ...). -- http://mail.python.org/mailman/listinfo/python-list

Re: Argument of the bool function

2011-04-09 Thread candide
Le 10/04/2011 01:22, Robert Kern a écrit : No one is saying that every instance of "foo([arg])" in the docs means that the given argument is named such that it is available for keyword arguments. What people are saying is that for bool(), *that happens to be the case*. what a piece of luck!

Re: [OT] Free software versus software idea patents

2011-04-09 Thread Steven D'Aprano
On Fri, 08 Apr 2011 01:37:45 -0500, harrismh777 wrote: > Steven D'Aprano wrote: >>> The reason Mono gets hit (from others besides me) is that they are in >>> > partnership and collaboration with Microsoft, consciously and >>> > unconsciously. This must be punished. >> Just like Python, Apache, a

Re: DOCTYPE + SAX

2011-04-09 Thread jdownie
On Apr 10, 1:47 am, Alain Ketterlin wrote: > jdownie writes: > > I'm trying to get xml.sax to interpret a file that begins with… > > > >www.w3.org/TR/html4/loose.dtd"> > > > After a while I get... > > >http://www.w3.org/TR/html4/loose.dtd:31:2:error in processing > > external entity reference >

Re: Argument of the bool function

2011-04-09 Thread Robert Kern
On 2011-04-08 17:59 , candide wrote: Le 09/04/2011 00:03, Ethan Furman a écrit : > bool([x]) > Convert a value to a Boolean, using the standard truth testing > procedure. > As you can see, the parameter name is 'x'. OK, your response is clarifying my point ;) I didn't realize that in the

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-09 Thread John Ladasky
On Apr 9, 10:15 am, sturlamolden wrote: > On 9 apr, 09:36, John Ladasky wrote: > > > Thanks for finding my discussion!  Yes, it's about passing numpy > > arrays to multiple processors.  I'll accomplish that any way that I > > can. > > My preferred ways of doing this are: > > 1. Most cases for par

Re: Python 3.2 vs Java 1.6

2011-04-09 Thread Hans Georg Schaathun
On Sat, 9 Apr 2011 01:32:17 +1000, Chris Angelico wrote: : On Sat, Apr 9, 2011 at 1:21 AM, km wrote: : > How does python 3.2 fare compared to Java 1.6 in terms of performance ? : > any pointers or observations ? : : How do apples compare to oranges in terms of performance? My performance is

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-09 Thread sturlamolden
On 9 apr, 09:36, John Ladasky wrote: > Thanks for finding my discussion!  Yes, it's about passing numpy > arrays to multiple processors.  I'll accomplish that any way that I > can. My preferred ways of doing this are: 1. Most cases for parallel processing are covered by libraries, even for neur

Re: Literate Programming

2011-04-09 Thread Hans Georg Schaathun
On Sat, 9 Apr 2011 03:45:55 -0700 (PDT), Jim wrote: : I'm sorry; I don't understand "commenting code within a block" but I : wondered if it meant you were not fully familiar with the idea of the : web-type programs. The idea was pretty clear from the web page you cited. The web system allow

Re: Literate Programming

2011-04-09 Thread Hans Georg Schaathun
On Fri, 8 Apr 2011 12:58:34 -0400, Tim Arnold wrote: : If you already know LaTeX, you might experiment with the *.dtx docstrip : capability. Hi. Hmmm. That's a new thought. I never thought of using docstrip with anything but LaTeX. It sounds like a rather primitive tool for handling pyth

Re: python on iPad (PyPad)

2011-04-09 Thread Eric Snow
On Fri, Apr 8, 2011 at 11:13 PM, Jon Dowdall wrote: > Hi All, > > Sorry for the blatant advertising but hope some of you may be interested > to know that I've created an iPad application containing the python > interpreter and a simple execution environment. It's available in iTunes > at http://it

Re: DOCTYPE + SAX

2011-04-09 Thread Alain Ketterlin
jdownie writes: > I'm trying to get xml.sax to interpret a file that begins with… > > www.w3.org/TR/html4/loose.dtd"> > > After a while I get... > > http://www.w3.org/TR/html4/loose.dtd:31:2: error in processing > external entity reference > > …although… > > time curl http://www.w3.org/TR/html4/

handbag in Australia canada

2011-04-09 Thread christina
Yves Saint Laurent YSL Bags Online Handbags Yves Saint Laurent handbags Best Price bags Bristol bag frisbee golf YSL Handbags Replica Tennis handbags sale buy buy cheap bag online in alaska YSL Bags To Buy bag mouth blow job Buy cheap handbags online cheapest Price handbags Deliverd Uk bag boy golf

Surge 2011 CFP Deadline Extended

2011-04-09 Thread Katherine Jeschke
OmniTI is pleased to announce that the CFP deadline for Surge 2011, the Scalability and Performance Conference, (Baltimore: Sept 28-30, 2011) has been extended to 23:59:59 EDT, April 17, 2011. The event focuses upon case studies that demonstrate successes (and failures) in Web applications and Inte

COOGI T-shirt COOGI T-shirt COOGI T-shirt COOGI T-shirt COOGI T-shirt COOGI T-shirt

2011-04-09 Thread christina
T-Shirts AFF T-shirt ARMANI T-shirt www.idesigerworld02.com BAPE T-shirt BBC T-shirt www.idesigerworld02.com BOSS T-shirt www.idesigerworld02.com Burberry T-shirt CA T-shirt men's www.idesigerworld02.com CA T-shirt women's COOGI T-shirt CRYSTAL ROCK women's D&G T-shirt www.idesigerworld02.com DIES

D&G T-shirt D&G T-shirt D&G T-shirt D&G T-shirt D&G T-shirt D&G T-shirt D&G T-shirt D&G T-shirt

2011-04-09 Thread christina
T-Shirts AFF T-shirt ARMANI T-shirt www.idesigerworld02.com BAPE T-shirt BBC T-shirt www.idesigerworld02.com BOSS T-shirt www.idesigerworld02.com Burberry T-shirt CA T-shirt men's www.idesigerworld02.com CA T-shirt women's COOGI T-shirt CRYSTAL ROCK women's D&G T-shirt www.idesigerworld02.com DIES

Discount Wholesale CROWN HOLDER short jeans man Discount Wholesale CROWN HOLDER short jeans man

2011-04-09 Thread christina
Discount Wholesale EVISU short jeans man Discount Wholesale G-star long jeans man Discount Wholesale Gucci long jeans man Discount Wholesale Jeep long jeans man Discount Wholesale LB long jeans man Discount Wholesale Lee long jeans man Discount Wholesale Levis long jeans man Discount Wholesale L

Re: python on iPad (PyPad)

2011-04-09 Thread Aahz
In article <4d9feaea$0$29996$c3e8da3$54964...@news.astraweb.com>, Jon Dowdall wrote: > >Sorry for the blatant advertising but hope some of you may be interested >to know that I've created an iPad application containing the python >interpreter and a simple execution environment. It's available i

DOCTYPE + SAX

2011-04-09 Thread jdownie
I'm trying to get xml.sax to interpret a file that begins with… After a while I get... http://www.w3.org/TR/html4/loose.dtd:31:2: error in processing external entity reference …although… time curl http://www.w3.org/TR/html4/loose.dtd …gives… real0m26.888s user0m0.006s sys 0m0.01

Re: python on iPad (PyPad)

2011-04-09 Thread Jon Dowdall
On Sat, 09 Apr 2011 00:36:58 -0700, Raymond Hettinger wrote: > On Apr 8, 10:13 pm, Jon Dowdall wrote: >> Hi All, >> >> Sorry for the blatant advertising but hope some of you may be >> interested to know that I've created an iPad application containing the >> python interpreter and a simple execut

Re: Generators and propagation of exceptions

2011-04-09 Thread Kent Johnson
On Apr 8, 3:47 pm, r wrote: > I'm already making something like this (that is, if I understand you > correctly). In the example below (an "almost" real code this time, I > made too many mistakes before) all the Expressions (including the > Error one) implement an 'eval' method that gets called by

Common practice for multiple python versions sharing 3rd party modules

2011-04-09 Thread Daniel Fetchinson
Hi folks, In order to test my own modules with various python versions I've installed python 2.4, 2.5, 2.6, 2.7, 3.1, 3.2. The original installation on my fedora box was 2.6 and all 3rd party modules so far were installed under /usr/lib/python2.6/site-packages. Since now the executable 'python' po

ANN: fathom 0.2.0

2011-04-09 Thread Filip Gruszczyński
Hi, I have released version 0.2.0 of fathom, python3 package for database inspection. Fathom supports retrieving database schema from Sqlite3, PostgreSQL and MySQL. This is still very early version and I am experimenting with different approaches. I would be very thankful for any input and sugges

Re: ANN: fathom 0.2.0

2011-04-09 Thread Filip Gruszczyński
I forgot links: Homepage: http://code.google.com/p/fathom/ Documentation: http://code.google.com/p/fathom/wiki/Manual -- Filip Gruszczyński -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.2 vs Java 1.6

2011-04-09 Thread Octavian Rasnita
From: "Steven D'Aprano" Newsgroups: comp.lang.python > On Sat, 09 Apr 2011 01:32:17 +1000, Chris Angelico wrote: > >> On Sat, Apr 9, 2011 at 1:21 AM, km wrote: >>> Hi All, >>> >>> How does python 3.2 fare compared to Java 1.6 in terms of performance ? >>> any pointers or observations ? >> >> H

Re: Literate Programming

2011-04-09 Thread Jim
On Apr 8, 3:21 pm, Hans Georg Schaathun wrote: > Interesting tool, but it solves only part of the problem. > I could use it as a replacement for pylit, but I would then still > have the problem of commenting code within a block, which is a > reST/sphinx problem. I'm sorry; I don't understand "com

Python-URL! - weekly Python news and links (Apr 9)

2011-04-09 Thread Cameron Laird
QOTW: [You'll have to see it for yourself: !Viva 2.7.1!] http://groups.google.com/group/comp.lang.python/msg/8d79c5ee3913f82d "De-briefing" is characteristically something we do too little; there's a LOT of value in systematic examination of what we've experienced. Unladen Swallow pre

Re: python on iPad (PyPad)

2011-04-09 Thread Raymond Hettinger
On Apr 8, 10:13 pm, Jon Dowdall wrote: > Hi All, > > Sorry for the blatant advertising but hope some of you may be interested > to know that I've created an iPad application containing the python > interpreter and a simple execution environment. It's available in iTunes > athttp://itunes.apple.com

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-09 Thread John Ladasky
On Apr 7, 6:10 pm, sturlamolden wrote: > On 8 apr, 02:38, sturlamolden wrote: > > > I should probably fix it for 64-bit now. Just recompiliong with 64-bit > > integers will not work, because I intentionally hardcoded the higher > > 32 bits to 0. > > That was easy, 64-bit support for Windows is do

Re: Python 3.2 vs Java 1.6

2011-04-09 Thread Chris Rebert
On Fri, Apr 8, 2011 at 11:34 PM, Steven D'Aprano wrote: > Have a look at the programming language shoot- > out: > > http://shootout.alioth.debian.org/ > > Don't jump to conclusions: > > http://shootout.alioth.debian.org/dont-jump-to-conclusions.php > > [By the way, does anyone know why the number