Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread Yingjie Lan
--- On Wed, 11/3/10, John Bond wrote: > I just explained that (I think!)! The outer capturing group > uses > repetition, so it returns the last thing that was matched > by the inner > group, which was an empty string. > According to yourself, the last match of the inner group is also empt

How to highlight Label/Text in tkinter ?

2010-11-02 Thread VGNU Linux
Hi, I am writing a program teach myself python and tkinter. Below given is a program which displays label with different fonts and sizes. How to highlight text and change font size if the up/down arrow keys are pressed ? from Tkinter import * import tkFont class MyFrame(Frame): def __init__(s

Re: text file reformatting

2010-11-02 Thread iwawi
On Nov 1, 6:50 pm, "cbr...@cbrownsystems.com" wrote: > On Nov 1, 1:58 am, iwawi wrote: > > > > > > > On 1 marras, 09:59, "cbr...@cbrownsystems.com" > > > wrote: > > > On Oct 31, 11:46 pm, iwawi wrote: > > > > > On 31 loka, 21:48, Tim Chase wrote: > > > > > > > PRJ01001 4 00100END > > > > > > P

Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread Yingjie Lan
--- On Wed, 11/3/10, John Bond wrote: >3) then said there must be >=0 occurrences of what's inside it, >which of course there is, so that has no effect. > >((.a.)*)* Hi, I think there should be a difference: unlike before, now what's inside the outer group can match an empty s

Re: Mail Merge from python data

2010-11-02 Thread Tim Harig
This page didn't make it to through to my nntp server so I appologize if I miss something that was covered. On 2010-11-03, Dennis Lee Bieber wrote: > On Tue, 2 Nov 2010 20:32:13 +1000, Dylan Evans > declaimed the following in gmane.comp.python.general: > >> I'm setting up a database for an organ

Re: Python documentation too difficult for beginners

2010-11-02 Thread rantingrick
AD i agree with you! The official python tutorial and the official docs are pretty much a twisted mass of confusion to the initiated programmer. Even today when i try yo search the docs i find the result quite frankly useless. And the search reminds me of the old XP "puppy dog" search. The doc AR

Re: Man pages and info pages

2010-11-02 Thread Tim Harig
On 2010-11-03, Teemu Likonen wrote: > * 2010-11-02 19:36 (UTC), Tim Harig wrote: >> I thoroughly agree. The default info viewers are quite possibly the >> most counterintuitive programs I have ever encountered. I never did >> bother to learn how to use them. I instead installed the more >> intuiti

Coca Cola Scholarship: Are You Qualified?

2010-11-02 Thread PHP.CCC
Coca Cola Scholarship: Are You Qualified? Before you apply for Coca Cola scholarship, here are the things you should know: Coca-Cola Scholars Foundation programs There are two types of Coca-Cola Scholars Foundation programs: ·2-Year Colleges Scholarship Program · Scholars Program for high school s

Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread John Bond
On 3/11/2010 4:23 AM, Yingjie Lan wrote: --- On Wed, 11/3/10, MRAB wrote: From: MRAB Subject: Re: Must be a bug in the re module [was: Why this result with the re module] To: python-list@python.org Date: Wednesday, November 3, 2010, 8:02 AM On 03/11/2010 03:42, Yingjie Lan wrote: Therefore th

Re: Man pages and info pages

2010-11-02 Thread Teemu Likonen
* 2010-11-02 19:36 (UTC), Tim Harig wrote: > On 2010-11-02, Teemu Likonen wrote: >> There is also the problem that people are less familiar with info >> browsers than the usual "less" pager which is used by "man" command. > > I thoroughly agree. The default info viewers are quite possibly the > m

Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread John Bond
OK, I've got that, and I have no problem with the capturing part. My real problem is with the number of total matches. *I think it should be 4 matches in total but findall gives 6 matches*, for the new regex '((.a.)*)*'. I'd love to know what you think about this. Many thanks! Yingjie We'v

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Ben Finney
Robert Kern writes: > I'd go one step further: > > styles = [ > ("normal", "image", MainWindow.ColorsNormalList), > ("highlighted", "highlight", MainWindow.ColorsHighlightedList), > ("selected","select",MainWindow.ColorsSelectedList), > ] > > Keepi

Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread Yingjie Lan
--- On Wed, 11/3/10, MRAB wrote: > From: MRAB > Subject: Re: Must be a bug in the re module [was: Why this result with the re > module] > To: python-list@python.org > Date: Wednesday, November 3, 2010, 8:02 AM > On 03/11/2010 03:42, Yingjie Lan > wrote: > Therefore the outer (first) group is a

Py3: decode subprocess output

2010-11-02 Thread Gnarlodious
Under Python 2.6, commands.getoutput returns text type str containing ANSI Terminal formatting hex characters: "\x1b[1;31mSun : \x1b[1;36m114.902\x1b[0m - 0\xf800' (-)\x1b[1;33m I have a system for parsing out the relevant parts and I prefer to keep using that system. Under Python 3, subproces

Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread Yingjie Lan
--- On Wed, 11/3/10, John Bond wrote: > Just to clarify - findall is returning: > > [ (only match in outer group, 1st match in inner group) > , (only match in outer group, 2nd match in inner group) > , (only match in outer group, 3rd match in inner group) > , (only match in outer group, 4th mat

Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread John Bond
On 3/11/2010 4:02 AM, MRAB wrote: On 03/11/2010 03:42, Yingjie Lan wrote: Matches an empty string, returns '' The result is therefore ['Mar', '', '', 'lam', '', ''] Thanks, now I see it through with clarity. Both you and JB are right about this case. However, what if the regex is ((.a.)*)* ?

Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread John Bond
On 3/11/2010 3:55 AM, John Bond wrote: Could you please reconsider how would you work with this new one and see if my steps are correct? If you agree with my 7-step execution for the new regex, then: We finally found a real bug for re.findall: re.findall('((.a.)*)*', 'Mary has a lamb') [(''

Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread MRAB
On 03/11/2010 03:42, Yingjie Lan wrote: Matches an empty string, returns '' The result is therefore ['Mar', '', '', 'lam', '', ''] Thanks, now I see it through with clarity. Both you and JB are right about this case. However, what if the regex is ((.a.)*)* ? Actually, in hindsight, my explan

Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread John Bond
Could you please reconsider how would you work with this new one and see if my steps are correct? If you agree with my 7-step execution for the new regex, then: We finally found a real bug for re.findall: re.findall('((.a.)*)*', 'Mary has a lamb') [('', 'Mar'), ('', ''), ('', ''), ('', 'lam'

Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread Yingjie Lan
> Matches an empty string, returns '' > > The result is therefore ['Mar', '', '', 'lam', '', ''] Thanks, now I see it through with clarity. Both you and JB are right about this case. However, what if the regex is ((.a.)*)* ? -- http://mail.python.org/mailman/listinfo/python-list

Re: *** FBI gets a warm welcome in Chicago for their EXCELLENTperformance - cheers to NEW CONS ***

2010-11-02 Thread Gunner Asch
On Tue, 02 Nov 2010 13:58:16 -0700, Rich Grise wrote: >On Tue, 02 Nov 2010 14:17:29 -0700, Gunner Asch wrote: >> >> But...shrug..there will be far less after the Great Cull > >I think some people might be surprised as to exactly _who_ gets "culled". > >Good Luck! >Rich Indeed. So stock

Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread Yingjie Lan
> Your regex says "Zero or more consecutive occurrences of > something, always returning the most possible".  That's > what it does, at every position - only matching emptyness > where it couldn't match anything (findall then skips a > character to avoid overlapping/infinite empty > matches),  and

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Robert Kern
On 2010-11-02 19:46 , Ben Finney wrote: Instead, I'd do:: styles = [ ("normal", "image", MainWindow.ColorsNormalList), ("highlighted", "highlight", MainWindow.ColorsHighlightedList), ("selected","select",MainWindow.ColorsSelectedList)] I'd go o

Re: Python documentation too difficult for beginners

2010-11-02 Thread John Bond
My 2c: I use the ActiveState distro, and it's winhelp doco. It's generally ok and some things, like Dive Into Python, I've found excellent. But I do quite regularly find myself cursing at the vagueness of the index, and some of the content seems to require that you know it before you read i

Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread MRAB
On 03/11/2010 01:41, Yingjie Lan wrote: From: John Bond Subject: Re: Why this result with the re module To: "Yingjie Lan" Cc: python-list@python.org Date: Tuesday, November 2, 2010, 8:09 PM On 2/11/2010 12:19 PM, Yingjie Lan wrote: From: John Bond Subject: Re: Why this result with the re module

Re: Python documentation too difficult for beginners

2010-11-02 Thread Lawrence D'Oliveiro
In message <2010110223050345181-nizum...@mcnuggetscom>, Nizumzen wrote: > On 2010-11-02 10:42:22 +, jk said: > >> I've been coding in PHP and Java for years, and their documentation is >> concise, well structured and easy to scan. > > Are you mad? Javadoc is one of the worst examples of sour

Re: Trouble with importing

2010-11-02 Thread Seebs
On 2010-11-02, Ben Ahrens wrote: > I did indeed continue to top-post, and you should plonk me. Edited for accuracy. Done. -s -- Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nos...@seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia

Re: Compare source code

2010-11-02 Thread Seebs
On 2010-11-03, D'Arcy J.M. Cain wrote: > On 03 Nov 2010 01:20:40 GMT > Seebs wrote: >> However, I have probably seen all of two or three bugs ever related to >> mis-indented C, and I've had various things screw up or wreck indentation > Really? I have never seen bugs in C related to indentation

Re: Compare source code

2010-11-02 Thread Tim Harig
On 2010-11-03, Tim Harig wrote: > On 2010-11-03, D'Arcy J.M. Cain wrote: >> On Wed, 3 Nov 2010 00:41:46 + (UTC) >> Tim Harig wrote: >> Identifying the end of the block has some value. And the braces just >> make the code noisy. > > With good syntax highlighting, you don't notice them unless

Re: Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread Chris Melville
Disagree in this case, where the whole regex matches an empty string. Greadiness will match as much as possible. So it will also match the empty strings between consecutive characters as much as possible, once we have properly defined all the unique empty strings. Because of greadiness, fewer ma

Re: Py3: Import relative path module

2010-11-02 Thread MRAB
On 03/11/2010 01:48, Gnarlodious wrote: I admit I don't understand any of what was said here. Or why it is so hard what I am trying to do. I searched Google for a few hours looking for a way to import a module from an absolute path, but that was a waste of time too. To reiterate, I am trying to

Re: Compare source code

2010-11-02 Thread Tim Harig
On 2010-11-03, D'Arcy J.M. Cain wrote: > On Wed, 3 Nov 2010 00:41:46 + (UTC) > Tim Harig wrote: >> On 2010-11-02, D'Arcy J.M. Cain wrote: >> Actually, I have found similar markers to be useful everywhere. I don't >> like the way my editor tries to fold Python code, so I started inserting >>

Re: Py3: Import relative path module

2010-11-02 Thread Gnarlodious
I admit I don't understand any of what was said here. Or why it is so hard what I am trying to do. I searched Google for a few hours looking for a way to import a module from an absolute path, but that was a waste of time too. To reiterate, I am trying to import a Def function from a file one leve

Must be a bug in the re module [was: Why this result with the re module]

2010-11-02 Thread Yingjie Lan
> From: John Bond > Subject: Re: Why this result with the re module > To: "Yingjie Lan" > Cc: python-list@python.org > Date: Tuesday, November 2, 2010, 8:09 PM > On 2/11/2010 12:19 PM, Yingjie Lan > wrote: > >> From: John Bond > >> Subject: Re: Why this result with the re module > > Firstly, than

Re: Compare source code

2010-11-02 Thread D'Arcy J.M. Cain
On 03 Nov 2010 01:20:40 GMT Seebs wrote: > However, I have probably seen all of two or three bugs ever related to > mis-indented C, and I've had various things screw up or wreck indentation Really? I have never seen bugs in C related to indentation. I have seen plenty related to braces. What I

Re: Compare source code

2010-11-02 Thread Seebs
On 2010-11-02, Grant Edwards wrote: > Huh? Indentation is invisible? You can't see the indentation in > Python source code? The difference between tabs and spaces is invisible on a great number of the devices on which people display code. Indentation is visible, but the underlying structure of

Re: Compare source code

2010-11-02 Thread D'Arcy J.M. Cain
On Wed, 3 Nov 2010 00:41:46 + (UTC) Tim Harig wrote: > On 2010-11-02, D'Arcy J.M. Cain wrote: > Actually, I have found similar markers to be useful everywhere. I don't > like the way my editor tries to fold Python code, so I started inserting > folding markers myself: > > # foo {{{ >

Re: Compare source code

2010-11-02 Thread Seebs
On 2010-11-02, Tim Harig wrote: > This is Python's most noticable blemish outside of the community. > Everybody knows that Python is the language that forces you to use a > particular style of formatting; and, that is a turn-off for many people. Honestly, I could probably live with that; the kill

Re: Compare source code

2010-11-02 Thread Seebs
On 2010-11-02, D'Arcy J.M. Cain wrote: > "Large" is no excuse for incompetency. It is in practice. > So configure it to recognize Python files and act accordingly. So far as I know, it doesn't have a feature to do this. In any event, I work around it okay. >> No, they aren't. See... That wou

Re: Compare source code

2010-11-02 Thread Seebs
On 2010-11-02, Emile van Sebille wrote: > What is right is that there's no question that quux is subsequent to baz > in all cases barring exceptions (and assuming no tabs intermixed) Yes, but that doesn't mean it does what the programmer intended, just that it does what it does. > The apparent

Re: Re: Multiple cookie headers and urllib2

2010-11-02 Thread evilmrhenry
Ian Kelly wrote: On Tue, Nov 2, 2010 at 4:50 PM, evilmrhenry > wrote: Python 2.6.4 on Ubuntu. I'm not sure if this is a bug or if I'm just doing this wrong... I'm trying to include two cookies when I use urllib2 to view a page. #Code Start

Re: Multiple cookie headers and urllib2

2010-11-02 Thread Ian Kelly
On Tue, Nov 2, 2010 at 4:50 PM, evilmrhenry wrote: > Python 2.6.4 on Ubuntu. I'm not sure if this is a bug or if I'm just doing > this wrong... > > I'm trying to include two cookies when I use urllib2 to view a page. > #Code Start > import urllib2 > > opener = urllib2.build_opener(urllib2.HTTPCoo

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Ben Finney
Roy Smith writes: > In article , > Lawrence D'Oliveiro wrote: > > > In message , Roy Smith wrote: > > > > > In this case, I think I would do: > > > > > > styles = [("normal", "image", MainWindow.ColorsNormalList), > > > ("highlighted", "highlight", MainWindow.ColorsHighligh

Re: Compare source code

2010-11-02 Thread Tim Harig
On 2010-11-02, D'Arcy J.M. Cain wrote: > "Redundant" is right. However, there is a use for such comments: > > if foo: > bar > else: > baz > if snafu: > cookie > #endif snafu > quux > #endif foo Actually, I have found similar markers

Re: Python documentation too difficult for beginners

2010-11-02 Thread Kee Nethery
> >> >> Therefore, if you truly want changes in the documentation, I suggest that, >> rather then whining to the group, you make some of the changes yourself. > > I agree up to here, with a different interpretation of the last clause. > Work within the existing system. There are currently 250 o

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Roy Smith
In article , Lawrence D'Oliveiro wrote: > In message , Roy Smith wrote: > > > In this case, I think I would do: > > > > styles = [("normal", "image", MainWindow.ColorsNormalList), > > ("highlighted", "highlight", MainWindow.ColorsHighlightedList), > > ("selected",

Re: Compare source code

2010-11-02 Thread Grant Edwards
On 2010-11-02, Lawrence D'Oliveiro wrote: > In message , Grant Edwards wrote: > >> On 2010-11-01, Lawrence D'Oliveiro >> wrote: >> >>> In message <8j8am4fk2...@mid.individual.net>, Peter Pearson wrote: > diff -b oldfile newfile Warning: "diff -b" won't detect changes in in

Re: Python documentation too difficult for beginners

2010-11-02 Thread James Mills
On Wed, Nov 3, 2010 at 9:05 AM, Nizumzen wrote: > Are you mad? Javadoc is one of the worst examples of source code > documentation I can possibly imagine. I would go as far to say that the > Python guys should do exactly the opposite of Javadoc. For what it's worth, I concur. cheers James --

Re: Python documentation too difficult for beginners

2010-11-02 Thread AD.
On Nov 3, 7:43 am, Tim Harig wrote: > On 2010-11-02, jk wrote: > > > As for the 9 paragraphs statement, there's a usability book that > > applies here - it's called "Don't make me think". I shouldn't have to > > Anything that promotes a lack of thinking sends up red flags in my head. > We want to

Re: *** FBI gets a warm welcome in Chicago for their EXCELLENTperformance - cheers to NEW CONS ***

2010-11-02 Thread Michael A. Terrell
Gunner Asch wrote: > > On Tue, 02 Nov 2010 22:13:40 GMT, david.bostw...@chemistry.gatech.edu > (David Bostwick) wrote: > > ?In article > ?47e0b3a3-54fb-4489-95a8-b5ec6015c...@j25g2000yqa.googlegroups.com?, small > Pox ?smallpox...@gmail.com? wrote: > ?[...] > ? > ?Some WD40 on your keyboard mi

Multiple cookie headers and urllib2

2010-11-02 Thread evilmrhenry
Python 2.6.4 on Ubuntu. I'm not sure if this is a bug or if I'm just doing this wrong... I'm trying to include two cookies when I use urllib2 to view a page. #Code Start import urllib2 opener = urllib2.build_opener(urllib2.HTTPCookieProcessor()) opener.addheaders.append(("Cookie", "user=abcd"))

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: > In this case, I think I would do: > > styles = [("normal", "image", MainWindow.ColorsNormalList), > ("highlighted", "highlight", MainWindow.ColorsHighlightedList), > ("selected","select",MainWindow.ColorsSelectedList)] > > for

Re: Python documentation too difficult for beginners

2010-11-02 Thread Lawrence D'Oliveiro
In message , jk wrote: > This (http://epydoc.sourceforge.net/stdlib/) is what I'm talking > about. Framesets? Is that really your idea of well-laid-out documentation? Using a feature which has been derided (and dropped in HTML5) because of its effect on usability and accessibility? -- http:/

Re: Python documentation too difficult for beginners

2010-11-02 Thread Nizumzen
On 2010-11-02 10:42:22 +, jk said: Hi, I've been coding in PHP and Java for years, and their documentation is concise, well structured and easy to scan. Are you mad? Javadoc is one of the worst examples of source code documentation I can possibly imagine. I would go as far to say that th

Re: Compare source code

2010-11-02 Thread Lawrence D'Oliveiro
In message , Grant Edwards wrote: > On 2010-11-01, Lawrence D'Oliveiro > wrote: > >> In message <8j8am4fk2...@mid.individual.net>, Peter Pearson wrote: >>> diff -b oldfile newfile >>> >>> Warning: "diff -b" won't detect changes in indentation. Changes in >>> indentation can change a Py

Re: Python documentation too difficult for beginners

2010-11-02 Thread Terry Reedy
On 11/2/2010 2:43 PM, Tim Harig wrote: The real question is what do you want to gain by your posts here. You should already know that most groups are, by their very nature, slow to make changes to the status quo. The problem tends to be exasperated in open source projects where any changes mea

Re: Compare source code

2010-11-02 Thread Lawrence D'Oliveiro
In message , Emile van Sebille wrote: > On 11/1/2010 4:22 PM Lawrence D'Oliveiro said... > >> In message, Emile van >> Sebille wrote: >> >>> At least you can look at python code and _know_ that spurious placement >>> of required line noise don't have the ability to impact what the code >>> does.

Re: *** FBI gets a warm welcome in Chicago for their EXCELLENTperformance - cheers to NEW CONS ***

2010-11-02 Thread silver light
On Nov 2, 1:58 pm, Rich Grise wrote: > On Tue, 02 Nov 2010 14:17:29 -0700, Gunner Asch wrote: > > > But...shrug..there will be far less after the Great Cull > > I think some people might be surprised as to exactly _who_ gets "culled". > > Good Luck! > Rich On Nov 2, 11:03 am, t...@sevak.i

Re: *** FBI gets a warm welcome in Chicago for their EXCELLENT performance - cheers to NEW CONS ***

2010-11-02 Thread silver light
On Nov 2, 11:03 am, t...@sevak.isi.edu (Thomas A. Russ) wrote: > silver light writes: > > *** FBI gets a warm welcome in Chicago for their EXCELLENT performance > > - cheers to NEW CONS *** > > Oh geez.  Just when we've beaten back the infix hordes, someone comes up > and suggests replacing CONS w

Re: Python documentation too difficult for beginners

2010-11-02 Thread John McMonagle
On 03/11/10 05:04, John Nagle wrote: >Right. Google does a far better job of organizing Python's > documentation than the Python community does. I don't even try > looking up anything starting at Python.org; I always start > with a Google search. Even though Python.org's search is > powered

Re: *** FBI gets a warm welcome in Chicago for their EXCELLENTperformance - cheers to NEW CONS ***

2010-11-02 Thread Rich Grise
On Tue, 02 Nov 2010 14:17:29 -0700, Gunner Asch wrote: > > But...shrug..there will be far less after the Great Cull I think some people might be surprised as to exactly _who_ gets "culled". Good Luck! Rich -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble with importing

2010-11-02 Thread Ben Ahrens
I did indeed use the particular revision compiled with the addons. I discovered that if I log in as root or make myself a user with full privileges I can successfully import the rfid module, just not using sudo. Of course neither of those options are particularly good ones, but that's the only wa

Re: *** FBI gets a warm welcome in Chicago for their EXCELLENTperformance - cheers to NEW CONS ***

2010-11-02 Thread Gunner Asch
On Tue, 02 Nov 2010 22:13:40 GMT, david.bostw...@chemistry.gatech.edu (David Bostwick) wrote: >In article ><47e0b3a3-54fb-4489-95a8-b5ec6015c...@j25g2000yqa.googlegroups.com>, small Pox > wrote: >[...] > >Some WD40 on your keyboard might help keep the Caps Lock key from sticking so >often. The

Re: *** FBI gets a warm welcome in Chicago for their EXCELLENTperformance - cheers to NEW CONS ***

2010-11-02 Thread David Bostwick
In article <47e0b3a3-54fb-4489-95a8-b5ec6015c...@j25g2000yqa.googlegroups.com>, small Pox wrote: [...] Some WD40 on your keyboard might help keep the Caps Lock key from sticking so often. -- http://mail.python.org/mailman/listinfo/python-list

Re: Compare source code

2010-11-02 Thread Ethan Furman
Grant Edwards wrote: On 2010-11-02, Ethan Furman wrote: Steven D'Aprano wrote: Personally, I'm more disturbed by the default prompt in the interactive interpreter. >>> clashes with the symbol used for quoting text in email and news. That causes me far more distress than indentation. I final

Re: Trouble with importing

2010-11-02 Thread Jerry Hill
On Tue, Nov 2, 2010 at 3:33 PM, Ben Ahrens wrote: > Jerry, thanks for the reply, I was swamped with other things for the > better part of a week.. Anyway, I tried using the verbose flag when > attempting the import.  I didn't see anything that meant anything to > me, but here's the bit surrounding

problem with opening a new python program in a new window (and keeping track of the process)

2010-11-02 Thread Zak Kinion
Hello all, What I want to do: launch seperate python programs from one main program (multi-threading will not achieve this because the mechanize library uses one shared global opener object which will not suit my needs) I want the scripts launched to be in seperate windows that i can see the out

Re: *** FBI gets a warm welcome in Chicago for their EXCELLENTperformance - cheers to NEW CONS ***

2010-11-02 Thread small Pox
If you want to act like a NETCOP then you must identify yourself and your organization or else you are considered a FACELESS COWARD CRIMINAL whose sole intent is to carry out CENSORSHIP of truth. Unless you ACTIVELY apply the same PURSUIT to ALL OTHER IRRELEVANT postings, you will be considered a

Re: Compare source code

2010-11-02 Thread Grant Edwards
On 2010-11-02, Ethan Furman wrote: > Steven D'Aprano wrote: >> Personally, I'm more disturbed by the default prompt in the interactive >> interpreter. >>> clashes with the symbol used for quoting text in email >> and news. That causes me far more distress than indentation. > > Here here! > > I f

Re: Man pages and info pages (was: Python documentation too difficult for beginners)

2010-11-02 Thread Tim Harig
On 2010-11-02, Tim Harig wrote: > On 2010-11-02, Teemu Likonen wrote: >> With the text terminal info browser called "info" as well as Emacs' info >> browser you can use command "s" (stands for "search"). It prompts for a >> regexp pattern to search in the whole document, including subsections >>

Re: Compare source code

2010-11-02 Thread rustom
Sigh! How flame-wars tend to lose the original question: On Oct 31, 5:02 pm, jf wrote: > Hi, > > I've a project with tabs and spaces mixed (yes I know it's bad). Do python aficionados want to suggest that mixing spaces and tabs is a 'good thing'? -- http://mail.python.org/mailman/listinfo/pytho

Re: Man pages and info pages (was: Python documentation too difficult for beginners)

2010-11-02 Thread Tim Harig
On 2010-11-02, Teemu Likonen wrote: > * 2010-11-02 18:43 (UTC), Tim Harig wrote: > >> The manual format contains all of the information on one page that can >> be easily searched whereas the info pages are split into sections that >> must be viewed individually. With the man pages, you can almost

Re: Compare source code

2010-11-02 Thread Seebs
On 2010-11-02, Grant Edwards wrote: > And you think compatibility with your broken e-mail server is a good > reason to change the syntax of a programming language? No. I never said that. >> Many editors helpfully convert spaces to tabs by default some or all >> of the time. And so on. > Such

Re: Compare source code

2010-11-02 Thread Seebs
On 2010-11-02, Grant Edwards wrote: > True, but the fact that diff has an option that for Python sources > will produces useless results doesn't seem like a valid indictment of > Python's syntax and semantics. The question is *why* diff has that option. The answer is because whitespace changes (

Re: ANN: PyQt v4.8.1 Released

2010-11-02 Thread Дамјан Георгиевски
>> PyQt is available under the GPL and a commercial license. > > Surely you mean “proprietary” rather than “commercial”. There is > nothing about the GPL that prevents “commercial” use. I think he means a license that *he* sells comercially :) -- дамјан ((( http://damjan.softver.org.mk/ )))

Re: Compare source code

2010-11-02 Thread Tim Harig
On 2010-11-02, Seebs wrote: > On 2010-11-02, Steven D'Aprano wrote: >> If your >> editor changes spaces to tabs, or visa versa, without being told to do so >> (either by an explicit command or an obvious setting), then your editor >> is broken. > > Yes. But that's the thing -- I *want* that b

Re: Python documentation too difficult for beginners

2010-11-02 Thread Kee Nethery
On Nov 2, 2010, at 11:07 AM, Ian wrote: > On 02/11/2010 14:47, jk wrote: >> I think the key difference is that I don't want to have to *read* >> the >> python docs - I want to be able to scan for what I'm looking for and >> find it easily. That makes me productive. >> > Hi jk, > > I totally a

Re: Compare source code

2010-11-02 Thread Ethan Furman
Steven D'Aprano wrote: Personally, I'm more disturbed by the default prompt in the interactive interpreter. >>> clashes with the symbol used for quoting text in email and news. That causes me far more distress than indentation. Here here! I finally did "sys.ps1 = '--> '" in my interactive sta

Re: Python documentation too difficult for beginners

2010-11-02 Thread John Nagle
On 11/2/2010 7:53 AM, Paul Rudin wrote: Steven D'Aprano writes: A fair point -- the built-in open comes up as hit #30, whereas searching for open in the PHP page brings up fopen as hit #1. But the PHP search also brings up many, many hits -- ten pages worth. OTOH googling for "python open"

Man pages and info pages (was: Python documentation too difficult for beginners)

2010-11-02 Thread Teemu Likonen
* 2010-11-02 18:43 (UTC), Tim Harig wrote: > The manual format contains all of the information on one page that can > be easily searched whereas the info pages are split into sections that > must be viewed individually. With the man pages, you can almost always > find what you want with a quick se

Re: Python documentation too difficult for beginners

2010-11-02 Thread Ian
On Nov 2, 8:47 am, jk wrote: > You're right in that the python docs in this case are less lines, but > that's one of the problems. It doesn't mention anywhere the extra > detail you've added regarding exceptions thrown. That's the kind of > thing that probably comes through experience or some kind

Re: Python documentation too difficult for beginners

2010-11-02 Thread Tim Harig
On 2010-11-02, jk wrote: > As for the 9 paragraphs statement, there's a usability book that > applies here - it's called "Don't make me think". I shouldn't have to Anything that promotes a lack of thinking sends up red flags in my head. We want to recruit smart people who think, not idiots. > go

Re: Compare source code

2010-11-02 Thread D'Arcy J.M. Cain
On Tue, 2 Nov 2010 18:15:03 + (UTC) Grant Edwards wrote: > You can add redundant, semantically empty structure info to Python > programs just as easily as you can to C programs: > > if foo: > bar > else: > baz > quux > #endif "Redundant" is right. However

Re: Compare source code

2010-11-02 Thread D'Arcy J.M. Cain
On 02 Nov 2010 17:58:06 GMT Seebs wrote: > On 2010-11-02, D'Arcy J.M. Cain wrote: > > "No one > > knows why" email is being "magically" transformed? > > Yay for a large company IT department with both MS and Blackberry > stuff involved. "Large" is no excuse for incompetency. > > Your editor ha

Re: Python documentation too difficult for beginners

2010-11-02 Thread Ian
On 02/11/2010 14:47, jk wrote: I think the key difference is that I don't want to have to*read* the python docs - I want to be able to scan for what I'm looking for and find it easily. That makes me productive. Hi jk, I totally agree. But you will get nowhere. A few weeks back I complained th

Re: Compare source code

2010-11-02 Thread Grant Edwards
On 2010-11-02, Emile van Sebille wrote: > On 11/2/2010 10:58 AM Seebs said... >> No, they aren't. See... That would work *if I knew for sure what the intent >> was*. >> >> if foo: >> bar >> else: >> baz >> quux >> >> Does it look right? We have *no idea*, bec

Re: Compare source code

2010-11-02 Thread Grant Edwards
On 2010-11-02, Seebs wrote: > On 2010-11-02, D'Arcy J.M. Cain wrote: >> You have problems. Indentation as syntax isn't one of them. > > In the absence of indentation as syntax, they haven't bugged me. > >> "No one >> knows why" email is being "magically" transformed? > > Yay for a large company

Re: Compare source code

2010-11-02 Thread Emile van Sebille
On 11/2/2010 10:58 AM Seebs said... No, they aren't. See... That would work *if I knew for sure what the intent was*. if foo: bar else: baz quux Does it look right? We have *no idea*, because we don't actually know whether quux was *intended

Re: Compare source code

2010-11-02 Thread Seebs
On 2010-11-02, Steven D'Aprano wrote: > I've lost more time to reading people's bitching about indentation than I > have dealing with indentation problems. Doesn't totally surprise me. :) > But then, I don't insist on using tools which are broken by design. Neither do I. > If your email serv

Re: Compare source code

2010-11-02 Thread Seebs
On 2010-11-02, D'Arcy J.M. Cain wrote: > You have problems. Indentation as syntax isn't one of them. In the absence of indentation as syntax, they haven't bugged me. > "No one > knows why" email is being "magically" transformed? Yay for a large company IT department with both MS and Blackberry

Re: Python equivalent of SOAP-ISIWoK

2010-11-02 Thread John Nagle
On 11/2/2010 1:58 AM, Johann Spies wrote: SOAP-ISIWoK is a Perl library for assessing Thomson Reuters Web of Knowledge Web Services. I don't know Perl well enough to use that library without spending too much time on it. Is there a Python equivalent available? The "Suds" library can call S

Re: functions, list, default parameters

2010-11-02 Thread Paul Rudin
Terry Reedy writes: > Suppose I write an nasty C extension that mutates tuples. What then > would be illegal about... Depends on exactly what we mean by legal. If immutability is part of the language spec (rather than an artifact of a particular implementation) then a compiler could assume immut

Re: Python documentation too difficult for beginners

2010-11-02 Thread Terry Reedy
On 11/2/2010 6:42 AM, jk wrote: Compare for instance the differences in ease of use, and speed of use, of these: http://docs.python.org/library/functions.html#open http://uk.php.net/manual/en/function.fopen.php The former is difficult to find (try searching for 'open' in the search box and see

Re: functions, list, default parameters

2010-11-02 Thread Ian
On Nov 2, 5:59 am, Steven D'Aprano wrote: > Certainly it's the mediocre programmers who seem to be incapable of > understanding that Python has no way of telling whether arbitrary objects > are mutable or not. > > def foo(x, y=list()): >     pass > > Is y a mutabledefaultor not? > > For the benefi

Re: functions, list, default parameters

2010-11-02 Thread Robert Kern
On 11/2/10 2:12 AM, Lawrence D'Oliveiro wrote: In message, Robert Kern wrote: On 2010-11-01 22:31 , Lawrence D'Oliveiro wrote: In message<8j1seqfa1...@mid.individual.net>, Gregory Ewing wrote: Steven D'Aprano wrote: And how does Python know whether some arbitrary default object is mutable

Re: functions, list, default parameters

2010-11-02 Thread Terry Reedy
On 11/2/2010 3:12 AM, Lawrence D'Oliveiro wrote: "Immutable objects" are just those without an obvious API for modifying them. After initial creation ;-)/ They are ones with NO legal language constructs for modifying them. Suppose I write an nasty C extension that mutates tuples. What then

Re: factorial of negative one (-1)

2010-11-02 Thread Terry Reedy
On 11/2/2010 6:11 AM, Hrvoje Niksic wrote: 1.1 .hex() '0x1.1999ap+0' Here it is immediately obvious that the final digit of the infinite sequence "1.1999..." is rounded from 9 to a. Printing the number with any more digits would just reveal zeros, as expected. Does anyone know why Py

Re: Why this result with the re module

2010-11-02 Thread John Bond
On 2/11/2010 12:19 PM, Yingjie Lan wrote: From: John Bond Subject: Re: Why this result with the re module Firstly, thanks a lot for your patient explanation. this time I have understood all your points perfectly. Secondly, I'd like to clarify some of my points, which did not get through because

Re: Python documentation too difficult for beginners

2010-11-02 Thread Bruno Desthuilliers
jk a écrit : Hi, I've been coding in PHP and Java for years, and their documentation is concise, well structured and easy to scan. Others have mentioned this apparently for years (see: http://stackoverflow.com/questions/4046166/easy-to-navigate-online-python-reference-manual/4070851 and http://

Re: extracting variables accessed and written from function / rule-based function calls

2010-11-02 Thread Daniel
> >> You might be interested by the story of how AstraZeneca tackled that > >> kind of problem in PyDrone:http://www.python.org/about/success/astra/ that is interesting! So it seems they store the values in a dictionary. For each value they associate a function that gets called when the value is n

  1   2   >