Re: path slashes cleaning

2008-09-05 Thread Michael Wronna
Am 04.09.2008, 15:27 Uhr, schrieb Mike Driscoll <[EMAIL PROTECTED]>: On Sep 4, 8:25 am, "Mathieu Prevot" <[EMAIL PROTECTED]> wrote: Hi, for scripts that take arguments, I would like to remove the trailing slash if it's present. Is there something else than: a='/usr/local/lib/' if a[-1] == '/

Re: Looking for a Python Program/Tool That Will Add Line Numbers to a txt File

2008-02-18 Thread Michael Wronna
On Thu, 14 Feb 2008, W. Watson wrote: > See Subject. It's a simple txt file, each line is a Python stmt, but I need > up to four digits added to each line with a space between the number field > and the text. Perhaps someone has already done this or there's a source on > the web for it. I'm n

Re: How to use list as key of dictionary?

2007-11-06 Thread Michael Wronna
On Tue, 6 Nov 2007, Boris Borcic wrote: >> We know that list cannot be used as key of dictionary. > Yeah, but do we know why ? I think, because lists are mutable and a key of a dictionary MUST be unmutable, not to crash the dictionary by accidently changing one of its keys! Mike -- http://mai