Re: How to test if a module exists?

2010-11-11 Thread Lawrence D'Oliveiro
In message mailman.853.1289449099.2218.python-l...@python.org, Jon Dufresne wrote: On Wed, Nov 10, 2010 at 1:50 AM, Lawrence D'Oliveiro wrote: In message mailman.780.1289326087.2218.python-l...@python.org, Jon Dufresne wrote: On Mon, Nov 8, 2010 at 11:35 PM, Lawrence D'Oliveiro ... I see

Re: How to test if a module exists?

2010-11-11 Thread Lawrence D'Oliveiro
In message mailman.843.1289438674.2218.python-l...@python.org, Tim Chase wrote: Amusingly, as others have noted, you replied with an unobfuscated email address. This http://mail.python.org/pipermail/python-list/2010-November/1260153.html would seem to be an independent, true record of what

Re: How to test if a module exists?

2010-11-11 Thread Lawrence D'Oliveiro
In message mailman.894.1289510633.2218.python-l...@python.org, MRAB wrote: ... the next one at 3 Nov 2010 22:40 Re: Allowing comments after the line continuation backslash and _all_ the subsequent ones arrived with an _unobfuscated_ email address. You mean from this one on

Re: How to test if a module exists?

2010-11-11 Thread Lawrence D'Oliveiro
I have just received an admission from Barry Warsaw that a hack was done on python-list specifically to deal with bounces caused by a list member trying to reply to my obfuscated e-mail address. I have asked him to undo that hack. If he likes, he can filter out that (obfuscated) address of

Re: How to test if a module exists?

2010-11-11 Thread Lawrence D'Oliveiro
I have asked for my messages to be filtered from being distributed to python-list. As far as I’m concerned, the lot of you can bloody piss off. -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess.Popen deadlocks

2010-11-11 Thread Lawrence D'Oliveiro
In message 2cf9a225-7d1c-4490-8a62-807e79bdd...@n30g2000vbb.googlegroups.com, eraserix wrote: I try to control several process from a python script. Each process is started from a thread, the threads just wait() for the child to exit and can then be joined. Main waits for SIGINT. After it

Re: Help Documenting Python Syntax

2010-11-10 Thread Lawrence D'Oliveiro
In message ibbs16$do...@reader1.panix.com, Grant Edwards wrote: My question is why bother with 2.5? In mitigation, your honour, let me plead that the latest Debian Stable still ships with that version. -- http://mail.python.org/mailman/listinfo/python-list

Re: subclassing str

2010-11-10 Thread Lawrence D'Oliveiro
In message 87lj52kwln.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: One option is to implement a subclass which implements the additional protocol. This is why I think object orientation ruins your ability to think properly. For “protocol” read “function”. If you want to implement

Re: How to test if a module exists?

2010-11-10 Thread Lawrence D'Oliveiro
In message mailman.780.1289326087.2218.python-l...@python.org, Jon Dufresne wrote: On Mon, Nov 8, 2010 at 11:35 PM, Lawrence D'Oliveiro ... I see that you published my unobfuscated e-mail address on USENET for all to see. I obfuscated it for a reason, to keep the spammers away. I'm assuming

Re: Learning Pyhton - Functional Programming - How intersect/difference two dict with dict/values? fast!

2010-11-10 Thread Lawrence D'Oliveiro
In message mailman.787.1289336127.2218.python-l...@python.org, Terry Reedy wrote: To echo John Nagle's point, if you want non-masochist volunteers to read your code, write something readable like: dict1 = {'ab': [[1,2,3,'d3','d4',5], 12], 'ac': [[1,3,'78a','79b'], 54],

Re: Development Vs Release

2010-11-10 Thread Lawrence D'Oliveiro
In message 201011100749474192-nom...@thisaddresscom, Sven wrote: I don't like the idea of flags inside the code as they can often get missed when developers release their code, ending up with released versions that import modules from the developer's working directory. I have used a flag,

Re: Silly newbie question - Caret character (^)

2010-11-10 Thread Lawrence D'Oliveiro
In message slrnidm3d9.2ubm.usenet-nos...@guild.seebs.net, Seebs wrote: On 2010-11-10, Terry Reedy tjre...@udel.edu wrote: I was referring to Schildt using gets() all the time and thereby teaching new C generations to do he same. Ahh, yes. I am told that the current plan is to kill it in

Re: Is Eval *always* Evil?

2010-11-10 Thread Lawrence D'Oliveiro
In message mailman.847.1289443207.2218.python-l...@python.org, Robert Kern wrote: Well, the key reason he is using strings is so that he can easily slap on a Django admin UI to allow certain users to add new expressions. lambdas don't help with that. Provded you can trust the users who are

Re: DTD Parsing

2010-11-10 Thread Lawrence D'Oliveiro
In message mailman.798.1289358171.2218.python-l...@python.org, Christian Heimes wrote: Don't repeat the mistakes of others and use XML as a configuration language. XML isn't meant to be edited by humans. My principle is: anything automatically generated by machine is not fit for viewing or

Re: DTD Parsing

2010-11-10 Thread Lawrence D'Oliveiro
In message mailman.835.1289431211.2218.python-l...@python.org, Christian Heimes wrote: I'm sorry but every time I read XML and configuration in one sentence, I see the horror of TomCat or Shibboleth XML configs popping up. Tomcat I know is written in Java; let me guess—Shibboleth is too? --

Re: DTD Parsing

2010-11-10 Thread Lawrence D'Oliveiro
In message mailman.803.1289374804.2218.python-l...@python.org, Ian Kelly wrote: On 11/9/2010 11:14 PM, r0g wrote: config = {} for line in (open(config.txt, 'r')): if len(line) 0 and line[0] #: param, value = line.rstrip().split(=,1) config[param] = value That's

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message slrnidhvpr.hb4.usenet-nos...@guild.seebs.net, Seebs wrote: The publisher doesn't care whether the books are accurate ... A sad state for the once-proud name “Osborne” ... -- http://mail.python.org/mailman/listinfo/python-list

Re: How to test if a module exists?

2010-11-09 Thread Lawrence D'Oliveiro
In message roy-e7c8b9.22342706112...@news.panix.com, Roy Smith wrote: Fail early and often, that's what I say. Good advice that could apply to lots of things. Except maybe procrastination ... :) -- http://mail.python.org/mailman/listinfo/python-list

Re: JavaScript vs Python

2010-11-09 Thread Lawrence D'Oliveiro
In message mailman.757.1289287828.2218.python-l...@python.org, Chris Rebert wrote: On Mon, Nov 8, 2010 at 10:52 PM, Lawrence D'Oliveiro l...@geek-central.gen.nz wrote: Because JavaScript is actually a decent language in its own right. The Good Parts of it anyway. Python, too, has its

Re: Compare source code

2010-11-09 Thread Lawrence D'Oliveiro
In message mailman.718.1289147839.2218.python-l...@python.org, Ethan Furman wrote: Lawrence D'Oliveiro wrote: In message iapom0$k4...@speranza.aioe.org, Tim Harig wrote: I personally prefer tabs as it lets *me* decide how far the apparent indentations are in the code. But they don’t

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message 87pquekxbe.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: The book was much cheaper than a copy of the C standard from ANSI or ISO even when it was new. It was a common joke (HHOS) at the time that the difference in price reflected the value of the annotations. Crapware

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message mailman.778.1289325458.2218.python-l...@python.org, Terry Reedy wrote: I've been wondering why C programmers keep writing code susceptible to buffer overruns ;=). I am continually disappointed with the ‘do as I say, not as I do” attitude among people offering up sample code. I

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message mailman.778.1289325458.2218.python-l...@python.org, Terry Reedy wrote: Your two 'nitpicks' about fflush have both come up on this list as real issues causing people problems. Cache on disk drives is a bug, not a feature. Performance-wise, it’s fast RAM hobbled by being located on

Re: Commercial or Famous Applicattions.?

2010-11-09 Thread Lawrence D'Oliveiro
In message ibbj3j$pv...@localhost.localdomain, Martin Gregorie wrote: ...and don't forget getmail, a better behaved replacement for fetchmail. I was just looking this up in the Getmail FAQ, since I didn’t know about the issues with Fetchmail. That’s it, ESR is off my Christmas-card list... --

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message slrnidhvpr.hb4.usenet-nos...@guild.seebs.net, Seebs wrote: In particular, he's very good at making up complications from whole cloth which aren't really problems, and then offering solutions which show people a clever trick to work around the problem. (e.g., his elaborate

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message slrnidk74f.1uks.usenet-nos...@guild.seebs.net, Seebs wrote: I may have my gripes about Python, but I will say this: The Python community seems full of people who are passionate about writing good code. And they know how to write good code in other languages, not just Python. In

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Lawrence D'Oliveiro
In message mailman.793.1289347547.2218.python-l...@python.org, Robert Kern wrote: For me, putting the brackets on their own lines (and using a trailing comma) has little to do with increasing readability. It's for making editing easier. Keeping all of the items consistent means that in order

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Lawrence D'Oliveiro
In message 878w12kt5x.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: Maybe you should look at the code in context https://github.com/ldo/dvd_menu_animator, then you can express some more opinions on how to improve

Am I The Only One Who Keeps Reading “Numpy” as “Numpty”?

2010-11-09 Thread Lawrence D'Oliveiro
Sorry... -- http://mail.python.org/mailman/listinfo/python-list

Re: Popen Question

2010-11-08 Thread Lawrence D'Oliveiro
In message ib0kor01...@news5.newsguy.com, Chris Torek wrote: ['/bin/sh', '-c', 'echo', '$MYVAR'] (with arguments expressed as a Python list). /bin/sh takes the string after '-c' as a command, and the remaining argument(s) if any are assigned to positional parameters ($0, $1, etc).

Re: Why flat is better than nested?

2010-11-08 Thread Lawrence D'Oliveiro
In message d4e7f8b9-9526-4bf5-b4d7-e398912eb...@b19g2000prj.googlegroups.com, rustom wrote: If you take zen seriously you dont get it If you dont take zen seriously you dont get it That -- seriously -- is zen I don’t get it. -- http://mail.python.org/mailman/listinfo/python-list

Re: functions, list, default parameters

2010-11-08 Thread Lawrence D'Oliveiro
In message mailman.608.129032.2218.python-l...@python.org, Robert Kern wrote: On 11/4/10 2:07 AM, Lawrence D'Oliveiro wrote: In messagemailman.504.1288718704.2218.python-l...@python.org, Robert Kern wrote: On 11/2/10 2:12 AM, Lawrence D'Oliveiro wrote: In messagemailman

Re: Allowing comments after the line continuation backslash

2010-11-08 Thread Lawrence D'Oliveiro
In message 87fwvdb69k.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: for \ Description, Attr, ColorList \ in \ ( (normal, image, MainWindow.ColorsNormalList

Re: Popen Question

2010-11-08 Thread Lawrence D'Oliveiro
In message 4cd87b24$0$81481$e4fe5...@news.xs4all.nl, Hans Mulder wrote: But in this case the first positional argument is in $0. That’s what confused me. -- http://mail.python.org/mailman/listinfo/python-list

Re: Compare source code

2010-11-08 Thread Lawrence D'Oliveiro
In message 87oca1b8ba.fsf@metalzone.distorted.org.uk, Mark Wooding wrote: Vertical space is a limiting factor on how much code one can see at a time. One thing that helps me is that Emacs has commands for quickly jumping between matching brackets. Of course, this only works for

Re: Compare source code

2010-11-08 Thread Lawrence D'Oliveiro
In message ib698e$q4...@reader1.panix.com, Grant Edwards wrote: IOW, editing a loop or other control structure where you couldn't see both ends was problematic. Conserving vertical space avoids that problem. No it doesn’t. It just moves it to a different, arbitrary, point a few percent

Re: Compare source code

2010-11-08 Thread Lawrence D'Oliveiro
In message ib6hkq$ji...@reader1.panix.com, Grant Edwards wrote: ... though I'd still prefer a 4:3. 4:3 still seems to be the best. It gives you a landscape A3-proportional view (or two A4-proportioned portrait pages side by side), and the little bit of space left over at the top or bottom can

Re: http error 301 for urlopen

2010-11-08 Thread Lawrence D'Oliveiro
In message 4cd7987e$0$1674$742ec...@news.sonic.net, John Nagle wrote: It's the New York Times' paywall. They're trying to set a cookie, and will redirect the URL until you store and return the cookie. And if they find out you’re acessing them from a script, they’ll probably try to find a

Re: Silly newbie question - Carrot character (^)

2010-11-08 Thread Lawrence D'Oliveiro
In message mailman.697.1289067607.2218.python-l...@python.org, Dennis Lee Bieber wrote: On Sat, 6 Nov 2010 10:22:47 -0400, Philip Semanchuk phi...@semanchuk.com declaimed the following in gmane.comp.python.general: Some people might think the language ref is a fine place to direct

Re: subclassing str

2010-11-08 Thread Lawrence D'Oliveiro
In message 5dlbo.1024$w8@twister2.libero.it, not1xor1 (Alessandro) wrote: I'm already using plain functions, but thought that wrapping most of them in a str subclass would let me save some time and yield cleaner and more manageable code How exactly does a.f(b, c) save time over

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread Lawrence D'Oliveiro
In message mailman.755.1289276189.2218.python-l...@python.org, John Bond wrote: I once got asked to write a list things that I'd make different in the technology world if I could, to make it better for everyone. Number 3 was everywhere you now see Javascript or PHP, you'd see Python instead.

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread Lawrence D'Oliveiro
In message mailman.749.1289261914.2218.python-l...@python.org, Jorge Biquez wrote: ... there are not too many applications done with Python than the ones done with PHP ... PHP is only used for server-side Web applications, nothing else. Python is used for lots of things, on and off the Web.

Re: Silly newbie question - Caret character (^)

2010-11-08 Thread Lawrence D'Oliveiro
In message slrnidhcns.9m6.usenet-nos...@guild.seebs.net, Seebs wrote: On 2010-11-09, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.697.1289067607.2218.python-l...@python.org, Dennis Lee Bieber wrote: Have you ever looked at the reference manual for Ada

Re: JavaScript vs Python (was Re: Commercial or Famous Applicattions.?)

2010-11-08 Thread Lawrence D'Oliveiro
In message mailman.756.1289284312.2218.python-l...@python.org, John Bond wrote: On 9/11/2010 5:54 AM, Lawrence D'Oliveiro wrote: In messagemailman.755.1289276189.2218.python-l...@python.org, John Bond wrote: I once got asked to write a list things that I'd make different in the technology

Re: Silly newbie question - Caret character (^)

2010-11-08 Thread Lawrence D'Oliveiro
In message slrnidhsbg.g2d.usenet-nos...@guild.seebs.net, Seebs wrote: Not so much turgidity as being WRONG. Consistently and often. Wow. And the guy’s written so many books; how does he get away with it? (I know too little about C++ to criticize is writings about it, but people have told me

Re: How to test if a module exists?

2010-11-08 Thread Lawrence D'Oliveiro
In message roy-4c92bb.16523506112...@news.panix.com, Roy Smith wrote: On the other hand, if your module's bug is that it in turn imports some other module, which doesn't exist, you'll also get an ImportError. Does it really matter? Either way, the module is unusable. --

Re: sigaction?

2010-11-07 Thread Lawrence D'Oliveiro
In message mailman.610.1288890213.2218.python-l...@python.org, Neal Becker wrote: I'm interested in trying sigaction with SA_RESTART to prevent interrupted system calls. Worse-is-better strikes again http://en.wikipedia.org/wiki/PCLSRing ... --

Re: Allowing comments after the line continuation backslash

2010-11-07 Thread Lawrence D'Oliveiro
In message roy-0ed9f0.08443706112...@news.panix.com, Roy Smith wrote: In article ib2vrb$3e...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 8jd3m9fr5...@mid.individual.net, Neil Cerutti wrote: On 2010-11-03, Ben Finney ben+pyt

Re: execute shell script from python, needs sys.argv

2010-11-07 Thread Lawrence D'Oliveiro
In message 1vmbd65uaj2snq1v0vo49ktn0lsc2o5...@4ax.com, Tim Roberts wrote: I KNOW that we're still working on syntax here, and that it's too early for optimization, but it bothers me to see cat as the first thing in a pipeline. An anti-UUOC instinct. Very good. :) --

Re: Silly newbie question - Caret character (^)

2010-11-07 Thread Lawrence D'Oliveiro
In message pan.2010.11.06.23.19.1...@nowhere.com, Nobody wrote: A reference manual tells you how to use the language. A specification tells you how to implement it. Speaking as someone who has read more reference manuals/specifications/whatever you want to call them than I can count, I have

Re: Compare source code

2010-11-07 Thread Lawrence D'Oliveiro
In message iapom0$k4...@speranza.aioe.org, Tim Harig wrote: I agree with Seebs, Python is the only language I know that promotes the use of spaces over tabs; and there are equally picky syntaxs (ie, Makefiles) that mandate the use of tabs. That’s widely conceded to be a misfeature of Make.

Re: Compare source code

2010-11-07 Thread Lawrence D'Oliveiro
In message iat59a$re...@reader1.panix.com, Grant Edwards wrote: But without the colon, how are people who write programming editors going to know when to increase the indentation level as I enter code? I hate editors (or editing modes) that think they know when to change indentation level on

Re: Compare source code

2010-11-07 Thread Lawrence D'Oliveiro
In message 8jftftfel...@mid.individual.net, Neil Cerutti wrote: The handsome ':' terminator of if/elif/if statements allows us to omit a newline, conserving vertical space. This improves the readability of certain constructs. if x: print(x) elif y: print(y) else: print() I would never do

Re: Compare source code

2010-11-07 Thread Lawrence D'Oliveiro
In message 87sjzige0r@benfinney.id.au, Ben Finney wrote: Seebs usenet-nos...@seebs.net writes: On 2010-11-03, Steven D'Aprano steve-remove-t...@cybersource.com.au wrote: Python does explicitly mark blocks. It does it by changes in indentation. An indent is an explicit start-block. An

Re: cms 4 static pages?

2010-11-07 Thread Lawrence D'Oliveiro
In message iatkpf$jd...@online.de, Guido Stepken wrote: a not database driven What do you mean by “database”? Even flat files can be “databases”. -- http://mail.python.org/mailman/listinfo/python-list

Re: Silly newbie question - Caret character (^)

2010-11-07 Thread Lawrence D'Oliveiro
In message mailman.716.1289144941.2218.python-l...@python.org, Emile van Sebille wrote: On 11/7/2010 2:26 AM Lawrence D'Oliveiro said... In messagepan.2010.11.06.23.19.1...@nowhere.com, Nobody wrote: A reference manual tells you how to use the language. A specification tells you how

Re: ANN: PyQt v4.8.1 Released

2010-11-07 Thread Lawrence D'Oliveiro
In message mailman.720.1289149298.2218.python-l...@python.org, Robert Kern wrote: Everyone here knew exactly what he meant. But if you don’t banana the right tomato, everybody could be grapefruit, right? You know what I mean. -- http://mail.python.org/mailman/listinfo/python-list

Re: Allowing comments after the line continuation backslash

2010-11-06 Thread Lawrence D'Oliveiro
In message 8jd3m9fr5...@mid.individual.net, Neil Cerutti wrote: On 2010-11-03, Ben Finney ben+pyt...@benfinney.id.au wrote: styles = [ (normal, image, MainWindow.ColorsNormalList), (highlighted, highlight, MainWindow.ColorsHighlightedList), (selected,

Re: ANN: PyQt v4.8.1 Released

2010-11-06 Thread Lawrence D'Oliveiro
In message mailman.693.1289065102.2218.python-l...@python.org, Robert Kern wrote: On 11/6/10 2:34 AM, Steve Holden wrote: On 11/5/2010 6:14 PM, Lawrence D'Oliveiro wrote: In messageoj46q7-v2l@archaeopteryx.softver.org.mk, Дамјан Георгиевски wrote: PyQt is available under the GPL

Re: Compare source code

2010-11-06 Thread Lawrence D'Oliveiro
In message slrnid9ln8.30fm.usenet-nos...@guild.seebs.net, Seebs wrote: Specifically: Four spaces followed by a tab nearly always actually means eight spaces to most editors (and Python seems to treat it that way), but it's hard to tell. Worse, a tab may have been intended to be the same

Re: ANN: PyQt v4.8.1 Released

2010-11-05 Thread Lawrence D'Oliveiro
In message oj46q7-v2l@archaeopteryx.softver.org.mk, Дамјан Георгиевски wrote: 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

Re: *** glibc detected *** gdb: malloc(): smallbin double linked list

2010-11-05 Thread Lawrence D'Oliveiro
In message pan.2010.11.05.21.30.11.656...@nowhere.com, Nobody wrote: I imagine that your extension code is trashing the heap, in which case, valgrind is probably the answer. Something simpler to try first is to run the code with the MALLOC_CHECK_ environment variable set to 2 or 3. That might

Re: Allowing comments after the line continuation backslash

2010-11-04 Thread Lawrence D'Oliveiro
In message roy-df73a5.08174603112...@news.panix.com, Roy Smith wrote: http://github.com/ldo/dvd_menu_animator That URL takes me to a github page. Can you be more specific about which file I should be looking at? The extract I previously quoted was from dvd_menu_animator. 2) You have

Re: Man pages and info pages

2010-11-04 Thread Lawrence D'Oliveiro
In message 1bdce24e-4406-44c5-9133-bfd0acd02...@p1g2000yqm.googlegroups.com, rustom wrote: The printed python docs come to several thousand pages. Do we want them to be 1 manpage? a hundred? a thousand? Perl managed to condense a lot of useful information into a handful of man pages. --

Re: functions, list, default parameters

2010-11-04 Thread Lawrence D'Oliveiro
In message mailman.504.1288718704.2218.python-l...@python.org, Robert Kern wrote: On 11/2/10 2:12 AM, Lawrence D'Oliveiro wrote: In messagemailman.475.1288670833.2218.python-l...@python.org, Robert Kern wrote: Immutable objects are just those without an obvious API for modifying them

Re: Compare source code

2010-11-04 Thread Lawrence D'Oliveiro
In message slrnid0ked.t7k.usenet-nos...@guild.seebs.net, Seebs wrote: It is extremely useful to me to have spaces converted to tabs for every other file I edit. I’m thinking of going the other way. After many years of treating tabs as four-column steps, I might give up on them and use spaces

Re: Allowing comments after the line continuation backslash

2010-11-04 Thread Lawrence D'Oliveiro
In message mailman.546.1288771350.2218.python-l...@python.org, Chris Rebert wrote: Actually, my PEP 8 reference was in regards to the (imo, terrible) UseOfCamelCaseForNonClasses (Python != C#), not the formatting of the for-loop; hence the In any case qualification. Hmm ... OK, I might

Re: Python documentation too difficult for beginners

2010-11-04 Thread Lawrence D'Oliveiro
In message mailman.580.1288818221.2218.python-l...@python.org, Cameron Simpson wrote: But its weakness is stuff like this: http://epydoc.sourceforge.net/stdlib/Canvas.Polygon-class.html Automatic docness, no useful information. But it Conforms to Documentation-Production Metrics as

Re: Compare source code

2010-11-04 Thread Lawrence D'Oliveiro
In message slrnid0pgs.1028.usenet-nos...@guild.seebs.net, Seebs wrote: The question is *why* diff has that option. The answer is because whitespace changes (spaces to tabs, different tab stops, etcetera) are an extremely common failure mode, such that it's quite common for files to end up

Re: subprocess.Popen not replacing current process?

2010-11-04 Thread Lawrence D'Oliveiro
In message 0f1a17f4-b6a9-4e89-ac26-74b1098a0...@b19g2000prj.googlegroups.com, goodman wrote: Hi, I'm wondering why subprocess.Popen does not seem to replace the current process, even when it uses os.execvp (according to the documentation:

Re: subprocess.Popen not replacing current process?

2010-11-04 Thread Lawrence D'Oliveiro
In message 7c5be6d7-5782-44ad-aae7-7f7bbc798...@n32g2000prc.googlegroups.com, goodman wrote: Though I'm still a little confused how, if subprocess.Popen is using os.execvp, it still maintains control of things like interrupts. The implied point, being that we are spawning subprocesses, is

Re: Python documentation too difficult for beginners

2010-11-03 Thread Lawrence D'Oliveiro
In message mailman.542.1288760105.2218.python-l...@python.org, Dennis Lee Bieber wrote: Whereas I have a whole shelf of Java documentation and it still takes me an hour to write Hello World... Java's one class per file results in a plethora of bloody names one has to remember just to find

Re: Allowing comments after the line continuation backslash

2010-11-03 Thread Lawrence D'Oliveiro
In message roy-a0f407.20170602112...@news.panix.com, Roy Smith wrote: In article iaq5ro$vp...@lust.ihug.co.nz, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message roy-a96d07.07462302112...@news.panix.com, Roy Smith wrote: In this case, I think I would do: styles

Re: functions, list, default parameters

2010-11-03 Thread Lawrence D'Oliveiro
In message 5f6eceec-1eef-4db7-82a6-e5f553349...@k22g2000yqh.googlegroups.com, Ian wrote: It seems to me that there is a rather simple case to be made for allowing mutable default arguments: instances of user-defined classes are fundamentally mutable. Disallowing mutable default arguments

Re: Compare source code

2010-11-02 Thread Lawrence D'Oliveiro
In message slrnicv44s.9it.usenet-nos...@guild.seebs.net, 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

Re: functions, list, default parameters

2010-11-02 Thread Lawrence D'Oliveiro
In message mailman.475.1288670833.2218.python-l...@python.org, Robert Kern wrote: On 2010-11-01 22:31 , Lawrence D'Oliveiro wrote: In message8j1seqfa1...@mid.individual.net, Gregory Ewing wrote: Steven D'Aprano wrote: And how does Python know whether some arbitrary default object

Re: functions, list, default parameters

2010-11-02 Thread Lawrence D'Oliveiro
In message mailman.481.1288683620.2218.python-l...@python.org, Chris Rebert wrote: On Fri, Oct 22, 2010 at 12:36 AM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: Default mutable arguments have their place But it's a rather obscure one where it is almost never strictly

Re: Compare source code

2010-11-02 Thread Lawrence D'Oliveiro
In message mailman.497.1288703990.2218.python-l...@python.org, Emile van Sebille wrote: On 11/1/2010 4:22 PM Lawrence D'Oliveiro said... In messagemailman.465.1288653523.2218.python-l...@python.org, Emile van Sebille wrote: At least you can look at python code and _know_ that spurious

Re: Compare source code

2010-11-02 Thread Lawrence D'Oliveiro
In message ianem3$cu...@reader1.panix.com, Grant Edwards wrote: On 2010-11-01, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message 8j8am4fk2...@mid.individual.net, Peter Pearson wrote: diff -b oldfile newfile Warning: diff -b won't detect changes in indentation

Re: Python documentation too difficult for beginners

2010-11-02 Thread Lawrence D'Oliveiro
In message a5dc65e1-3a72-4160-90e3-956a456be...@26g2000yqv.googlegroups.com, 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)

Re: Allowing comments after the line continuation backslash

2010-11-02 Thread Lawrence D'Oliveiro
In message roy-a96d07.07462302112...@news.panix.com, Roy Smith wrote: In this case, I think I would do: styles = [(normal, image, MainWindow.ColorsNormalList), (highlighted, highlight, MainWindow.ColorsHighlightedList), (selected,select,

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 source code

Re: Allow multiline conditions and the like

2010-11-01 Thread Lawrence D'Oliveiro
In message 874oc1ldo6@benfinney.id.au, Ben Finney wrote: Yingjie Lan lany...@yahoo.com writes: Allow the conditions in the if-, elif-, while-, for-, and with-clauses to span multiple lines without using a backlalsh at the end of a line, You can already do this with any expression: use

Re: Allowing comments after the line continuation backslash

2010-11-01 Thread Lawrence D'Oliveiro
In message mailman.437.1288592002.2218.python-l...@python.org, Yingjie Lan wrote: I would like to have comments after the line continuation backslash. What language allows that? -- http://mail.python.org/mailman/listinfo/python-list

Re: How on Factorial

2010-11-01 Thread Lawrence D'Oliveiro
In message dvukp7-7sa@satorlaser.homedns.org, Ulrich Eckhardt wrote: Geobird wrote: def fact(x): return x 1 and x * fact(x - 1) or 1 I'd say this is about as small as it gets. fact = lambda x : x 1 and x * fact(x - 1) or 1 -- Lawrence “Functionalism Strikes Again”

Re: How on Factorial

2010-11-01 Thread Lawrence D'Oliveiro
In message qoteibcq9pr@ruuvi.it.helsinki.fi, Jussi Piitulainen wrote: (I agree that no one should write factorial like that, except as a joke. I have nothing against (x if (a b) else y). The trick with and and or was used before Python had an actual conditional expression.) You know

Re: Why flat is better than nested?

2010-11-01 Thread Lawrence D'Oliveiro
In message mailman.297.1288170848.2218.python-l...@python.org, Stefan Behnel wrote: What's a that boy? A boy who’s the opposite of fin. -- http://mail.python.org/mailman/listinfo/python-list

Re: python script to read google spreadsheet

2010-11-01 Thread Lawrence D'Oliveiro
In message 0b6f704c-e108-4fb9-afc2-3616d92d6...@t13g2000yqm.googlegroups.com, charu gangal wrote: This is the python code I was trying to access the cell information from a google spreadsheet but the issue is that i am able to make it work on Eclipse but when i deploy it, it is not showing me

Re: Allowing comments after the line continuation backslash

2010-11-01 Thread Lawrence D'Oliveiro
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 \ ( (normal, image, MainWindow.ColorsNormalList), (highlighted,

Re: Compare source code

2010-11-01 Thread Lawrence D'Oliveiro
In message 8j8am4fk2...@mid.individual.net, Peter Pearson wrote: On Mon, 01 Nov 2010 12:09:12 +1300, Lawrence D'Oliveiro wrote: In message 4ccd5ad9$0$19151$426a7...@news.free.fr, jf wrote: I edit each file to remove tabs ... expand -i oldfile newfile Do you know a tools to compare

Re: playful coding problems for 10 year olds

2010-11-01 Thread Lawrence D'Oliveiro
In message 4ccf3595.2060...@v.loewis.de, Martin v. Loewis wrote: Take a look at the turtle demos. Are turtle graphics still enough to hold the kids’ interest these days? I’ve been visiting a local Computer Clubhouse, and it seems like they mostly spend their time in Google SketchUp and

Re: Compare source code

2010-11-01 Thread Lawrence D'Oliveiro
In message mailman.465.1288653523.2218.python-l...@python.org, 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,

Re: how to sync file on client and server

2010-11-01 Thread Lawrence D'Oliveiro
In message bbcc1dce-1a05-46fe-879c-7d0b08a2f...@r14g2000yqa.googlegroups.com, nu wrote: 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. Set up an SSH public/private key

Re: import ImageGrab fails on Ubuntu 10.04

2010-11-01 Thread Lawrence D'Oliveiro
In message 4ccd954f$0$12350$426a7...@news.free.fr, News123 wrote: Is there any other way to make screen shots in Linux, ideally without creating an intermediate file The ImageMagick “import” command lets you grab the contents of any window (including the root window) from your X server

Re: Allowing comments after the line continuation backslash

2010-11-01 Thread Lawrence D'Oliveiro
In message mailman.469.1288654964.2218.python-l...@python.org, Chris Rebert wrote: desc_attr_colors_triples = ((normal, image, MainWindow.ColorsNormalList), (highlighted, highlight, MainWindow.ColorsHighlightedList), (selected, select, MainWindow.ColorsSelectedList)) for in

Re: serial I/O install fail -- DLL not found

2010-11-01 Thread Lawrence D'Oliveiro
In message da1b455a-02d0-41b7-b5dc-73546fd0b...@k22g2000yqh.googlegroups.com, Fossil wrote: I did a complete de-install and re-install. Standard solution to Dimdows problems, really... -- http://mail.python.org/mailman/listinfo/python-list

Re: factorial of negative one (-1)

2010-11-01 Thread Lawrence D'Oliveiro
In message 87r5f55qj5@xemacs.org, Hrvoje Niksic wrote: Python has a little-known but very instructive method for determining the makeup of a float: 1.1 .as_integer_ratio() (2476979795053773, 2251799813685248) Only available in 2.6 or later. Are we already talking as though 2.5 doesn’t

Re: ANN: PyQt v4.8.1 Released

2010-11-01 Thread Lawrence D'Oliveiro
In message mailman.443.1288608727.2218.python-l...@python.org, Phil Thompson wrote: 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. --

Re: functions, list, default parameters

2010-11-01 Thread Lawrence D'Oliveiro
In message 20101021235138.609fe...@geekmail.invalid, Andreas Waldenburger wrote: While not very commonly needed, why should a shared default argument be forbidden? Because it’s safer to disallow it than to allow it. -- http://mail.python.org/mailman/listinfo/python-list

Re: functions, list, default parameters

2010-11-01 Thread Lawrence D'Oliveiro
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't, that's the whole point. Of course it knows. It is the one defining the concept in the first place, after

  1   2   3   4   5   6   7   8   9   10   >