Re: import not working?

2009-02-23 Thread Rhodri James
:\\DataFileTypes) IMHO, Python is somewhat inconsistent in not producing a compile-type error (or at least an annoying compile-time warning) when presented with invalid escape sequences. What it does, even though it's well-documented and usually the right guess, is to encourage bad habits. -- Rhodri James

Re: more on unescaping escapes

2009-02-23 Thread Rhodri James
. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: more on unescaping escapes

2009-02-23 Thread Rhodri James
. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Python AppStore / Marketplace

2009-02-23 Thread Rhodri James
). A souq is a bazaar :-) Well, close enough anyway. It's another arabic word that translates as market in both the mercantile and financial senses, I believe. Maybe I've just read too much arabic-themed fiction, but I was surprised not to find the word in my trusty Chambers. -- Rhodri James

Re: thanks very much indeed for your help is there a better way to do this (python3) newby

2009-02-23 Thread Rhodri James
in *stringList*... -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: more on unescaping escapes

2009-02-24 Thread Rhodri James
with it. Of course I still need to use \x20 for spaces, but that is easy. Erm, no. \x20 is exactly the same as in a string literal. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: pep 8 constants

2009-02-25 Thread Rhodri James
last time I checked PEP8 to find out this wasn't already the case - I would have sweared it was. It is. Aahz added it a few weeks ago. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: code challenge: generate minimal expressions using only digits 1,2,3

2009-02-26 Thread Rhodri James
. It should be trivial to calculate all the different new trees that are one digit longer than a previous tree. Trivial yes, but the number of different new trees is large when you're dealing with four digits, and ridiculous with 5. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http

Re: why cannot assign to function call

2009-02-27 Thread Rhodri James
)# bar is new name for foo With true pass-by-value, this comment is not true. Bar would be a copy of foo, not a new name. What happens to bar is then not reflected in foo (depending on how deep the copy is), which is the objective of pass-by-value. -- Rhodri James *-* Wildebeeste Herder

Re: what does this mean....?

2009-02-27 Thread Rhodri James
and enough of your code to make sense of it would have helped. Without context, my best guess is that localFileName isn't actually a string. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a General Method to Configure Tkinter Widgets

2009-03-03 Thread Rhodri James
. If you absolutely must prat around with indirections like this, wouldn't s = getattr(dialog, variable_containing_the_string_stopV).get() be a much less unsafe idea? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie - pass variable to cscript

2009-03-03 Thread Rhodri James
! -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about binary file reading

2009-03-04 Thread Rhodri James
)) Does that look more like what you were expecting? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about binary file reading

2009-03-04 Thread Rhodri James
On Wed, 04 Mar 2009 23:28:32 -, Tino Wildenhain t...@wildenhain.de wrote: Rhodri James wrote: On Wed, 04 Mar 2009 22:58:38 -, vibgyorbits bka...@gmail.com wrote: I'm writing a tool to do some binary file comparisons. I'm opening the file using fd=open(filename,'rb') # Need

Re: help understanding class or function

2009-03-05 Thread Rhodri James
), then it depends on what your function is supposed to be doing. If it's changing every element of the list, doing the changes in-place should be a doddle. If it's filtering some elements out (like your example of omitting every other element) then it's much easier to build a new list. -- Rhodri

Re: create boolean

2009-03-06 Thread Rhodri James
it! -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: create boolean

2009-03-08 Thread Rhodri James
On Sat, 07 Mar 2009 05:03:08 -, Grant Edwards gra...@visi.com wrote: On 2009-03-07, Rhodri James rho...@wildebst.demon.co.uk wrote: On Fri, 06 Mar 2009 15:34:08 -, Grant Edwards inva...@invalid wrote: On 2009-03-06, Fencer no.s...@plz.ok wrote: Hi, I need a boolean b to be true

Re: A Dangling Tk Entry

2009-03-09 Thread Rhodri James
suspect you're going to find that rather hard. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: A Dangling Tk Entry

2009-03-10 Thread Rhodri James
On Tue, 10 Mar 2009 12:41:07 -, W. eWatson notval...@sbcglobal.net wrote: [snippety snip] Rhodri James wrote: You're misunderstanding. The line that you arrowed above has absolutely nothing whatsoever to do with the method body(), so keeping on showing us ever fuller version

Re: Behaviour of os.rename()

2009-03-11 Thread Rhodri James
it doesn't mention doing a copy and (failing to) delete instead of moving the file when doing cross-volume renames, but that's what the OS will have to do. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: A Dangling Tk Entry

2009-03-13 Thread Rhodri James
, ... entry.insert(0,self.slowdown) --- no affect. Erm, no. You stated (and showed us the code) that it was entry = Entry(master,...).grid(...) *big* difference, and entry.insert(0, self.slowdown) *raises an exception*, which is a long way from having no effect. -- Rhodri James

Re: Special keyword argument lambda syntax

2009-03-13 Thread Rhodri James
this would add confusion rather than remove it. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Special keyword argument lambda syntax

2009-03-14 Thread Rhodri James
On Fri, 13 Mar 2009 16:39:16 -, Scott David Daniels scott.dani...@acm.org wrote: The original proposal was initially appealing to me until I saw this comment. That means a relatively invisible typo would turn into good syntax. Possibley this is exactly what Rhodri James is talking about

Re: Special keyword argument lambda syntax

2009-03-14 Thread Rhodri James
On Fri, 13 Mar 2009 15:33:26 -, MRAB goo...@mrabarnett.plus.com wrote: Rhodri James wrote: On Fri, 13 Mar 2009 14:49:17 -, Beni Cherniavsky beni.cherniav...@gmail.com wrote: Specification = Allow keyword arguments in function call to take this form: NAME

Re: Style question - defining immutable class data members

2009-03-15 Thread Rhodri James
could be right, Gary's assumption of less understanding rather than more is clearly the safer one to take. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Style question - defining immutable class data members

2009-03-15 Thread Rhodri James
On Sun, 15 Mar 2009 15:05:04 -, Matthew Woodcraft matt...@woodcraft.me.uk wrote: Rhodri James rho...@wildebst.demon.co.uk writes: On Sun, 15 Mar 2009 13:26:17 -, Matthew Woodcraft It seems clear to me that Maxim understood all this when he asked his original question (you need

Re: Rough draft: Proposed format specifier for a thousands separator

2009-03-15 Thread Rhodri James
! -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Style question - defining immutable class data members

2009-03-15 Thread Rhodri James
well be in the class. If the attribute is specified as self.attribute, then yes, put it in the instance. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Rough draft: Proposed format specifier for a thousands separator

2009-03-15 Thread Rhodri James
On Sun, 15 Mar 2009 19:00:43 -, MRAB goo...@mrabarnett.plus.com wrote: Rhodri James wrote: [snip] Frankly, I'd much rather fix the locale system and extend the format syntax to override the default locale. Perhaps something like financial = Locale(group_sep=,, grouping=[3]) print

Re: Style question - defining immutable class data members

2009-03-15 Thread Rhodri James
On Sun, 15 Mar 2009 23:26:04 -, Aaron Brady castiro...@gmail.com wrote: On Mar 15, 1:50 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Sun, 15 Mar 2009 17:55:25 -, Aaron Brady castiro...@gmail.com   wrote: On Mar 15, 12:39 pm, John Posner jjpos...@snet.net wrote: (My

Re: Rough draft: Proposed format specifier for a thousands separator

2009-03-16 Thread Rhodri James
is {fin.format(10d, {0}, True)}.format(1235467, fin=financial)) assuming the locale.format() method remains unchanged? That's horrible, and I'm pretty sure it can't be right, but I'm too tired to think of anything more sensible right now. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http

Re: Style question - defining immutable class data members

2009-03-16 Thread Rhodri James
to the class. I blame having two hours of sleep in three days for this particular bit of dimness, sorry. P.S. Do you pronounce 'wildebeeste' like 'vildebeeste'? No, with a w not a v. It's just one of those titles that stick with you no matter what you do. -- Rhodri James *-* Wildebeeste Herder

Re: Rough draft: Proposed format specifier for a thousands separator

2009-03-16 Thread Rhodri James
at the actual code-base, methinks. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Rough draft: Proposed format specifier for a thousands separator

2009-03-16 Thread Rhodri James
prefer the format to have a fixed default so that if you don't specify the locale the result is predictable. Shouldn't that be the global locale? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Rough draft: Proposed format specifier for a thousands separator

2009-03-16 Thread Rhodri James
On Tue, 17 Mar 2009 02:41:23 -, MRAB goo...@mrabarnett.plus.com wrote: Rhodri James wrote: On Tue, 17 Mar 2009 01:47:32 -, MRAB goo...@mrabarnett.plus.com wrote: I'm not against putting a comma in the format to indicate that grouping should be used just as a dot indicates

Re: How complex is complex?

2009-03-18 Thread Rhodri James
it at least as efficiently? If not, there's no point in being clever, do it the readable way. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: can someone help me (again) stuck on ' hands on python'

2009-03-19 Thread Rhodri James
of showing you what's going on! -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Preparing teaching materials

2009-03-21 Thread Rhodri James
to print-as-function is one of the things that will throw beginners very badly indeed if your handouts and computers don't make the same assumptions! -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: file open fails.

2009-03-24 Thread Rhodri James
be illuminating? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Introducing Python to others

2009-03-26 Thread Rhodri James
could think of. Once you've shown them exceptions, show them context managers briefly. It's amazing how much they can simplify some types of exception handling. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd behavior regarding a list

2009-03-26 Thread Rhodri James
this is private, please don't call/use/alter this. Then don't call/use/alter it from outside the class. You don't really need anything stronger than convention unless for some odd reason you don't trust yourself. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman

Re: Accessing wx.TextCtrl after refactoring

2009-03-27 Thread Rhodri James
: self.__setattr__(txtctrl_path, self.txtctrl) it will do exactly what you're after! -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Accessing wx.TextCtrl after refactoring

2009-03-27 Thread Rhodri James
On Sat, 28 Mar 2009 00:51:04 -, Rhodri James rho...@wildebst.demon.co.uk wrote: On Fri, 27 Mar 2009 21:51:19 -, alex ale...@bluewin.ch wrote: Hi all I am working on a Dialog window for a gui in wxPython and started refactoring it, below code is a simplified version of it. def

Re: Accessing wx.TextCtrl after refactoring

2009-03-28 Thread Rhodri James
box1Labels needs to return is ((Input Path:, Browse, self.BrowseInDlg, txtctrl_inpath), ... -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: How to access object created in Main?

2009-03-29 Thread Rhodri James
expect your file to be included as a module at some time in the future. When that time comes, having your menu structure rely on module globals that will not exist (because the mesg = Label() doesn't get run) will cause your program to explode messily in a deeply confusing way. -- Rhodri James

Re: i have to change default tab length in pydev

2009-03-29 Thread Rhodri James
that. Running with python -t will warn you about this sort of thing. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Rhodri James
of wording (the nearest thing we have in print to tone of voice) did not inspire me to go digging around in source that you have just as easy access to, in order to answer questions that I'm not particularly interested in. -- Rhodri James *-* Wildebeeste Herder to the Masses (Also a bit grumpy

Re: if there is a return type of a method definition like java does

2009-03-29 Thread Rhodri James
knowing the return type of a function or method affects decision speed in calling it at all. I suppose it might allow some optimisation of subsequent operations on the result, but given the dynamic typing nature of Python I can't see that being worth the considerable effort. -- Rhodri James

Re: dict view to list

2009-03-29 Thread Rhodri James
, which has more to do with how many subclauses, like these, you can cope with being active at any one time before you forgot what the sentence started off being about :-) -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Rhodri James
On Mon, 30 Mar 2009 00:13:46 +0100, Alan G Isaac alan.is...@gmail.com wrote: Since you did not address my question about the nuance of magic, I'm inclined to treat you as a no vote. And you'd be wrong. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman

Re: tkinter questions: behavior of StringVar, etc

2009-03-29 Thread Rhodri James
allow you to make mistakes about what's actually happening. That's the whole point of it. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: global name 'self' is not defined - noob trying to learn

2009-03-30 Thread Rhodri James
operators you want. You also ought to think about raising an exception when __getitem__ or __setitem__ are presented with an index larger than their size. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: i have to change default tab length in pydev

2009-03-30 Thread Rhodri James
* (including the *whole* traceback) is Python saying to you? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Thoughts on language-level configuration support?

2009-03-30 Thread Rhodri James
-documenting because it's spread out all over the place. It also has the major disadvantage from my point of view of requiring Python to do magic in the background to figure out just what is being configured. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo

Re: Stripping non-numbers from a file parse without nested lists?

2009-03-31 Thread Rhodri James
values together. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Thoughts on language-level configuration support?

2009-03-31 Thread Rhodri James
On Tue, 31 Mar 2009 07:06:50 +0100, jfager jfa...@gmail.com wrote: On Mar 30, 9:31 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Mon, 30 Mar 2009 16:59:12 +0100, jfager jfa...@gmail.com wrote: It's the configuration problem.  Right now you would use something like ConfigParser

Re: python for loop

2009-03-31 Thread Rhodri James
subscripting, since you spend most of your time iterating through lists instead. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: python for loop

2009-03-31 Thread Rhodri James
On Wed, 01 Apr 2009 04:15:00 +0100, Lada Kugis lada.ku...@gmail.com wrote: On Wed, 01 Apr 2009 03:59:36 +0100, Rhodri James rho...@wildebst.demon.co.uk wrote: Two opportunities to forget to lie about how big your array is It is rank 3, meaning a33 is the last element. I don't see how

Re: python for loop

2009-03-31 Thread Rhodri James
than you might hope. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: how to handle/generate pcap file

2009-04-01 Thread Rhodri James
of the pypcap website suggests that yes, it can. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: python for loop

2009-04-01 Thread Rhodri James
that the concept of zero arrived too late to influence our fundamentally latinate language for ordinal numbers. (In other words, don't go thinking that there's anything logical about natural language :-) -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python

Re: Thoughts on language-level configuration support?

2009-04-01 Thread Rhodri James
On Wed, 01 Apr 2009 05:15:19 +0100, jfager jfa...@gmail.com wrote: On Mar 31, 10:44 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: [...] What restrictions can be put on the value you get back? What can the help system say about this, or do we have to go back to doing all that by hand

Re: Introducing Python to others

2009-04-02 Thread Rhodri James
On Thu, 02 Apr 2009 17:02:30 +0100, David C. Ullrich dullr...@sprynet.com wrote: Sometime I gotta get around to actually learning this 2.x stuff. Thought I had an idea how 1.x worked... 3.x may come as a bit of a surprise :-) -- Rhodri James *-* Wildebeeste Herder to the Masses -- http

Re: Iteratoration question

2009-04-02 Thread Rhodri James
iterator.next() 1 iterator.next() 2 iterator.next() 3 Here you already have a single instance, and you don't throw it away after incrementing its counter. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Iteratoration question

2009-04-02 Thread Rhodri James
value object isn't an iterator and doesn't obey the Iteration protocol. Expecting to be able to iterate over it is a tad optimistic. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: pygame and socket.recv

2009-04-02 Thread Rhodri James
free up some processor time, but it still leaves me with the problem of retroactive model updates. You are dealing with a network. Errors *will* happen. Plan for them from the start, or they will turn your design into spaghetti :-) -- Rhodri James *-* Wildebeeste Herder to the Masses -- http

Re: Python Goes Mercurial

2009-04-02 Thread Rhodri James
On Thu, 02 Apr 2009 19:24:49 +0100, Kay Schluehr kay.schlu...@gmx.net wrote: Good to know. Uninstalling a major feature that enhances usability just to make it usable isn't much less ironic though. Meh. Use the command line like God intended. -- Rhodri James *-* Wildebeeste Herder

Re: Iteratoration question

2009-04-02 Thread Rhodri James
an iterator. Once it's got, for calls next() on the iterator each time round the loop. Very approximately, that little for-loop translates to: a = [1,2,3,4] i = iter(a) try: while True: x = i.next() print x except StopIteration: pass -- Rhodri James *-* Wildebeeste Herder

Re: python needs leaning stuff from other language

2009-04-02 Thread Rhodri James
the newsgroup. I see no reason that a list shouldn't have a .clear method. This I wouldn't disagree with, though I imagine it will increase the frequency of complaints from people who haven't understood Python's assignment model. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http

Re: extract Infobox contents

2009-04-06 Thread Rhodri James
that as an exercise for the reader :-) -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: group several methods under a attribute

2009-04-06 Thread Rhodri James
Here's A doing something def __init__(self): self.A = ClsB.ClsA() def do_something(self): print Here's B doing something b = ClsB() b.do_something() b.A.do_something() -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python

Re: extract Infobox contents

2009-04-07 Thread Rhodri James
On Tue, 07 Apr 2009 12:46:18 +0100, J. Clifford Dyer j...@sdf.lonestar.org wrote: On Mon, 2009-04-06 at 23:41 +0100, Rhodri James wrote: On Mon, 06 Apr 2009 23:12:14 +0100, Anish Chapagain anishchapag...@gmail.com wrote: Hi, I was trying to extract wikipedia Infobox contents which

Re: need to start a new project , can python do all that ?

2009-04-15 Thread Rhodri James
the regulatory authorities otherwise (depending on what country you're in) you could end up on the wrong end of some very expensive law-suits without actually having done anything wrong. Check first. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: How to check all elements of a list are same or different

2009-04-15 Thread Rhodri James
equality too. my_list = [ 1024 ] my_list.append(1024) # Defeat the interpreter's cunningness ids = map(lambda x: id(x), ml) ids [9864656, 9864704] sum(ids)/len(ids) == ids[0] False -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: reading arguments in python script when passed from URL

2009-04-15 Thread Rhodri James
of a semi-colon, and import sys first, then yes. Your standalone client however makes no sense to me at all. How *exactly* are you invoking your Python script? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: What IDE support python 3.0.1 ?

2009-04-15 Thread Rhodri James
scripts from the command line. That said, IDLE (which comes packaged with Python) is a perfectly decent little IDE. It's surprising how little you really need given the flexibility and immediacy of working with Python. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http

Re: binary file compare...

2009-04-16 Thread Rhodri James
? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggestions wanted on Tkinter problem

2009-04-16 Thread Rhodri James
. And what, pray, did the traceback say? What was |c| before you started that last loop of Radiobutton creation? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't you just love writing this sort of thing :)

2008-12-06 Thread Rhodri James
me on this one. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: python book for non technical absolute beginner

2008-12-06 Thread Rhodri James
: the worksheets are built around Python 2.x (for small values of x!), tell your friend not to use Python 3.0. This is one of the few cases where it really matters that 'print' is now a function; nothing freaks a beginner like his output not behaving the way he's been told it should. -- Rhodri James

Re: Guido's new method definition idea

2008-12-06 Thread Rhodri James
, or at least not more than momentarily. I'm -0 on this at the moment. Maybe -0.5. I don't really like the potential for hideousness like @staticmethod def spam.alot(isa, silly, place): return silly + spam that's implied by making this a general feature of methods. -- Rhodri James

Re: Don't you just love writing this sort of thing :)

2008-12-07 Thread Rhodri James
On Sun, 07 Dec 2008 07:27:51 -, Lawrence D'Oliveiro [EMAIL PROTECTED] wrote: In message [EMAIL PROTECTED], Rhodri James wrote: Yes, it's very pretty, and you're terribly clever. In six months' time when you come back to make some engineering change and have to sit down and break

Re: Python for kids?

2008-12-07 Thread Rhodri James
The LiveWires Python Course, http://www.livewires.org.uk/python/home is aimed at your son's age-group. There are several worksheets that involve building games using a simple veneer over pygame, if you need to entice him with something! -- Rhodri James *-* Wildebeeste Herder to the Masses -- http

Re: Rich Comparisons Gotcha

2008-12-09 Thread Rhodri James
the same as __eq__, otherwise you end up with the confusion that the Perl == and eq operators regularly cause. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: How to pass out the result from iterated function

2008-12-10 Thread Rhodri James
'output' to 'final_out' with no guarantee that 'output' has ever been assigned to. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question: if var1 == var2:

2008-12-11 Thread Rhodri James
] :-) -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question: if var1 == var2:

2008-12-11 Thread Rhodri James
On Thu, 11 Dec 2008 23:49:10 -, John Machin sjmac...@lexicon.net wrote: On Dec 12, 10:31 am, Rhodri James rho...@wildebst.demon.co.uk wrote: On Thu, 11 Dec 2008 19:49:23 -, Steve Holden st...@holdenweb.com   wrote: ... and it's so hard to write      item = item[:-1] Tsk

Re: sorting for recursive folder rename

2008-12-16 Thread Rhodri James
the intermediate directory creation so you don't even need to sort the list. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Why no lexical scoping for a method within a class?

2008-12-17 Thread Rhodri James
| in |b| is still in lexical scope, though. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: noob trouble with IDLE

2008-12-22 Thread Rhodri James
Run Module for anything but the most straightforward Python code. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: iterating initalizations

2008-12-22 Thread Rhodri James
still not terribly clear as to why you need so many. Is each list intended for a different instrument, so you're more looking at: violin_1 = [ ...stuff... ] violin_2 = [ ...other stuff...] viola = [ ...really sweet stuff... ] cello = [ ...really boring stuff... ] -- Rhodri James

Re: Python's popularity

2008-12-22 Thread Rhodri James
On Tue, 23 Dec 2008 04:35:42 -, Grant Edwards gra...@visi.com wrote: IIRC, Python came pre-installed on my IBM Thinkpad. However, it wasn't anyplace the average user would stumble across it... The suggestively named IBMTOOLS directory, I believe :-) -- Rhodri James *-* Wildebeeste

Re: iterating initalizations

2008-12-23 Thread Rhodri James
__A and __B are full of zeroes, then you should suspect your notes.pitchTwist() and rhythm.rhythmTwist() methods of returning zeroes. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-05 Thread Rhodri James
EMACS configuration. Every other language I use (yes, including C) I learned afterwards. Moral: times change. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-07 Thread Rhodri James
working with other languages. I don't know why this should be, but it is. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: How to store passwords?

2009-01-07 Thread Rhodri James
of secured protocol instead? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-09 Thread Rhodri James
that were conceptually the same across the languages, instead of things that only looked similar. Which is where the data model comes in, as has already been explained at length, several times now. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python

Re: Detecting open files and forcing closure

2009-01-09 Thread Rhodri James
to implement a backup strategy. If you are, I'd suggest your problem is XCOPY -- you really need something more combat capable instead. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: why cannot assign to function call

2009-01-10 Thread Rhodri James
arrays are anomalous in comparison with other C data types. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Does Python really follow its philosophy of Readability counts?

2009-01-13 Thread Rhodri James
underscore = private convention, and I just don't see a burning need for it, that's all. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   >