Re: Why this result with the re module

2010-11-02 Thread Yingjie Lan
> From: John Bond > re.findall('(.a.)+', 'Mary has a lamb') > > ['Mar', 'lam'] > It's because you're using capturing groups, and because of > how they work - specifically they only return the LAST match > if used with repetition (and multiple matches occur). It seems capturing groups is ass

Re: 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 > re.findall('(.a.)*', 'Mary has a lamb') > > ['Mar', '', '', 'lam', '', ''] > So - see if you can explain the first "problematic" result > now. Thanks a lot for explaining to me the second "problematic" result! But the fir

Re: Compare source code

2010-11-02 Thread Lawrence D'Oliveiro
In message , Seebs wrote: > At least in C, if I see: >if (foo) >a; >else >b; >c; > > I *know* that something is wrong. This is why, when I started learning Python, I soon developed the habit of inserting explicit “#end” markers. To

Re: functions, list, default parameters

2010-11-02 Thread Lawrence D'Oliveiro
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 or not? >>> >>> It doesn'

Re: functions, list, default parameters

2010-11-02 Thread Chris Rebert
On Fri, Oct 22, 2010 at 12:36 AM, Steven D'Aprano wrote: > On Thu, 21 Oct 2010 19:53:53 -0700, John Nagle wrote: >>> This is a common newbie stumbling-block: Don't use lists (or anything >>> mutable) as default argument values >> >>      That really should be an error. > > No it shouldn't. Punishi

Re: Why this result with the re module

2010-11-02 Thread John Bond
On 2/11/2010 7:00 AM, Yingjie Lan wrote: re.findall('(.a.)*',' ') #two spaces ['', '', ''] I must need more details of the matching algorithm to explain this? Regards, Yingjie Sorry - I hit enter prematurely on my last message. To take the above as an example (all your examples boil dow

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

2010-11-02 Thread Seebs
On 2010-11-02, brf...@gmail.com wrote: > How exactly does this relate to python? 1. It doesn't. It's spam. Duh. 2. Don't respond to spam. 3. Don't top-post. 4. If I see even one more post from you where the entire previous post is quoted under your text, I will plonk you. I warn you now be

Python equivalent of SOAP-ISIWoK

2010-11-02 Thread Johann Spies
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? Regards Johann --  May grace and peace be yours in abundance through the fu

Re: Why this result with the re module

2010-11-02 Thread Yingjie Lan
> From: John Bond > You might wonder why something that can match no input > text, doesn't return an infinite number of those matches at > every possible position, but they would be overlapping, and > findall explicitly says matches have to be non-overlapping. That scrabbed my itches, though the

Re: functions, list, default parameters

2010-11-02 Thread Lawrence D'Oliveiro
In message , Chris Rebert wrote: > On Fri, Oct 22, 2010 at 12:36 AM, Steven D'Aprano > wrote: >> >> Default mutable arguments have their place > > But it's a rather obscure one where it is almost never strictly > necessary to venture. Mediocre programmers with a hankering towards cleverness la

how to sync file on client and server

2010-11-02 Thread nu
I want to sync the file foder in different server,and I can't use ftp protocl. I try to sync files during defferent server and not use username and password to login. Anyone has good ideas? -- http://mail.python.org/mailman/listinfo/python-list

Re: playful coding problems for 10 year olds

2010-11-02 Thread Jonathan Hartley
On Nov 1, 8:31 pm, Daniel Fetchinson wrote: > Hi folks, > > My niece is interested in programming and python looks like a good > choice (she already wrote a couple of lines :)) She is 10 and I > thought it would be good to have a bunch of playful coding problems > for her, stuff that she could cod

Re: [Beginer Question] I heard about python needing somesort of_VariableName_ boiler plate?

2010-11-02 Thread Paul Kölle
Its the entry point if the script is executed directly. This message was sent from my 7 years old Dell D800 (without cables) Am 01.11.2010 19:18, schrieb brad...@hotmail.com: Sorry that is what I mean. What is it for? Sent wirelessly from my BlackBerry. -Original Message- From: MRAB Sen

Re: factorial of negative one (-1)

2010-11-02 Thread Hrvoje Niksic
Ken Watford writes: > 1.1 .as_integer_ratio() >> (2476979795053773, 2251799813685248) > > Handy, but if you need the exact representation, my preference is > float.hex, which seems to be the same as C99's %a format. [...] > Granted, it's not as easy for humans to interpret, but it's useful fo

Re: Why this result with the re module

2010-11-02 Thread John Bond
On 2/11/2010 8:53 AM, Yingjie Lan wrote: BUT, but. 1. I expected findall to find matches of the whole regex '(.a.)+', not just the subgroup (.a.) from re.findall('(.a.)+', 'Mary has a lamb') Thus it is probably a misunderstanding/bug?? Again, as soon as you put a capturing group in your exp

Mail Merge from python data

2010-11-02 Thread Dylan Evans
I'm setting up a database for an organisation who want to do mail merges in office 2010. I know i can use the MySQL ODBC driver for the mail merge but i have set up the database with lots of relations and many-to-many links which i'm sure will lead to a huge amount of confusion (I think, i don't re

Python documentation too difficult for beginners

2010-11-02 Thread jk
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://www.russellbeat

Re: Python documentation too difficult for beginners

2010-11-02 Thread srinivas hn
If you are really beginner in python you can look into the dive into python,search as in google as the same its quite helpful for beginners.Also you can go for the byte of python. CHEERS CNA 9986229891 On Tue, Nov 2, 2010 at 4:42 PM, jk wrote: > Hi, > > I've been coding in PHP and Java for yea

Re: Compare source code

2010-11-02 Thread Steven D'Aprano
On Mon, 01 Nov 2010 22:24:03 +, Grant Edwards wrote: > On 2010-11-01, Lawrence D'Oliveiro > wrote: [...] >> I'm getting less and less keen on that particular feature of Python... > > Why? > > Other languages have similar problems if you remove salient bits of > syntax before comparing two s

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Steven D'Aprano
On Tue, 02 Nov 2010 11:16:46 +1300, Lawrence D'Oliveiro wrote: > In message <4cce6ff6.2050...@v.loewis.de>, Martin v. Loewis wrote: > >> (in fact, I can't think any situation where I would use the backslash). > > for \ > Description, Attr, ColorList \ > in \ > ( >

Re: Compare source code

2010-11-02 Thread Steven D'Aprano
On Mon, 01 Nov 2010 22:48:16 +, Peter Pearson wrote: > I must concede that some awkwardness results from assigning significance > to something (whitespace) that many tools are inclined to treat as > insignificant. Then the tools are broken. Or perhaps I should say: Th enth etool sarebroke n

Re: Python documentation too difficult for beginners

2010-11-02 Thread jk
This (http://epydoc.sourceforge.net/stdlib/) is what I'm talking about. Why aren't the official docs like this, and why has it taken me 2 days of searching? All this needs is a search engine behind it and it'd be perfect. -- http://mail.python.org/mailman/listinfo/python-list

Re: playful coding problems for 10 year olds

2010-11-02 Thread Daniel Fetchinson
>> Hi folks, >> >> My niece is interested in programming and python looks like a good >> choice (she already wrote a couple of lines :)) She is 10 and I >> thought it would be good to have a bunch of playful coding problems >> for her, stuff that she could code herself maybe after some initial >> h

Re: Compare source code

2010-11-02 Thread Steven D'Aprano
On Tue, 02 Nov 2010 04:16:28 +, Seebs wrote: > e.g., any email sent > to my work account is being magically transformed into HTML (no one > knows why) on the server, so I can't get correct indentation except > in attachments. I suppose then you're going to insist that Python should stop using

Re: Python documentation too difficult for beginners

2010-11-02 Thread Tim Golden
On 02/11/2010 11:23, jk wrote: This (http://epydoc.sourceforge.net/stdlib/) is what I'm talking about. Why aren't the official docs like this, and why has it taken me 2 days of searching? All this needs is a search engine behind it and it'd be perfect. I'm glad you find the epydoc format usefu

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Roy Smith
In article , Chris Rebert wrote: > I find the level of deviation from PEP 8 in that file rather disturbing. > In any case, the backslashes are easily avoided, and readability > improved IMHO, via refactoring: > > desc_attr_colors_triples = (("normal", "image", MainWindow.ColorsNormalList), >

Re: Python documentation too difficult for beginners

2010-11-02 Thread Martin P. Hellwig
On 11/02/10 10:42, jk wrote: Is there much chance that the Python maintainers will change their documentation system to make it more like Java or PHP? How would I go about trying to make that happen? I am by no means an authority however since you ask it here I feel compelled to give you my opi

Re: functions, list, default parameters

2010-11-02 Thread Steven D'Aprano
On Tue, 02 Nov 2010 22:06:40 +1300, Lawrence D'Oliveiro wrote: > In message , Chris > Rebert wrote: > >> On Fri, Oct 22, 2010 at 12:36 AM, Steven D'Aprano >> wrote: >>> >>> Default mutable arguments have their place >> >> But it's a rather obscure one where it is almost never strictly >> necess

Re: Python documentation too difficult for beginners

2010-11-02 Thread brf256
A tutorial type book can also be great for reference and documentation (as long as its current). I would recommend a non-programmers tutorial to python even if you have started programming in other languages before. Also its a wiki book and is free. -Braden Faulkner Sent wirelessly from my Bla

Re: functions, list, default parameters

2010-11-02 Thread Steven D'Aprano
On Tue, 02 Nov 2010 20:12:49 +1300, Lawrence D'Oliveiro wrote about mutable defaults: > Which is what we’re talking about > here: a language construct which is probably one of the top 3 sources of > grief to Python newbies. And not-so-newbies. I call bullshit. Maybe you should spend some time o

Re: Python documentation too difficult for beginners

2010-11-02 Thread Tim Wintle
On Tue, 2010-11-02 at 04:23 -0700, jk wrote: > This (http://epydoc.sourceforge.net/stdlib/) is what I'm talking > about. Aaaarrr > Why aren't the official docs like this, Because not everyone likes documentation like that. Personally I far prefer the existing documentation to the JavaDoc-s

Re: 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 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 of my poor presentation. I suggested

Re: Python documentation too difficult for beginners

2010-11-02 Thread Antoine Pitrou
On Tue, 2 Nov 2010 04:23:49 -0700 (PDT) jk wrote: > This (http://epydoc.sourceforge.net/stdlib/) is what I'm talking > about. > > Why aren't the official docs like this, and why has it taken me 2 days > of searching? What's wrong with this: http://docs.python.org/library/ ? If you have specific

Re: functions, list, default parameters

2010-11-02 Thread Steven D'Aprano
On Tue, 02 Nov 2010 00:40:17 -0700, Chris Rebert wrote: > On Fri, Oct 22, 2010 at 12:36 AM, Steven D'Aprano > wrote: >> On Thu, 21 Oct 2010 19:53:53 -0700, John Nagle wrote: This is a common newbie stumbling-block: Don't use lists (or anything mutable) as default argument values >>> >>>

Re: Why this result with the re module

2010-11-02 Thread Vlastimil Brom
2010/11/2 Yingjie Lan : >> From: John Bond >> Subject: Re: Why this result with the re module > ... > I suggested findall return a tuple of re.MatchObject(s), > with each MatchObject instance representing a match. > This is consistent with the re.match() function anyway. > And it will eliminate th

Re: playful coding problems for 10 year olds

2010-11-02 Thread Neil Cerutti
On 2010-11-01, Martin v. Loewis wrote: >> My niece is interested in programming and python looks like a good >> choice (she already wrote a couple of lines :)) She is 10 and I >> thought it would be good to have a bunch of playful coding problems >> for her, stuff that she could code herself maybe

Re: Compare source code

2010-11-02 Thread Emile van Sebille
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. But it does. What is spurious whitespace if not noise, afte

Re: Python documentation too difficult for beginners

2010-11-02 Thread jk
On Nov 2, 11:49 am, Tim Golden wrote: > But why do you imagine that the core > Python documentation -- developed and maintained by a group of people > who clearly have some idea what they're doing -- should change to a > format which happens to suit you? It's not just me who's found the current d

Learning book recommendation?

2010-11-02 Thread Matty Sarro
Hey Everyone! I'm looking for a Python book to start really learning the language since I've been using it more and more. Something similar to what you'd see in a computer science class - a few pages of theory and explanation of commands/syntax/constructs/data structures and then some exercises to

Re: Python documentation too difficult for beginners

2010-11-02 Thread Steven D'Aprano
On Tue, 02 Nov 2010 03:42:22 -0700, jk wrote: > Hi, > > I've been coding in PHP and Java for years, and their documentation is > concise, well structured and easy to scan. Well, that's one opinion. > Others have mentioned this apparently for years (see: > http://stackoverflow.com/questions/40

Re: Learning book recommendation?

2010-11-02 Thread brf256
Hey there, I would reccomend a non-programmers tutorial to python by Josh coglatti and its a free wiki book. Also I would recommend byte into python. Both are great for beginers. Best of luck! -- Braden Faulkner Sent wirelessly from my BlackBerry device on the Bell network. Envoyé sans fil par

Re: Compare source code

2010-11-02 Thread Grant Edwards
On 2010-11-01, Peter Pearson wrote: > On Mon, 1 Nov 2010 22:24:03 + (UTC), 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

Re: Compare source code

2010-11-02 Thread Grant Edwards
On 2010-11-02, Seebs wrote: > On 2010-11-01, Grant Edwards wrote: >> On 2010-11-01, Lawrence D'Oliveiro wrote: >>> I'm getting less and less keen on that particular feature of >>> Python... > >> Why? > >> Other languages have similar problems if you remove salient bits of >> syntax before compa

Re: Compare source code

2010-11-02 Thread Grant Edwards
On 2010-11-02, Steven D'Aprano wrote: > Ah, but other languages don't make the guarantee that you can add or > remove random whitespace in arbitrary places and still have code that > works correctly! > > Of course, neither does Python, but there's a certain type of > personality that is never ha

Re: Python documentation too difficult for beginners

2010-11-02 Thread Grant Edwards
On 2010-11-02, brf...@gmail.com wrote: > A tutorial type book can also be great for reference and > documentation (as long as its current). I would recommend a > non-programmers tutorial to python even if you have started > programming in other languages before. Also its a wiki book and is > free

Re: Why this result with the re module

2010-11-02 Thread Yingjie Lan
> From: Vlastimil Brom > Subject: Re: Why this result with the re module > in that case you may use re.finditer(...) Thanks for pointing this out. Still I'd love to see re.findall never discards the whole match, even if a tuple is returned. Yingjie -- http://mail.python.org/mailma

Re: Python documentation too difficult for beginners

2010-11-02 Thread jk
On Nov 2, 1:42 pm, Steven D'Aprano wrote: > It's always difficult to know how much information is too much. The PHP > docs seem to take an "everything including the kitchen sink" approach. > Given that approach, it makes sense to divide everything into > subsections, one page per function. But wit

Re: Python documentation too difficult for beginners

2010-11-02 Thread Paul Rudin
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" gives you the correct (for 2.7) pag

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

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: 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: 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: 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: 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 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: 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 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 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: 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: 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 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 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 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: 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 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: 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: 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: 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

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 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"

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 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 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: 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 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: 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: 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 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, 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 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: *** 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

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: 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

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: *** 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: *** 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: 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 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: 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 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: *** 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: 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: 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 , 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 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: 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: 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

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: *** 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

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

  1   2   >