Re: Should I Learn Python or Ruby next?

2010-06-24 Thread Rhodri James
On Wed, 23 Jun 2010 23:47:55 +0100, rantingrick rantingr...@gmail.com wrote: On Jun 23, 4:43 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: And how exactly does your example express itself in a more syntactically-correct linear-flow than the two code snippets i provided earlier

Re: Python as a scripting language. Alternative to bash script?

2010-06-28 Thread Rhodri James
was like that once. In the 1970s, all you could return was an int or a float. But that got fixed. Strangely, these facts are not unconnected. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Namespace problem?

2010-07-01 Thread Rhodri James
another artistic interpretation of a photograph of your code :-), then I'd go with Matt's analysis. This will give you a NameError for fws_last_col if tracker.hasFWS() happens to return False for all students. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org

Re: Storing a callback function as a class member

2010-07-07 Thread Rhodri James
version of Python are you using? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Hello

2010-07-09 Thread Rhodri James
. Basically, try a few different editors out and see what style you like. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Easy questions from a python beginner

2010-07-12 Thread Rhodri James
until it's actually used. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: python terminology on classes

2010-07-26 Thread Rhodri James
. The answers to all your questions are section 9 of the tutorial. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: How to capture all the environment variables from shell?

2010-07-26 Thread Rhodri James
...@gnudebst:~$ HELLO=world rho...@gnudebst:~$ echo $HELLO world rho...@gnudebst:~$ export HELLO rho...@gnudebst:~$ python Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 Type help, copyright, credits or license for more information. import os os.environ['HELLO'] 'world' -- Rhodri

Re: python terminology on classes

2010-08-04 Thread Rhodri James
a lot. It seemed time to be a little sharper in the hope that learning might emerge. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: easy question on parsing python: is not None

2010-08-05 Thread Rhodri James
that is not is a single operator, *not* the concatenation of is and not. Your last test is probably not checking what you think it is :-) 3 is (not None) False -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Feeding differeent data types to a class instance?

2010-03-13 Thread Rhodri James
... @classmethod def from_list(cls, lst): return cls(lst[0], lst[1], lst[2]) vect = [1,2,3] myvec = Vector.from_list(vect) -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't understand behavior; instance form a class in another class' instance

2010-03-25 Thread Rhodri James
namespaces are implemented with dictionaries. The distinction you're missing is that lists and dictionaries are mutable, while booleans aren't; you can change the contents of a dictionary, but you can't change the 'contents' of a boolean. -- Rhodri James *-* Wildebeeste Herder to the Masses

Re: Hi, friends. I wanna ask if there is a function which is able to take a list as argument and then return its top-k maximums?

2010-04-22 Thread Rhodri James
that. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: global variables in imported modules

2010-05-16 Thread Rhodri James
it would be mod.config.x. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Global variables for python applications

2010-05-17 Thread Rhodri James
to this object and cannot be rebound.' That would cover most of the cases people care about, and the gotchas are essentially the same as with default arguments. But yes, it would require new syntax. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo

Re: What's the matter with docs.python.org?

2010-05-19 Thread Rhodri James
browser. It's been working fine for me, using Opera on Window and Ubuntu, for the last week or so. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: CTYPES structure passing

2010-06-03 Thread Rhodri James
you mean FrameFormat.XUnion.subSample = 0 FrameFormat.XUnion.binning = 0 instead? FrameFormat.flagsX = 0 FrameFormat.YUnion = 0 Ditto here? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Sage's Python

2010-12-13 Thread Rhodri James
actually installed it yet. Check the Sage website, which has plenty of documentation, and try to figure out where you left the path on whichever method you used. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: simple games w/o pygame

2010-12-22 Thread Rhodri James
tutorial. However, now all I can find is more complex games using Pygame. Can anyone help me out here? Try the numbered worksheets from the Livewires course: http://www.livewires.org.uk/python/home They are aimed at 12-15 year olds, but an 11 year old should be able to cope. -- Rhodri

Re: Partition Recursive

2010-12-23 Thread Rhodri James
doubt it. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: [python-list] - what do you think ?

2011-02-08 Thread Rhodri James
thank you for breaking the minimal threading that can be inferred from titles if the list reflector adds stuff unexpectedly. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: [python-list] - what do you think ?

2011-02-08 Thread Rhodri James
On Wed, 09 Feb 2011 01:59:46 -, David Robinow drobi...@gmail.com wrote: On Tue, Feb 8, 2011 at 5:03 PM, Rhodri James rho...@wildebst.demon.co.uk wrote: On Tue, 08 Feb 2011 12:18:50 -, przemol...@poczta.fm wrote: On Tue, Feb 08, 2011 at 10:16:42PM +1100, Ben Finney wrote: Either

Re: OO Python

2011-02-10 Thread Rhodri James
and Python nuances that I need to be up to speed on. On the whole, I'd forget about VB and start with the tutorial at www.python.org. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with giant font sizes in tkinter

2011-02-13 Thread Rhodri James
twenty times bigger? -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with giant font sizes in tkinter

2011-02-16 Thread Rhodri James
On Tue, 15 Feb 2011 07:06:35 -, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 13 Feb 2011 23:42:06 +, Rhodri James wrote: On Fri, 11 Feb 2011 02:08:01 -, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Thu, 10 Feb 2011 15:48:47 +

Re: IDLE won't wrap lines of text

2011-02-20 Thread Rhodri James
for it to discourage overly long lines. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: IDLE won't wrap lines of text

2011-02-20 Thread Rhodri James
On Mon, 21 Feb 2011 01:41:12 -, Richard D. Moores rdmoo...@gmail.com wrote: On Sun, Feb 20, 2011 at 16:31, Rhodri James rho...@wildebst.demon.co.uk wrote: On Sat, 19 Feb 2011 23:56:45 -, Richard D. Moores rdmoo...@gmail.com wrote: Vista Python 3.1.3 I can't figure out how

Re: Running Scripts vs Interactive mode

2011-02-23 Thread Rhodri James
the current PATH setting (in the lower half of the dialog) to add ;C:\python27 to the end. Obvious, isn't it :-/ -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Defining class attributes + inheritance

2011-03-08 Thread Rhodri James
typed. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Defining class attributes + inheritance

2011-03-08 Thread Rhodri James
think what you meant was something like this: class NewClass(BaseClass): def __init__(self, a, b, c, d, new): super(NewClass, self).__init__(a, b, c, d) self.new = new # etc -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman

Re: getter and setter and list appends

2009-04-20 Thread Rhodri James
._parent = obj 1. Please don't top-post, it really doesn't help legibility. 2. This is an artist's impression of a photograph of a greek translation of your code. I wouldn't use it as a reference for anything except how to terminally confuse yourself. -- Rhodri James *-* Wildebeeste Herder

Re: Passing all extra commandline arguments to python program, Optparse raises exception

2009-04-20 Thread Rhodri James
and discard the -- * bare - (if not the argument to some option): halt command-line processing but keep the - (append it to parser.largs) -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a programming language that is combination of PythonandBasic?

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

Re: Accessing items in nested tuples

2009-04-22 Thread Rhodri James
whatever object data[0] gives you exactly like any other use of that type of object. If it gives you a dictionary, you can write: data[0]['spam'] = moist and delicious and so on. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: python list handling and Lisp list handling

2009-04-24 Thread Rhodri James
, list slicing is another copy operation, so you're going to run into exactly the same set of problems. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Lisp mentality vs. Python mentality

2009-04-25 Thread Rhodri James
is varying algorithms, which are rarely going to reuse standalone code. They still need to deal with case-insensitive strings, though. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: python list handling and Lisp list handling

2009-04-25 Thread Rhodri James
these then be fair encodings? is a 'yes'. Any disagreement? I'm probably being rather thick, but aren't you saying here Assuming that the answer to this question is 'yes', is the answer to this question 'yes'? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman

Re: extracting duplicates from CSV file by specific fields

2009-04-28 Thread Rhodri James
', 'T200', 'pn123', 'sn222' 'aaa.222', 'T300', 'pn123', 'sn222' you want to keep: 'aaa.111', 'T100', 'pn123', 'sn111' 'aaa.222', 'T300', 'pn123', 'sn222' -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Why bool( object )?

2009-04-28 Thread Rhodri James
no carrots. Not if you need onions but not carrots it isn't! -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: regular expression, unicode

2009-04-29 Thread Rhodri James
this is anything to do with the regular expression? It looks more like it's complaining about what you've typed in at the console. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Help! Can't get program to run.

2009-05-02 Thread Rhodri James
already succeeded with! -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Help inside Python

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

Re: if statement, with function inside it: if (t = Test()) == True:

2009-05-04 Thread Rhodri James
arrows like = or - collide with different comparators. About all that's left that even vaguely implies assignment is ~, and it's no better. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: call function of class instance with no assigned name?

2009-05-05 Thread Rhodri James
: DoSomething._CMD_DICT[cmd](self) except KeyError: print Foul! Foul, I say! END CODE To be honest, the getattr approach is probably as easy to follow and less prone to forgetting to update the dictionary. -- Rhodri James *-* Wildebeeste Herder to the Masses

Re: Self function

2009-05-05 Thread Rhodri James
sorry, but while I'm mildly positive towards the proposal (and more so towards Aaron's decorator), I don't buy this argument at all. What is broken about your editor's global search-and-replace function that makes it usually useless for making these name changes? -- Rhodri James *-* Wildebeeste

Re: Parsing text

2009-05-06 Thread Rhodri James
'scene'. m += scene m += '\div' print m I'm seeing nothing here that should produce an error message that has anything to do with NoneType. Any chance of (a) a more accurate code sample, (b) the traceback, or (c) sample data? -- Rhodri James *-* Wildebeeste Herder to the Masses

Re: Self function

2009-05-06 Thread Rhodri James
On Wed, 06 May 2009 04:59:59 +0100, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Tue, 05 May 2009 22:35:08 -0300, Rhodri James rho...@wildebst.demon.co.uk escribió: On Tue, 05 May 2009 21:43:16 +0100, bearophileh...@lycos.com wrote: wolfram.hinde...: It is easy to change all

Re: Self function

2009-05-06 Thread Rhodri James
On Wed, 06 May 2009 23:33:20 +0100, Luis Alberto Zarrabeitia Gomez ky...@uh.cu wrote: Quoting Rhodri James rho...@wildebst.demon.co.uk: So the answer to my question would be nothing? Indeed, there is nothing broken with the search and replace feature of his editor. When he is copying

Re: regular expression for getting content between parentheses

2009-05-07 Thread Rhodri James
that with regular expressions, you'll have to parse your way through the input string counting open and close parentheses as you go. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: ISO exemplary Python scripts

2009-05-10 Thread Rhodri James
if you don't want to do things its way, but it does at least make parameter handling in a user-friendly way easy. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: There may be a much better way to manage artillery.

2009-05-10 Thread Rhodri James
collected. What framework are you writing your game in? Pygame has facilities for handling this sort of thing fairly straightforwardly. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrapping comments

2009-05-10 Thread Rhodri James
come across anything like this. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: There may be a much better way to manage artillery.

2009-05-11 Thread Rhodri James
On Mon, 11 May 2009 22:59:43 +0100, Tobiah t...@tobiah.org wrote: On Mon, 11 May 2009 00:48:25 +0100, Rhodri James wrote: On Mon, 11 May 2009 00:06:34 +0100, Tobiah t...@tobiah.org wrote: [Snippety snip] I wanted the bullets to be responsible for destroying themselves, but a little

Re: Wrapping comments

2009-05-11 Thread Rhodri James
On Mon, 11 May 2009 08:39:48 +0100, Tobias Weber t...@gmx.net wrote: In article mailman.5400.1242000728.11746.python-l...@python.org, Rhodri James rho...@wildebst.demon.co.uk wrote: What on earth are you talking about? '#' has its own key on a UK layout Not on Apple keyboards

Re: n00b question: Possible to pass lists to a Template class?

2009-05-13 Thread Rhodri James
' substitution, so you'll just get a string representation of your dictionary. You could play around with defining your own custom Template class, but it's probably not worth the effort. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd list behavior

2009-05-13 Thread Rhodri James
? == Take a look at the split() command. I think you will find you need one var on the left side for each piece on the right. Given that he's immediately indexing the split results, that's irrelevant. There's no point in even guessing with out the traceback. -- Rhodri James

Re: When *don't* I use 'self' in classes?

2009-05-13 Thread Rhodri James
it later. In general, don't make something an attribute if you know you're never going to reuse it. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd list behavior

2009-05-14 Thread Rhodri James
On Thu, 14 May 2009 17:49:33 +0100, norseman norse...@hughes.net wrote: Rhodri James wrote: On Wed, 13 May 2009 23:08:26 +0100, norseman norse...@hughes.net wrote: Evan Kroske wrote: I'm working on a simple file processing utility, and I encountered a weird error. If I try to get

Re: How to catch str exception?

2009-05-15 Thread Rhodri James
. 3) Fix it yourself. The beauty of Python is that 3) isn't all that hard! -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing Strings in Enclosed in Curly Braces

2009-05-15 Thread Rhodri James
with them: x = {Some text to parse {as well as an aside} and so on} Parsing is not an entirely trivial subject, particularly when users can futz about with the strings you're parsing. That's one reason there are so many lexers and parsers out there! -- Rhodri James *-* Wildebeeste Herder

Re: python

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

Re: A newbie question about some code

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

Re: Is there a better way to chose a slice of a list?

2009-05-19 Thread Rhodri James
a list with strings, but to keep you day data in numeric form and use that to slice with, and for that enums will greatly help you keep things clear. However, whether that's worth doing or not depends on the bigger picture, and you haven't told us anything that would help us figure that out. -- Rhodri

Re: A list with periodic boundary conditions

2009-05-21 Thread Rhodri James
list, but I can't off-hand think of a view method that won't. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: defaultdict's bug or feature?

2009-05-21 Thread Rhodri James
a feature? Feature. You're blaming 'get' for doing exactly what it said it would, both in returning None and not gratuitously altering the dictionary. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: ffmpeg and python big problem

2009-05-21 Thread Rhodri James
why you aren't using ffmpeg directly. This program is for my friend and he needs it ready preety quick. Aha. Ahahahahahahahaha. Ahem. Sorry, but pretty quick and ffmeg don't go together well in my experience. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org

Re: Is there a better way to chose a slice of a list?

2009-05-21 Thread Rhodri James
doing this a lot (as you imply) then it's going to be horribly inefficient, since you're doing an extra two (or more) O(n) searches for every row. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: finding repeated data sequences in a column

2009-05-21 Thread Rhodri James
in the standard library documentation should make things clearer. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: When does the escape character work within raw strings?

2009-05-21 Thread Rhodri James
* characters long. It's re.sub (in common with the rest of the re module functions) that chooses to interpret the backslash specially. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding a Par construct to Python?

2009-05-21 Thread Rhodri James
common code in the outer loop accessing the shared variables. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: defaultdict's bug or feature?

2009-05-21 Thread Rhodri James
interfaces with two different specs. Why are you expecting them to have the same effect? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding a Par construct to Python?

2009-05-22 Thread Rhodri James
at the end of the PAR. Yes, this does make it very easy for the freshly-enabled careless programmer to introduce deadlocks and never realise it. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: defaultdict's bug or feature?

2009-05-22 Thread Rhodri James
that you aren't doing (which it does, but you override __missing__() so it never notices that it doesn't have a default_factory). You get away with it here, but it's not a good habit to get into. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: When does the escape character work within raw strings?

2009-05-22 Thread Rhodri James
On Fri, 22 May 2009 15:47:49 +0100, walterbyrd walterb...@iname.com wrote: On May 21, 9:44 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: Escaping the delimiting quote is the *one* time backslashes have a special meaning in raw string literals. If that were true, then wouldn't r'\b

Re: ffmpeg and python big problem

2009-05-22 Thread Rhodri James
a video from, I could try it. You seem to have emailed me directly, not the list. I've copied this back to the list so Emile can see it too. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Abstract Classes

2009-05-23 Thread Rhodri James
anything and may cost you instead. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with sys.stout.flush()

2009-05-23 Thread Rhodri James
On Sat, 23 May 2009 18:19:11 +0100, Joel Ross jo...@cognyx.com wrote: Now I can move onto next one. Except that you still have the interesting issue that your environment isn't responding to '\r' correctly, which worries me rather. Or did you never test that? -- Rhodri James *-* Wildebeeste

Re: When does the escape character work within raw strings?

2009-05-23 Thread Rhodri James
On Sat, 23 May 2009 22:05:10 +0100, walterbyrd walterb...@iname.com wrote: On May 22, 12:22 pm, Rhodri James How do you know how a string object is going to be treated by any given function?  Read the Fine Manual for that function. So am I to understand that there is no consistency

Re: Can I get a technical explanation on the following error

2009-05-24 Thread Rhodri James
://docs.python.org/reference/lexical_analysis.html#literals -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: writing on file not until the end

2009-05-24 Thread Rhodri James
(Ubuntu Linux). It must be something to do with the context you're calling the code in. Are you checking the output before the program has finished running or something? -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: What text editor is everyone using for Python

2009-05-26 Thread Rhodri James
is to change the outer quotes to double-quotes, but it annoys me when I have to change my code to appease a tool. It's the separate python-mode that gets this (and much else) wrong. The Python mode that Ubuntu packages with emacs 22.2.1 works just fine. -- Rhodri James *-* Wildebeeste Herder

Re: What text editor is everyone using for Python

2009-05-27 Thread Rhodri James
On Wed, 27 May 2009 16:56:12 +0100, Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid wrote: Rhodri James a écrit : On Tue, 26 May 2009 14:22:29 +0100, Roy Smith r...@panix.com wrote: My pet peeve is syntax-aware editors which get things wrong. For example, the version

Re: What text editor is everyone using for Python

2009-05-28 Thread Rhodri James
On Thu, 28 May 2009 06:24:56 +0100, Paul Rudin paul.nos...@rudin.co.uk wrote: Rhodri James rho...@wildebst.demon.co.uk writes: The feature that caused me to uninstall python-mode.el was its bloody-minded determination to regard '_' as a word character, something which caused me more typing

Re: extract to dictionaries

2009-05-29 Thread Rhodri James
meaningful name for it, but I don't know the context you're working in). In real code I would use regular expressions rather than `startswith` and the equality because they cope more easily with tabs, newlines and other 'invisible' whitespace. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http

Re: extract to dictionaries

2009-05-29 Thread Rhodri James
On Fri, 29 May 2009 13:10:47 +0100, Rhodri James rho...@wildebst.demon.co.uk wrote: current_name = dummy Gah! I meant, of course, current_name = 'dummy' -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError: 'int' object is not callable

2009-06-01 Thread Rhodri James
of your code this is a wild guess, but have you used `type` as a variable? If you have, that would mask the builtin name `type`, and would give you this error assuming `type` contains an integer. Moral: don't use builtin names for variables. -- Rhodri James *-* Wildebeeste Herder to the Masses

Re: Extract value and average

2009-06-08 Thread Rhodri James
. continue values.append(float(words[i+2])) mean = sum(values)/len(values) should do the job. You don't need the second strip(), words = line.split() should be sufficient. (And we're back to the 'naked' bit again...) -- Rhodri James *-* Wildebeeste Herder to the Masses -- http

Re: How to escape # hash character in regex match strings

2009-06-11 Thread Rhodri James
seeing all of your posts twice, from two different addresses. This is a little confusing, to put it mildly, and doesn't half break the threading. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: install older Python version parallel

2009-06-11 Thread Rhodri James
if you say more than just it crashes. What's the traceback? -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help in Python regular expression

2009-06-12 Thread Rhodri James
paranoid when it comes to whitespace. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError: int argument required

2009-06-12 Thread Rhodri James
toothpick syndrome. Python accepts both single and double quotes to help avoid creating something so unreadable: use them. 3. matchobject.group(n) returns a string, not an int or float. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Good books in computer science?

2009-06-13 Thread Rhodri James
for is self- improvement books for a software engineer. In that case The Mythical Man-Month (Brooks) is a must. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Lexical scope: converting Perl to Python

2009-06-13 Thread Rhodri James
been given several possibilities, the correct answer might well be don't do that at all :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about None

2009-06-13 Thread Rhodri James
in which we were talking (and denotational semantics is a branch of category theory, which is not specific to computer science if you don't mind). If None is nothing, then it can't be a string, int, float or anything else, because they're all something. -- Rhodri James *-* Wildebeest Herder

Re: frustrating failure of 'break' statement ( novice )

2009-06-13 Thread Rhodri James
(pointing to the end of *print*) if I cut and paste the program exactly into a Python shell, presumably because the shell gets unhappy about having more command input when it wants to be executing the while loop. Does this match what you see? -- Rhodri James *-* Wildebeest Herder to the Masses

Re: Good books in computer science?

2009-06-14 Thread Rhodri James
, it doesn't matter how much you practice it you'll still be no good at good practice in practice. Practically speaking, that is :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError: int argument required

2009-06-14 Thread Rhodri James
On Sun, 14 Jun 2009 10:43:30 +0100, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.1510.1244832141.8015.python-l...@python.org, Rhodri James wrote: 2. That output string has severe leaning toothpick syndrome. Python accepts both single and double quotes

Re: TypeError: int argument required

2009-06-15 Thread Rhodri James
On Mon, 15 Jun 2009 01:33:50 +0100, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message mailman.1565.1245019944.8015.python-l...@python.org, Rhodri James wrote: On Sun, 14 Jun 2009 10:43:30 +0100, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message

Re: persistent composites

2009-06-17 Thread Rhodri James
that it is a problem, whichever of the many possible 'it's you're talking about. So far, the question Why would I want to use this? What's the use case? has gone unanswered, and I'm sure I'm not the only baffled by it. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman

Re: Pythonic way to overwrite a file

2009-06-17 Thread Rhodri James
into the habit of doing that, especially for personal use. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   >