Re: New Python book

2005-10-09 Thread hrh1818
This book is not a new book. It is an updated version of Magnus's 2002 Practical Python book. Dick Moores wrote: > (Sorry, my previous post should not have had "Tutor" in the subject header.) > > Magnus Lie Hetland's new book, _Beginning Python: From Novice to > Professional_ was published by Ap

Re: Function decorator that caches function results

2005-10-09 Thread Steven D'Aprano
On Sun, 09 Oct 2005 17:55:16 +0200, Diez B. Roggisch wrote: >> If what you say is true, then all functions are closures, and closure is >> just a synonym for function, and there is no difference between a function >> and a closure. Then why bother to create the term? Clearly, whoever >> invented t

Re: Function decorator that caches function results

2005-10-09 Thread Steven D'Aprano
On Sun, 09 Oct 2005 17:39:23 +0200, Fredrik Lundh wrote: > only if you're obsessed with CPython implementation details. No. I'm obsessed with finding out what closures are, since nobody seems to have a good definition of them! However, I have learnt some things: closures are something which func

Re: Python's Performance

2005-10-09 Thread Alex Stapleton
On 9 Oct 2005, at 19:04, Bruno Desthuilliers wrote: > Laszlo Zsolt Nagy a écrit : > > >> Dave wrote: >> >> >> >>> Hello All, >>> >>> I would like to gather some information on Python's runtime >>> performance. As far as I understand, it deals with a lot of string >>> objects. Does it require a l

searching a project to contribute to

2005-10-09 Thread Clint Norton
Hi all, I'm a student currently in the beginning of my master's degree and I'm searching for an interesting open source project written in Python to contribute to. I have worked as a programmer for the past few years (mostly in academia but also as a typical full time code monkey in a comme

Re: Python's Performance

2005-10-09 Thread Fredrik Lundh
Alex Stapleton wrote > Except it is interpreted. except that it isn't. Python source code is compiled to byte code, which is then executed by a virtual machine. if the byte code for a module is up to date, the Python runtime doesn't even look at the source code. > What is your point? that som

Re: new forum -- homework help/chit chat/easy communication

2005-10-09 Thread Donn Cave
Quoth Mike Meyer <[EMAIL PROTECTED]>: | Lasse Vågsæther Karlsen <[EMAIL PROTECTED]> writes: ... |> I think that at one time, scripting languages was something that lived |> within other programs, like Office, and couldn't be used by themselves |> without running it inside that program, and as thus

Re: Jargons of Info Tech industry

2005-10-09 Thread Roedy Green
On Sun, 09 Oct 2005 16:14:32 GMT, Roel Schroeven <[EMAIL PROTECTED]> wrote or quoted : >His reply wasn't exactly clear, but I that he means that wen you use HTM >mail, you don't have to attach the photo with the email. You can also >use the HTML to refer to an image somewhere on a webserver. Ther

Re: Jargons of Info Tech industry

2005-10-09 Thread Roedy Green
On Sun, 09 Oct 2005 20:54:32 +1000, Steven D'Aprano <[EMAIL PROTECTED]> wrote or quoted : >Only if your photos are so obscure and confusing that they need captions. That is a hair shirt approach. What if someone is sending photos of their new house? What if I am sending diagrams to help someone

Re: Jargons of Info Tech industry

2005-10-09 Thread Roedy Green
On Mon, 10 Oct 2005 01:40:34 +1000, Steven D'Aprano <[EMAIL PROTECTED]> wrote or quoted : > >Yes. It is called "eyes". I look at the image, and miracle upon miracles, >I recognise Johnny wearing a hat. Even for a limited application like children's birthday parties captions could say things like:

Python reliability

2005-10-09 Thread Ville Voipio
I would need to make some high-reliability software running on Linux in an embedded system. Performance (or lack of it) is not an issue, reliability is. The piece of software is rather simple, probably a few hundred lines of code in Python. There is a need to interact with network using the socke

Re: Jargons of Info Tech industry

2005-10-09 Thread Dr.Ruud
Roedy Green: > (Note that the most > common spam is the Nigerian con and variants which comes as a > non-formatted message.) Don't think that that is true for everybody. For example not for people that are behind central filters that already cope with common spam. -- Affijn, Ruud

Re: Jargons of Info Tech industry

2005-10-09 Thread Roedy Green
On Sun, 09 Oct 2005 16:16:57 GMT, Rich Teer <[EMAIL PROTECTED]> wrote or quoted : >And even more convenient is "Hey grandma, check out the latest >photos on my web site: www.example.com/rich/photos". that is what my sister does. And there is now a service that will do that See http://storymill.

wxPython in a PDA

2005-10-09 Thread Ville Voipio
Does anyone know of an inexpensive PDA which would run wxPython? The availability of a conventional (wired) Ethernet would be nice, as well (e.g., using a CF adapter). TIA, - Ville -- Ville Voipio, Dr.Tech., M.Sc. (EE) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's Performance

2005-10-09 Thread Donn Cave
Quoth "Fredrik Lundh" <[EMAIL PROTECTED]>: | Alex Stapleton wrote | | > Except it is interpreted. | | except that it isn't. Python source code is compiled to byte code, which | is then executed by a virtual machine. if the byte code for a module is up | to date, the Python runtime doesn't even lo

Re: Jargons of Info Tech industry

2005-10-09 Thread riplin
> My grandma doesn't put captions in her photo album, > and she doesn't need captions on her photos in email. She doesn't need captions in the album because she will explain the pictures, at length, every single one of them, to anyone who comes within grabbing distance. > "Here's Johnny with the

Re: Function decorator that caches function results

2005-10-09 Thread Piet van Oostrum
> Steven D'Aprano <[EMAIL PROTECTED]> (SD) wrote: >SD> [penny drops] Now we're getting somewhere... a closure is something >SD> _added_ to a function. So we should talk about functions-without-closures >SD> and functions-with-closures. Well, I have never heard that definition. For more than h

Re: Jargons of Info Tech industry

2005-10-09 Thread Roedy Green
On Sun, 09 Oct 2005 05:55:01 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote or quoted : >Virus writers will love the ability to >change peoples address books remotely. Since this is just a broad brush view, I find it odd you can predict just what bugs there will be in the early implementations. You

Re: how do you pronounce wxpython

2005-10-09 Thread Clint Norton
2nd one indeed -- http://mail.python.org/mailman/listinfo/python-list

Re: Jargons of Info Tech industry

2005-10-09 Thread Roedy Green
On Sun, 9 Oct 2005 13:44:42 GMT, Tim Tyler <[EMAIL PROTECTED]> wrote or quoted : >``Like ICQ, someone cannot send you mail without your prior permission. > They can't send you mail because they don't have your public key to > encrypt the mail.'' > >...is pretty confusing - because "public key"

Re: noob question Letters in words?

2005-10-09 Thread Clint Norton
BTW do yourself a favor and learn to use the cmd module: 2 nice examples: http://www.eskimo.com/~jet/python/examples/cmd/ it will also give you command completion if your termianl supports it (most terminals on most linux distros do). -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's Performance

2005-10-09 Thread Fredrik Lundh
Donn Cave wrote: > | > Except it is interpreted. > | > | except that it isn't. Python source code is compiled to byte code, which > | is then executed by a virtual machine. if the byte code for a module is up > | to date, the Python runtime doesn't even look at the source code. > > Fair to say t

Re: Jargons of Info Tech industry

2005-10-09 Thread Roedy Green
On Sun, 09 Oct 2005 05:55:01 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote or quoted : >Actually, you present a design that forces a solution that makes them >do what you want down their throats, never mind what they want, or >what they've been doing. It shows an amazing ignorance about the >interne

Re: Jargons of Info Tech industry

2005-10-09 Thread Paul Rubin
Roedy Green <[EMAIL PROTECTED]> writes: > >His reply wasn't exactly clear, but I that he means that wen you use HTM > >mail, you don't have to attach the photo with the email. You can also > >use the HTML to refer to an image somewhere on a webserver. > There is that and also the use of HTML forma

Re: Jargons of Info Tech industry

2005-10-09 Thread Matt Garrish
"Roedy Green" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Your post brings up a meta-issue. How long should posts be? > I note several schools of thought. > Your post brings up a usenetiquette issue. Why do you think that perl/python/java/c people are interested in your per

Re: Function decorator that caches function results

2005-10-09 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > No. I'm obsessed with finding out what closures are, since nobody seems to > have a good definition of them! Why don't you read SICP: http://mitpress.mit.edu/sicp/full-text/book/book.html You will be a much wiser person for having done so. > Howe

Re: Function decorator that caches function results

2005-10-09 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > Is it correct to say that Python *always* creates a closure whenever a def > or lambda is executed? Or is it only for *certain* defs/lambdas? The word closure is being used two different ways. First of all the computer-science term "closure" which mea

Re: Python reliability

2005-10-09 Thread Paul Rubin
Ville Voipio <[EMAIL PROTECTED]> writes: > The software should be running continously for > practically forever (at least a year without a reboot). > Is the Python interpreter (on Linux) stable and > leak-free enough to achieve this? I would say give the app the heaviest stress testing that you c

Re: Function decorator that caches function results

2005-10-09 Thread Diez B. Roggisch
> > [penny drops] Now we're getting somewhere... a closure is something > _added_ to a function. So we should talk about functions-without-closures > and functions-with-closures. Yes. > > >>Speaking in >>terms of "is a" could be seen as some inheritance relation. > > > [penny rises again]

Re: Jargons of Info Tech industry

2005-10-09 Thread Steven D'Aprano
On Sun, 09 Oct 2005 19:28:31 +, Roedy Green wrote: > On Sun, 09 Oct 2005 20:54:32 +1000, Steven D'Aprano > <[EMAIL PROTECTED]> wrote or quoted : > >>Only if your photos are so obscure and confusing that they need captions. > > That is a hair shirt approach. What if someone is sending photos

__Classes and type tests

2005-10-09 Thread Brian van den Broek
Hi all, The code below exhibits an attempt to refer to the type of a __Class from within a method of that class. I've been unable to figure out how to make it work as I want, and would appreciate any insight. The problem emerged out of a bad design that the good folks on the tutor list helped

Re: Jargons of Info Tech industry

2005-10-09 Thread Steven D'Aprano
On Sun, 09 Oct 2005 19:40:30 +, Roedy Green wrote: > Imagine a main sending emailed floor tile samples to his wife on a > business trip for her final veto and not being allowed to caption > them. I don't have to imagine it, I've done it, more or less something like this: "Dear wifey, here a

Re: Jargons of Info Tech industry

2005-10-09 Thread Stefaan A Eeckels
On Mon, 10 Oct 2005 08:49:32 +1000 Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 09 Oct 2005 19:28:31 +, Roedy Green wrote: > > > What if I am sending diagrams to help someone repair > > their computer? It is ridiculous to tie people's arms behind their > > backs. What you do instead

Re: __Classes and type tests

2005-10-09 Thread Fredrik Lundh
Brian van den Broek wrote: > But the academic issue "How/Can it be done?" still itches. class __TwoUnderBase(object): def __init__(self): if self.__class__.__name__ == "__TwoUnderBase": print "From __TwoUnderBase" else: print "From subclass",

Re: Python reliability

2005-10-09 Thread Steven D'Aprano
On Sun, 09 Oct 2005 23:00:04 +0300, Ville Voipio wrote: > I would need to make some high-reliability software > running on Linux in an embedded system. Performance > (or lack of it) is not an issue, reliability is. [snip] > The software should be running continously for > practically forever (a

Re: Jargons of Info Tech industry

2005-10-09 Thread Steven D'Aprano
On Sun, 09 Oct 2005 20:01:28 +, Roedy Green wrote: > You might say what about those free 10 mb websites? That's not very > many images with today's megapixel digital cameras. My system admins have a number of names for people who try to send multi-megabyte files by email. The names start wit

Re: Jargons of Info Tech industry

2005-10-09 Thread Gordon Burditt
>>And how do you fix the problem of unsolicited USENET articles? >>(*ALL* of them are unsolicited to someone). Or unsolicited >>email? > >Read my essay. >http://mindprod.com/projects.html/mailreadernewsreader.html > >I talk around those problems. > >It requires a fresh start. This URL does not

Re: Python's Performance

2005-10-09 Thread Steven D'Aprano
On Sun, 09 Oct 2005 21:00:57 +, Dennis Lee Bieber wrote: > I'd consider that BASIC to be a fully interpreted language, as the > tokens are still a one-for-one equivalence of the source code. Python, > UCSD, and Java are not one-for-one, so on that basis, they fit the > definition of a co

Re: Python reliability

2005-10-09 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > If performance is really not such an issue, would it really matter if you > periodically restarted Python? Starting Python takes a tiny amount of time: If you have to restart an application, every network peer connected to it loses its connection. Thi

Re: non descriptive error

2005-10-09 Thread Timothy Smith
Terry Hancock wrote: >On Thursday 06 October 2005 11:57 pm, Timothy Smith wrote: > > >>i try to run my app and i get this >> >>%python DutyShift.py >>error >> >>thats it. thats the error. mya pp was previously working, and i did make >>some fairly large changes to it, but i'd expect a more desc

Re: __Classes and type tests

2005-10-09 Thread Brian van den Broek
Fredrik Lundh said unto the world upon 2005-10-09 17:49: > Brian van den Broek wrote: > > >>But the academic issue "How/Can it be done?" still itches. > > > class __TwoUnderBase(object): > def __init__(self): > if self.__class__.__name__ == "__TwoUnderBase": > prin

Re: Jargons of Info Tech industry

2005-10-09 Thread Mike Meyer
Tim Tyler <[EMAIL PROTECTED]> writes: > In comp.lang.java.programmer Mike Meyer <[EMAIL PROTECTED]> wrote or quoted: >> The technial problems have been solved for over a decade. NeXT shipped >> systems that used text/richtext, which has none of the problems that >> HTML has. The problems are *soci

Re: Python reliability

2005-10-09 Thread Jp Calderone
On Sun, 9 Oct 2005 23:00:04 +0300 (EEST), Ville Voipio <[EMAIL PROTECTED]> wrote: >I would need to make some high-reliability software >running on Linux in an embedded system. Performance >(or lack of it) is not an issue, reliability is. > >The piece of software is rather simple, probably a >few h

Re: non descriptive error

2005-10-09 Thread Timothy Smith
i have reproduced the error in this code block #save values in edit self.FinaliseTill.SaveEditControlValue() if Decimal(self.parent.TillDetails[self.TillSelection.GetStringSelection()]['ChangeTinBalance'])) == Decimal('0'): #box must be ch

Idle bytecode query on apparently unreachable returns

2005-10-09 Thread Tom Anderson
Evening all, Here's a brief chat with the interpretator: Python 2.4.1 (#2, Mar 31 2005, 00:05:10) [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> def fib(x): ... if (x == 1): ... return 1 ...

Re: Jargons of Info Tech industry

2005-10-09 Thread Mike Meyer
Tim Tyler <[EMAIL PROTECTED]> writes: > In comp.lang.java.programmer Mike Meyer <[EMAIL PROTECTED]> wrote or quoted: >> Roedy Green <[EMAIL PROTECTED]> writes: >> > Read my essay. >> > http://mindprod.com/projects.html/mailreadernewsreader.html >> > >> > I talk around those problems. >> >> Actuall

Re: Python reliability

2005-10-09 Thread George Sakkis
Steven D'Aprano wrote: > On Sun, 09 Oct 2005 23:00:04 +0300, Ville Voipio wrote: > > > I would need to make some high-reliability software > > running on Linux in an embedded system. Performance > > (or lack of it) is not an issue, reliability is. > > [snip] > > > The software should be running co

Re: non descriptive error

2005-10-09 Thread Timothy Smith
Timothy Smith wrote: >i have reproduced the error in this code block > >#save values in edit > self.FinaliseTill.SaveEditControlValue() > if >Decimal(self.parent.TillDetails[self.TillSelection.GetStringSelection()]['ChangeTinBalance'])) > >== Decimal('0'): >

Re: non descriptive error

2005-10-09 Thread jepler
On Mon, Oct 10, 2005 at 09:12:13AM +1000, Timothy Smith wrote: > FAYI i have already found it and it was a wrongly indented code block :/ When indentation leaves an illegal program structure, Python gives a very informative error message, such as File "/tmp/x.py", line 3 return 3

Re: Jargons of Info Tech industry

2005-10-09 Thread Mike Meyer
Roedy Green <[EMAIL PROTECTED]> writes: > Perhaps you could slow them down with some randomly chosen questions > to prove they know something about you. Companies could do the same > thing. Challenge-response system are old hat. I use one, and it reduces my spam by three orders of magnitude. Most

Re: Idle bytecode query on apparently unreachable returns

2005-10-09 Thread jepler
On Mon, Oct 10, 2005 at 12:20:13AM +0100, Tom Anderson wrote: > What puzzles me, though, are bytecodes 17, 39 and 42 - surely these aren't > reachable? Does the compiler just throw in a default 'return None' > epilogue, with routes there from every code path, even when it's not > needed? If so,

Re: non descriptive error

2005-10-09 Thread Timothy Smith
[EMAIL PROTECTED] wrote: >On Mon, Oct 10, 2005 at 09:12:13AM +1000, Timothy Smith wrote: > > >>FAYI i have already found it and it was a wrongly indented code block :/ >> >> > >When indentation leaves an illegal program structure, Python gives a very >informative error message, such as > >

Re: non descriptive error

2005-10-09 Thread Neil Hodgson
Timothy Smith: > FYI i have located where the problem was. in the first if statement > there was an unbalanced ). now since when does python not give a > descriptive error for that? I see this with the arrow pointing at the extra ')': >pythonw -u "xx.py" File "xx.py", line 3 if Decimal

Re: non descriptive error

2005-10-09 Thread Timothy Smith
Neil Hodgson wrote: >Timothy Smith: > > > >>FYI i have located where the problem was. in the first if statement >>there was an unbalanced ). now since when does python not give a >>descriptive error for that? >> >> > >I see this with the arrow pointing at the extra ')': > > >pythonw -u "xx.p

Re: non descriptive error

2005-10-09 Thread Ron Adam
Timothy Smith wrote: > i have reproduced the error in this code block > > #save values in edit > self.FinaliseTill.SaveEditControlValue() > if > Decimal(self.parent.TillDetails[self.TillSelection.GetStringSelection()]['ChangeTinBalance'])) > > == Decimal('0'): > #box

Re: Jargons of Info Tech industry

2005-10-09 Thread Mike Meyer
Roedy Green <[EMAIL PROTECTED]> writes: > On Sun, 09 Oct 2005 05:55:01 -0400, Mike Meyer <[EMAIL PROTECTED]> wrote > or quoted : >>Virus writers will love the ability to >>change peoples address books remotely. > Since this is just a broad brush view, I find it odd you can predict > just what bugs

Newbie Count Question

2005-10-09 Thread ProvoWallis
I have a newbie count question. I have a number of SGML documents divided into sections but over the course of editing them the some sections have been deleted (and perhaps others added). I'd like to renumber them. The input documents look like this: and after renumbering I would li

Re: searching a project to contribute to

2005-10-09 Thread Mike Meyer
"Clint Norton" <[EMAIL PROTECTED]> writes: > Hi all, > I'm a student currently in the beginning of my master's degree and > I'm searching for an interesting open source project written in Python > to contribute to. > I have worked as a programmer for the past few years (mostly in > academia

Re: is there any Python code for spatial tessellation?

2005-10-09 Thread Shi Mu
is there any course website about teaching python? for instance, some computer science courses website? On 10/8/05, Shi Mu <[EMAIL PROTECTED]> wrote: > is there any Python code for spatial tessellation? > thanks a lot! -- http://mail.python.org/mailman/listinfo/python-list

Re: searching a project to contribute to

2005-10-09 Thread Clint Norton
Well, I though about it but I'm looking for something a little more interesting then bug fixing... Anyway, wouldn't it be to difficult to get into a huge project like python itself? Wouldn't it be a better idea to walk into a project that only have a few developers in it? I was thinking of

Re: searching a project to contribute to

2005-10-09 Thread Peter Decker
On 9 Oct 2005 18:16:32 -0700, Clint Norton <[EMAIL PROTECTED]> wrote: > Well, > I though about it but I'm looking for something a little more > interesting then bug fixing... > Anyway, wouldn't it be to difficult to get into a huge project like > python itself? Wouldn't it be a better idea to w

Re: Idle bytecode query on apparently unreachable returns

2005-10-09 Thread Neal Norwitz
Tom Anderson wrote: > Evening all, > > Here's a brief chat with the interpretator: [snip] > What puzzles me, though, are bytecodes 17, 39 and 42 - surely these aren't > reachable? Does the compiler just throw in a default 'return None' > epilogue, with routes there from every code path, even when

Re: Python's Performance

2005-10-09 Thread Ron Adam
Steven D'Aprano wrote: > For what it is worth, Python is compiled AND interpreted -- it compiles > byte-code which is interpreted in a virtual machine. That makes it an > compiling interpreter, or maybe an interpreting compiler, in my book. Good points, and in addition to this, the individual byt

Re: searching a project to contribute to

2005-10-09 Thread Mike Meyer
"Clint Norton" <[EMAIL PROTECTED]> writes: > Well, > I though about it but I'm looking for something a little more > interesting then bug fixing... Bug fixing is an easy way to start learning the code and providing an immediate contribution to the project. As for interesting - you gotta pick

Re: Python reliability

2005-10-09 Thread Neal Norwitz
Ville Voipio wrote: > > The software should be running continously for > practically forever (at least a year without a reboot). > Is the Python interpreter (on Linux) stable and > leak-free enough to achieve this? Jp gave you the answer that he has done this. I've spent quite a bit of time since

Re: Python reliability

2005-10-09 Thread Steven D'Aprano
George Sakkis wrote: > Steven D'Aprano wrote: > > >>On Sun, 09 Oct 2005 23:00:04 +0300, Ville Voipio wrote: >> >> >>>I would need to make some high-reliability software >>>running on Linux in an embedded system. Performance >>>(or lack of it) is not an issue, reliability is. >> >>[snip] >> >> >>

Re: Newbie Count Question

2005-10-09 Thread George Sakkis
"ProvoWallis" wrote: > I've managed to get this far thanks to looking at other > posts on the board but no matter waht I try all of the > sections end up being numbered for the total number of > sections in the document. e.g., if there are 100 sections > in the document the "no" attribute is "1.10

Re: Python reliability

2005-10-09 Thread Jp Calderone
On Mon, 10 Oct 2005 12:18:42 +1000, Steven D'Aprano <[EMAIL PROTECTED]> wrote: >George Sakkis wrote: > >> Steven D'Aprano wrote: >> >> >>>On Sun, 09 Oct 2005 23:00:04 +0300, Ville Voipio wrote: >>> >>> I would need to make some high-reliability software running on Linux in an embedded syste

Re: Creating internet shortcuts

2005-10-09 Thread Roger Upole
Pythoncom doesn't directly support the necessary interfaces, but you can use the Shell COM interfaces to create them. import win32com.client wsh=win32com.client.gencache.EnsureDispatch('wscript.shell') s=wsh.CreateShortcut('c:\\python.url') s.TargetPath='www.python.org' s.Save() hth Roger

best Pythonic way to do this sort: Python newb

2005-10-09 Thread Sean Berry
Hello all I have build a list that contains data in the form below -- simplified for question -- myList = [[value1, value2, value3],[value1, value2, value3], ...] I have a function which takes value3 from the lists above and returns another value. I want to use this returned value to sort the li

Re: Jargons of Info Tech industry

2005-10-09 Thread John Bokma
Roedy Green <[EMAIL PROTECTED]> wrote: > On 8 Oct 2005 23:39:27 GMT, John Bokma <[EMAIL PROTECTED]> wrote or > quoted : > >>Yeah, yeah, and 640K is enough for everybody. Same song, different tune. > > For how long. Surely attachments are a stop gap. Can you imagine > people sharing images that

Re: best Pythonic way to do this sort: Python newb

2005-10-09 Thread Paul Rubin
"Sean Berry" <[EMAIL PROTECTED]> writes: > myList = [[value1, value2, value3],[value1, value2, value3], ...] > > I have a function which takes value3 from the lists above and returns > another value. I want to use this returned value to sort the lists. > > So, my resultant list would be ordered

Python on the Power PC

2005-10-09 Thread Peter Milliken
Hi, I (think I have :-)) installed Python on my Pocket PC (obtained from http://fore.validus.com/~kashtan/). There were Tkinter binaries with it so I installed those as well. When I attempt to run the most simplistic of python programs using Tkinter, I get an error message stating that Python can

Unlimited Free Music Downloads WOW! 100% Legal

2005-10-09 Thread Free Music
Download Unlimited Free Music, Movies, Games, Software & Much More 100% Safe & Legal Click Here! -- http://mail.python.org/mailman/listinfo/python-list

Re: best Pythonic way to do this sort: Python newb

2005-10-09 Thread Sean Berry
"Paul Rubin" wrote in message news:[EMAIL PROTECTED] > "Sean Berry" <[EMAIL PROTECTED]> writes: >> myList = [[value1, value2, value3],[value1, value2, value3], ...] >> >> I have a function which takes value3 from the lists above and returns >> another value. I want to

python and MySQL - 3 questions

2005-10-09 Thread el chupacabra
I'm using mysqldb module and python 2.4. I'm a newbie. Thanks in advance. 1. Output desired: "hello" "world" I know that MySQL takes \n and \t and what not. But my python script, it takes that \n as literal. Meaning, when I retrieve the records, they show up like "hello \n world". How can

Re: non descriptive error

2005-10-09 Thread Robert Kern
Timothy Smith wrote: > it is definately a bug in 2.3 when using the decimal module. i can > reproduce it. > > from decimal import Decimal > a = Decimal('0' > > and when you attempt to run it you will get "error" > > of course i do understand that decimal wasn't part of 2.3, but atleast > now

The missing ingredient?

2005-10-09 Thread [EMAIL PROTECTED]
Python is a great programming language, and it seems there was a sense of fun in developing it -- as far as I can ascertain, it wasn't exactly brought to life to comply with Government tax regulations; or to assist a consigliere with covering up ghastly mob crimes ala "Godfather". Though there is

line

2005-10-09 Thread Shi Mu
There are four points with coordinates: 2,3;4,9;1,6;3,10. How to use Python to draw one perpendicular bisector between (2,3) and (4,9); the other perpendicular bisector between (1,6)和(3,10); then, makes the output like: l1 a b c l2 a b c (Note: l indicates the perpendicular bisector with equation a

Re: best Pythonic way to do this sort: Python newb

2005-10-09 Thread Satchidanand Haridas
Satchidanand Haridas (sharidas at zeomega dot com) ZeOmega (www.zeomega.com) Open Minds' Open Solutions Sean Berry wrote: >"Paul Rubin" wrote in message >news:[EMAIL PROTECTED] > > >>"Sean Berry" <[EMAIL PROTECTED]> writes: >> >> >>>myList = [[value1, v

Re: best Pythonic way to do this sort: Python newb

2005-10-09 Thread Paul Rubin
"Sean Berry" <[EMAIL PROTECTED]> writes: > > def get_key(x): return x[2] > > sorted_list = sorted(myList, key=get_key) > > Sorry if I am missing something. But. what is sorted here? sorted is a built-in function that sorts the thing that you pass it. It just appeared in Python 2.4, I think. Wit

Re: best Pythonic way to do this sort: Python newb

2005-10-09 Thread Brett Hoerner
(sorted is a built-in function in 2.4) def myFunction( data ): """ Take one of your set of 3, grab [2] (the 3rd) and do calcs, return value """ "do some math calculations to data[2]" return "result of calculations" sorted_list = sorted(myList, key=myFunction) List is sorted in the or

Re: searching a project to contribute to

2005-10-09 Thread Clint Norton
Well, I meant python modules offcourse ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Merging sorted lists/iterators/generators into one stream of values...

2005-10-09 Thread Alex Martelli
George Sakkis <[EMAIL PROTECTED]> wrote: ... > > manipulation of a heap to place an item in the right spot, but with 4-5 > > or a few more sources might not make an impact at all. > > Unless you're talking about hundreds or thousands sources, it probably > won't. I would still go for the heap s

Python Programmer Urgently Required

2005-10-09 Thread Kedar Dash
Job Description: The position holder will supplement the existing pool of application development and programming pool of OWSA technical team. In particular S/he will be responsible for developing Python based overlay application – to be mounted on existing software tools and solutions. The positi

Re: searching a project to contribute to

2005-10-09 Thread Robert Kern
Clint Norton wrote: > Hi all, > I'm a student currently in the beginning of my master's degree and > I'm searching for an interesting open source project written in Python > to contribute to. > I have worked as a programmer for the past few years (mostly in > academia but also as a typical

Pythot doc problem: lambda keyword...

2005-10-09 Thread Xah Lee
i'm trying to lookup on the detail of language Python's “lambda” function feature. I've seen it before, but today i need to read about it again since i'm writing. I quickly went to the index page: http://python.org/doc/2.4.1/lib/genindex.html but all i got is a LambdaType. i'm thinking, maybe buil

Re: non descriptive error

2005-10-09 Thread Fredrik Lundh
Timothy Smith wrote: > i have reproduced the error in this code block > > #save values in edit > self.FinaliseTill.SaveEditControlValue() > if > Decimal(self.parent.TillDetails[self.TillSelection.GetStringSelection()]['ChangeTinBalance'])) > == Decimal('0'): > #box must be checked before continuing

Re: non descriptive error

2005-10-09 Thread Fredrik Lundh
Timothy Smith wrote: > it is definately a bug in 2.3 when using the decimal module. i can > reproduce it. > > from decimal import Decimal > a = Decimal('0' > > and when you attempt to run it you will get "error" $ python script.py File "script.py", line 3 ^ SyntaxError: inva

<    1   2