Re: Namespace problem?

2010-07-01 Thread Josh English
On Jul 1, 2:50 pm, Matt McCredie wrote: > > That doesn't give me enough information to help you with the issue. In general > you need to provide enough code to reproduce the failure, not some modified > version that doesn't fail. My guess is that the "if True" is actually > something > else, and

Re: Namespace problem?

2010-07-01 Thread Mark Lawrence
On 01/07/2010 22:30, Josh English wrote: I have a script that generates a report from a bunch of data I've been collecting for the past year. I ran the script, successfully, for several weeks on test runs and creating more detailed reports. Today (back from vacation) and the script doesn't work.

Re: Python v3.1.2 documentation question

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

Re: Namespace problem?

2010-07-01 Thread Rhodri James
On Thu, 01 Jul 2010 23:07:53 +0100, Josh English wrote: On Jul 1, 2:50 pm, Matt McCredie wrote: My guess is that the "if True" is actually something else, and it isn't being interpreted as "True". As such, "fws_last_col" never gets assigned, and thus never gets created. You can fix that

Re: automate minesweeper with python

2010-07-01 Thread Emile van Sebille
On 7/1/2010 2:52 PM Jay said... pywinauto looks to be almost perfect. All I need now is to read the numbers uncovered when a minesweeper square is clicked on, or that I just hit a mine. ... or, you could always win... http://www.daniweb.com/forums/thread186209.html Emile PS -- in about '77

Re: Solutions for hand injury from computer use

2010-07-01 Thread Chris Rebert
On Thu, Jul 1, 2010 at 10:00 AM, Andreas Waldenburger wrote: > On Thu, 01 Jul 2010 09:35:31 -0700 Ethan Furman > wrote: > >> I'll have to give the left-handed mouse a try... hmmm -- not too bad >> so far. > > Since we're on the subject: I find the best solution for "lots of > typing with a little

Re: Namespace problem?

2010-07-01 Thread Peter Pearson
On Thu, 01 Jul 2010 23:30:33 +0100, Rhodri James wrote: > On Thu, 01 Jul 2010 23:07:53 +0100, Josh English > wrote: > >> On Jul 1, 2:50 pm, Matt McCredie wrote: >>> >>> My guess is that the "if True" is actually something >>> else, and it isn't being interpreted as "True". As such, "fws_last_col

Re: Why Is Escaping Data Considered So Magical?

2010-07-01 Thread Lawrence D'Oliveiro
In message , Michael Torrie wrote: > 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

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

2010-07-01 Thread Lawrence D'Oliveiro
In message <4c2ccd9c$0$1643$742ec...@news.sonic.net>, John Nagle wrote: > The approach to arrays in C is just broken, for historical reasons. Nevertheless, it it at least self-consistent. To return to my original macro: #define Descr(v) &v, sizeof v As written, this works whatever the type

Re: Python v3.1.2 documentation question

2010-07-01 Thread Aahz
In article , Ethan Furman wrote: >Aahz wrote: >> In article , >> Ethan Furman wrote: >>> Stephen Hansen wrote: On 6/29/10 10:01 AM, Ethan Furman wrote: > In the glossary section it states: > > > nested scope > > The ability to refer to a variable in an enclosing de

Re: OT Komodo Edit, line selection gutter is one pixel wide?

2010-07-01 Thread André
On Jul 1, 1:39 pm, John Doe wrote: > Is there a way to increase the line selection gutter width? It > seems to be only one pixel wide. In other words... When I single > click on the left side of the line, in order to automatically > select the line, the pointer must be in a precise single pixel >

Re: Python dynamic attribute creation

2010-07-01 Thread Steven D'Aprano
On Thu, 01 Jul 2010 23:46:55 +0800, WANG Cong wrote: > However, I think setattr() is a builtin function, using it exposes the > *magic* of metaprogramming (or class-programming, if more correct) at a > first glance. There's nothing magic about metaprogramming. If you're a programmer, you write p

Re: automate minesweeper with python

2010-07-01 Thread Terry Reedy
On 7/1/2010 6:42 PM, Emile van Sebille wrote: On 7/1/2010 2:52 PM Jay said... pywinauto looks to be almost perfect. All I need now is to read the numbers uncovered when a minesweeper square is clicked on, or that I just hit a mine. ... or, you could always win... http://www.daniweb.com/forum

Re: Composition of functions

2010-07-01 Thread Terry Reedy
On 7/1/2010 3:54 AM, Stephen Hansen wrote: On 7/1/10 12:45 AM, Terry Reedy wrote: On 7/1/2010 12:32 AM, Mladen Gogala wrote: On Wed, 30 Jun 2010 21:04:28 -0700, Stephen Hansen wrote: However, you can easily get what you want by using the 'reversed' function (and similarly, the 'sorted' funct

Re: Python dynamic attribute creation

2010-07-01 Thread Chris Rebert
On Thu, Jul 1, 2010 at 6:10 PM, Steven D'Aprano wrote: > Engineers are quite > happy to make the tools they need to make the tools they need to make the > tools they need to make something. Carpenters would think you were crazy > if you said that building a scaffold was "meta-carpentry" and there

Re: Python v3.1.2 documentation question

2010-07-01 Thread Terry Reedy
On 7/1/2010 6:42 PM, Ethan Furman wrote: Hmmm Well, as this is my first ever bug post (yay! ;) Great! > I *think* this is what you want: http://bugs.python.org/issue9121 I believe Benjamin meant that it was already fixed in http://docs.python.org/dev/py3k/ which is currently the 3.2a0

Re: Ignorance and Google Groups (again)

2010-07-01 Thread D'Arcy J.M. Cain
On Thu, 1 Jul 2010 21:34:15 +0300 Dotan Cohen wrote: > I'm one of them. Gmail is great for mailing lists, though I would > never use it as a personal email client. But I'm more of a lurker than > a poster on this list, so D'Arcy won't miss me anyway. As the song says. "How can I miss you if you w

Re: automate minesweeper with python

2010-07-01 Thread Emile van Sebille
On 7/1/2010 6:17 PM Terry Reedy said... On 7/1/2010 6:42 PM, Emile van Sebille wrote: On 7/1/2010 2:52 PM Jay said... pywinauto looks to be almost perfect. All I need now is to read the numbers uncovered when a minesweeper square is clicked on, or that I just hit a mine. ... or, you could al

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

2010-07-01 Thread Rami Chowdhury
On Thursday 01 July 2010 16:50:59 Lawrence D'Oliveiro wrote: > Nevertheless, it it at least self-consistent. To return to my original > macro: > > #define Descr(v) &v, sizeof v > > As written, this works whatever the type of v: array, struct, whatever. > Doesn't seem to, sorry. Using Michae

Why defaultdict?

2010-07-01 Thread Steven D'Aprano
I would like to better understand some of the design choices made in collections.defaultdict. Firstly, to initialise a defaultdict, you do this: from collections import defaultdict d = defaultdict(callable, *args) which sets an attribute of d "default_factory" which is called on key lookups wh

Re: OT Komodo Edit, line selection gutter is one pixel wide?

2010-07-01 Thread John Doe
André wrote: > ... set it up so that linenumbers are shown, then you get a much > larger target to click and select the line. Yes... And it allows clicking and dragging the number area to select multiple lines. Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why defaultdict?

2010-07-01 Thread Chris Rebert
On Thu, Jul 1, 2010 at 9:11 PM, Steven D'Aprano wrote: > I would like to better understand some of the design choices made in > collections.defaultdict. Perhaps python-dev should've been CC-ed... > Firstly, to initialise a defaultdict, you do this: > > from collections import defaultdict > d = d

Is there a reference manual for "pyparsing"?

2010-07-01 Thread John Nagle
Is there a reference manual for "pyparsing"? Not a tutorial. Not a wiki. Not a set of examples. Not a "getting started guide". Something that actually documents what each primitive does? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a reference manual for "pyparsing"?

2010-07-01 Thread Chris Rebert
On Thu, Jul 1, 2010 at 9:50 PM, John Nagle wrote: >  Is there a reference manual for "pyparsing"?  Not a tutorial.  Not a wiki. > Not a set of examples.  Not a "getting started guide". > Something that actually documents what each primitive does? http://pyparsing.svn.sourceforge.net/viewvc/pypars

Re: Why defaultdict?

2010-07-01 Thread Raymond Hettinger
On Jul 1, 9:11 pm, Steven D'Aprano wrote: > I would like to better understand some of the design choices made in > collections.defaultdict. . . . > If callable is None, defaultdicts are > *exactly* equivalent to built-in dicts, so I wonder why the API wasn't > added on to dict rather than a separ

Re: Is there a reference manual for "pyparsing"?

2010-07-01 Thread John Nagle
On 7/1/2010 10:02 PM, Chris Rebert wrote: On Thu, Jul 1, 2010 at 9:50 PM, John Nagle wrote: Is there a reference manual for "pyparsing"? Not a tutorial. Not a wiki. Not a set of examples. Not a "getting started guide". Something that actually documents what each primitive does? http://py

Re: Is there a reference manual for "pyparsing"?

2010-07-01 Thread Chris Rebert
On Thu, Jul 1, 2010 at 10:08 PM, John Nagle wrote: > On 7/1/2010 10:02 PM, Chris Rebert wrote: >> On Thu, Jul 1, 2010 at 9:50 PM, John Nagle  wrote: >>>  Is there a reference manual for "pyparsing"?  Not a tutorial.  Not a >>> wiki. >>> Not a set of examples.  Not a "getting started guide". >>> So

Re: Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-01 Thread Steve
On Jul 2, 4:48 am, pyt...@bdurham.com wrote: > Curious if any of you are using GPG or PGP encryption and/or signatures > in your Python apps? > > In particular are you: > > 1. clearsigning specific emails? > 2. validating clearsigned emails from others? > 3. encrypting/decrypting files? > 4. genera

Re: automate minesweeper with python

2010-07-01 Thread Ian Kelly
On Thu, Jul 1, 2010 at 7:17 PM, Terry Reedy wrote: > Did you actually try it? Though skeptical, I did, briefly, until I decided > that it probably should have been dated April 1. There is no way to enter > text into minesweeper, nor to make it full screen, nor, as far as I know, > for it to toggle

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

2010-07-01 Thread Dave Pawson
I'm the OP btw. On 1 July 2010 18:10, Dennis Lee Bieber wrote: >> I think that Python "could" be a alternative to bash and have some >> advantages, but it's a long way off from being fully implemented. > >        While a somewhat klutzier language in aspects (the , is both an > parameter separat

<    1   2