Re: Password Hash Validation (Posting On Python-List Prohibited)

2024-07-12 Thread Lawrence D'Oliveiro via Python-list
On Fri, 21 Jun 2024 06:32:58 - (UTC), I wrote: > On Fri, 21 Jun 2024 03:40:55 - (UTC), I wrote: > >> I think I will create my own wrapper using ctypes. > > Done . The repo now includes an example script that exercises the various functions of the module

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 i

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

Re: How to test if a module exists?

2010-11-11 Thread Lawrence D'Oliveiro
In message , 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
In message , Tim Chase wrote: > Amusingly, as others have noted, you replied with an unobfuscated > email address. This would seem to be an independent, true record of what members of python-list would see of my posting,

Re: How to test if a module exists?

2010-11-11 Thread Lawrence D'Oliveiro
In message , Jon Dufresne wrote: > On Wed, Nov 10, 2010 at 1:50 AM, Lawrence D'Oliveiro wrote: > >> In message , Jon >> Dufresne wrote: >> >>> On Mon, Nov 8, 2010 at 11:35 PM, Lawrence D'Oliveiro ... >> >> I see that you published my uno

Re: DTD Parsing

2010-11-10 Thread Lawrence D'Oliveiro
In message , 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 five whole lines of code. Wh

Re: DTD Parsing

2010-11-10 Thread Lawrence D'Oliveiro
In message , 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? -- http://mail.python.org/mailman/listinfo/python-li

Re: DTD Parsing

2010-11-10 Thread Lawrence D'Oliveiro
In message , 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 editing by humans. There’s nothing special about X

Re: Is Eval *always* Evil?

2010-11-10 Thread Lawrence D'Oliveiro
In message , 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 allowed to add such expressions, it’s probably a

Re: Silly newbie question - Caret character (^)

2010-11-10 Thread Lawrence D'Oliveiro
In message , Seebs wrote: > On 2010-11-10, Terry Reedy 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 C1X. I would shed no > tears. Another function th

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: Learning Pyhton - Functional Programming - How intersect/difference two dict with dict/values? fast!

2010-11-10 Thread Lawrence D'Oliveiro
In message , 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], > 'ad': [[56,57,58,59], 34], > 'ax':

Re: How to test if a module exists?

2010-11-10 Thread Lawrence D'Oliveiro
In message , 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 this was a momentary lapse of judgeme

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 impleme

Re: Help Documenting Python Syntax

2010-11-10 Thread Lawrence D'Oliveiro
In message , 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

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

Re: Allowing comments after the line continuation backslash

2010-11-09 Thread Lawrence D'Oliveiro
In message , 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 to > add, delete, or move any item is the same o

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message , 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 other words, they know programming, not just P

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message , 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 > revelations about how to use feof() in C to wor

Re: Commercial or Famous Applicattions.?

2010-11-09 Thread Lawrence D'Oliveiro
In message , 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... -- http://mail.python.org/mailman/l

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message , 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 the wrong side of a connection to the CPU that i

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message , 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 remember writing to one contributor to a programmin

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. Crapw

Re: Compare source code

2010-11-09 Thread Lawrence D'Oliveiro
In message , Ethan Furman wrote: > Lawrence D'Oliveiro wrote: > >> In message , 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. Other

Re: JavaScript vs Python

2010-11-09 Thread Lawrence D'Oliveiro
In message , Chris Rebert wrote: > On Mon, Nov 8, 2010 at 10:52 PM, Lawrence D'Oliveiro > wrote: > >> Because JavaScript is actually a decent language in its own right. > > "The Good Parts" of it anyway. Python, too, has its good parts, you have to admit..

Re: How to test if a module exists?

2010-11-09 Thread Lawrence D'Oliveiro
In message , 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: Silly newbie question - Caret character (^)

2010-11-09 Thread Lawrence D'Oliveiro
In message , 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-08 Thread Lawrence D'Oliveiro
In message , 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. -- http://mail.python.org/mailman/listinfo/python-list

Re: Silly newbie question - Caret character (^)

2010-11-08 Thread Lawrence D'Oliveiro
In message , 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 they're comparable.) I suppose seeing th

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

2010-11-08 Thread Lawrence D'Oliveiro
In message , John Bond wrote: > On 9/11/2010 5:54 AM, Lawrence D'Oliveiro wrote: > >> In message, 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 b

Re: Silly newbie question - Caret character (^)

2010-11-08 Thread Lawrence D'Oliveiro
In message , Seebs wrote: > On 2010-11-09, Lawrence D'Oliveiro > wrote: > >> In message , Dennis >> Lee Bieber wrote: >>> >>> Have you ever looked at the reference manual for Ada? > >> Or even worse, the annotated reference. I thought annotat

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread Lawrence D'Oliveiro
In message , 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. -- http://mail.python.org/mailman/listinfo/pytho

Re: Commercial or Famous Applicattions.?

2010-11-08 Thread Lawrence D'Oliveiro
In message , 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". If only... PHP yes, JavaScript no. -- http

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: Silly newbie question - Carrot character (^)

2010-11-08 Thread Lawrence D'Oliveiro
In message , Dennis Lee Bieber wrote: > On Sat, 6 Nov 2010 10:22:47 -0400, Philip Semanchuk > declaimed the following in > gmane.comp.python.general: > >> Some people might think the language ref> is a fine place to direct >> newcomers to Python. I don't. It's not awful, but it's dense and >>

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

Re: Compare source code

2010-11-08 Thread Lawrence D'Oliveiro
In message , 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 be used for toolbars, titleb

Re: Compare source code

2010-11-08 Thread Lawrence D'Oliveiro
In message , 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 away—not enough to be worth botheri

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 langu

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: 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 writes: > >> for \ >> Description, Attr, ColorList \ >> in \ >> ( >> ("normal", "imag

Re: functions, list, default parameters

2010-11-08 Thread Lawrence D'Oliveiro
In message , Robert Kern wrote: > On 11/4/10 2:07 AM, Lawrence D'Oliveiro wrote: > >> In message, Robert >> Kern wrote: >> >>> On 11/2/10 2:12 AM, Lawrence D'Oliveiro wrote: >>> >>>> In message, Robert >>>> Kern wro

Re: Why "flat is better than nested"?

2010-11-08 Thread Lawrence D'Oliveiro
In message , 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: Popen Question

2010-11-08 Thread Lawrence D'Oliveiro
In message , 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). Doesn’t work. I don’t know w

Re: ANN: PyQt v4.8.1 Released

2010-11-07 Thread Lawrence D'Oliveiro
In message , 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: Silly newbie question - Caret character (^)

2010-11-07 Thread Lawrence D'Oliveiro
In message , Emile van Sebille wrote: > On 11/7/2010 2:26 AM Lawrence D'Oliveiro said... >> In message, Nobody wrote: >> >>> A reference manual tells you how to use the language. A specification >>> tells you how to implement it. >> >> Speaking

Re: cms 4 static pages?

2010-11-07 Thread Lawrence D'Oliveiro
In message , 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: Compare source code

2010-11-07 Thread Lawrence D'Oliveiro
In message <87sjzige0r@benfinney.id.au>, Ben Finney wrote: > Seebs writes: > >> On 2010-11-03, Steven D'Aprano >> wrote: >> >>> Python does explicitly mark blocks. It does it by changes in >>> indentation. An indent is an explicit start-block. An outdent is an >>> explicit end- block. There

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

Re: Compare source code

2010-11-07 Thread Lawrence D'Oliveiro
In message , 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 me. Hate, hate, hate. -- htt

Re: Compare source code

2010-11-07 Thread Lawrence D'Oliveiro
In message , 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. > I personally prefer tabs as

Re: Silly newbie question - Caret character (^)

2010-11-07 Thread Lawrence D'Oliveiro
In message , 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 never come across any such distincti

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. :) -- http://mail.python.

Re: Allowing comments after the line continuation backslash

2010-11-06 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: > In article , > Lawrence D'Oliveiro wrote: > >> In message <8jd3m9fr5...@mid.individual.net>, Neil Cerutti wrote: >> >> > On 2010-11-03, Ben Finney wrote: >> > >> >> styles = [ >>

Re: sigaction?

2010-11-06 Thread Lawrence D'Oliveiro
In message , Neal Becker wrote: > I'm interested in trying sigaction with SA_RESTART to prevent interrupted > system calls. Worse-is-better strikes again ... -- http://mail.python.org/mailman/listinfo/python-list

Re: Compare source code

2010-11-06 Thread Lawrence D'Oliveiro
In message , 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 thing as four > spaces, and someone was ex

Re: ANN: PyQt v4.8.1 Released

2010-11-06 Thread Lawrence D'Oliveiro
In message , 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 message, Дамјан >>> Георгиевски wrote: >>> >>>>>> PyQt is available under the GPL and a

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 wrote: > >> styles = [ >> ("normal", "image", MainWindow.ColorsNormalList), >> ("highlighted", "highlight", MainWindow.ColorsHighlightedList), >> ("selected","sel

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

2010-11-05 Thread Lawrence D'Oliveiro
In message , 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 give a few more clues. -- http://mail.p

Re: ANN: PyQt v4.8.1 Released

2010-11-05 Thread Lawrence D'Oliveiro
In message , Дамјан Георгиевски 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 that *he* sells comercially :) Pre

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: 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: > http://docs.python.org/library/subprocess.html#s

Re: Compare source code

2010-11-04 Thread Lawrence D'Oliveiro
In message , 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 with unintentional whitespace > changes.

Re: Python documentation too difficult for beginners

2010-11-04 Thread Lawrence D'Oliveiro
In message , 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 decreed by the Corporate Task Force on Policy. S

Re: Allowing comments after the line continuation backslash

2010-11-04 Thread Lawrence D'Oliveiro
In message , 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 accept that particular criticism. I have to say it’

Re: Compare source code

2010-11-04 Thread Lawrence D'Oliveiro
In message , 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 everywhere. -- http://mail.python.org/mail

Re: functions, list, default parameters

2010-11-04 Thread Lawrence D'Oliveiro
In message , Robert Kern wrote: > On 11/2/10 2:12 AM, Lawrence D'Oliveiro wrote: > >> In message, Robert >> Kern wrote: >> >>> "Immutable objects" are just those without an obvious API for modifying >>> them. >> >> They are one

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: Allowing comments after the line continuation backslash

2010-11-04 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: >> > > 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 provided comments for each function,

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: Allowing comments after the line continuation backslash

2010-11-03 Thread Lawrence D'Oliveiro
In message , Roy Smith wrote: > In article , > Lawrence D'Oliveiro wrote: > >> In message , Roy Smith wrote: >> >> > In this case, I think I would do: >> > >> > styles = [("normal", "image",

Re: Python documentation too difficult for beginners

2010-11-03 Thread Lawrence D'Oliveiro
In message , 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 > out where to start looking for a standard libra

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

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'

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

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

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: str(int_var) formatted

2010-11-01 Thread Lawrence D'Oliveiro
In message , John Yeung wrote: > I will give zfill a little exposure, as it seems unloved/underused: > > str(x).zfill(2) The inside of my brain is a finite place. Each thing I put in there leaves less room for something else. So I have to think very carefully before deciding what to keep in

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

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: ANN: PyQt v4.8.1 Released

2010-11-01 Thread Lawrence D'Oliveiro
In message , 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. -- 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

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

2010-11-01 Thread Lawrence D'Oliveiro
In message , 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: Allowing comments after the line continuation backslash

2010-11-01 Thread Lawrence D'Oliveiro
In message , Chris Rebert wrote: > desc_attr_colors_triples = (("normal", "image", > MainWindow.ColorsNormalList), > ("highlighted", "highlight", MainWindow.ColorsHighlightedList), > ("selected", "select", MainWindow.ColorsSelectedList)) > for in description, attr, color_list in desc_attr

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: how to sync file on client and server

2010-11-01 Thread Lawrence D'Oliveiro
In message , 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 pair. Then run Rsync over SSH. Job done. -- http://mail.pytho

Re: Compare source code

2010-11-01 Thread Lawrence D'Oliveiro
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, after all? -- http://mail.python.org/mailman/listi

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 Phot

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 ... >> &

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

Re: Why "flat is better than nested"?

2010-11-01 Thread Lawrence D'Oliveiro
In message , 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: How on Factorial

2010-11-01 Thread Lawrence D'Oliveiro
In message , 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 what, I think I actually prefer the

Re: How on Factorial

2010-11-01 Thread Lawrence D'Oliveiro
In message , 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” D’Oliveiro -- http://mail.python.or

  1   2   3   4   5   6   7   8   9   10   >