Re: [Tutor] Fw: turbo gears

2008-06-05 Thread Patrick Mullen
Yeah, I like turbogears as well. I was using cherrypy before turbogears borrowed it, and have a hard time remembering that turbogears has more than just cherrypy (pretty much just use cherrypy still, even though it's called tg). It's a bit weird with TG2 now moving to pylons - which is not cherry

[Tutor] Error-handling for a large modular program

2008-06-05 Thread Shrutarshi Basu
I'm currently working on a research project where we'll be developing a moderately complex piece of software. We're designing with extensibility in mind. One of the problems I can see right now is that our program can potentially create a large number of very different errors, some fatal, some not.

Re: [Tutor] Have Python Update Forms

2008-06-05 Thread Kent Johnson
On Thu, Jun 5, 2008 at 1:56 PM, James <[EMAIL PROTECTED]> wrote: > I want to write a program that will update the 'last updated' field on > *every* item. This will require some sort of 'post' to the web server > and interaction with the existing web tools and its back-end. I can > probably whip up

Re: [Tutor] __del__ exception

2008-06-05 Thread Alan Gauld
"Blaise Morose" <[EMAIL PROTECTED]> wrote I have this silly piece of code that I am experimenting with: I'm not certain but... based on this quote from the Python docs: -- Warning: Due to the precarious circumstances under which __del__() methods are invoked, exceptions that occur during

Re: [Tutor] __del__ exception

2008-06-05 Thread Michael Langford
There is no remaining referent to your class at the point when the last instance has started to be deleted. This allows the class itself to be garbage collected. Changing the code to the following will prevent this. #!/usr/bin/python class Person: population = 0 def __init__(self

Re: [Tutor] __del__ exception

2008-06-05 Thread wesley chun
> class Person: > population = 0 > > def __init__(self, name): > self.name = name > print '%s has been added' %self.name > Person.population += 1 > > def __del__(self): > print '%s is leaving' % self.name >

Re: [Tutor] Have Python Update Forms

2008-06-05 Thread Alan Gauld
"James" <[EMAIL PROTECTED]> wrote I want to write a program that will update the 'last updated' field on *every* item. This will require some sort of 'post' to the web server Have you considered doing it in JavaScript on the client. You could esily do this in the onSubmit handler function. T

[Tutor] __del__ exception

2008-06-05 Thread Blaise Morose
Hi, I have this silly piece of code that I am experimenting with: #!/usr/bin/python class Person: population = 0 def __init__(self, name): self.name = name print '%s has been added' %self.name Person.population += 1 def _

Re: [Tutor] Grabbing data from changing website

2008-06-05 Thread Tony Cappellini
-- > > Message: 4 > Date: Wed, 4 Jun 2008 10:00:46 -0400 > From: James <[EMAIL PROTECTED]> > Subject: [Tutor] Grabbing data from changing website > To: tutor@python.org > Message-ID: ><[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1 > > > >>urll

[Tutor] Have Python Update Forms

2008-06-05 Thread James
All, I'm helping a buddy write a program and could use a few pointers. :) I know this is a bit 'off-topic,' but hopefully someone can shed some light on how to go about doing this. First some background information: there's a web tool which keeps track of a 'to do' list. The to-do list has a data

Re: [Tutor] [Fwd: Re: Intercepting methods calls]

2008-06-05 Thread Andreas Kostyrka
On Thursday 05 June 2008 00:18:55 Marilyn Davis wrote: > > You listed __init__ and I'm not sure I know what you mean. > Well, __init__ can assign attributes to the instance that are callable. Andreas signature.asc Description: This is a digitally signed message part. ___

Re: [Tutor] Stackless Python and CPython code compatibility

2008-06-05 Thread Alan Gauld
"OkaMthembo" <[EMAIL PROTECTED]> wrote Could someone please explain whether or not using Stackless Python with CPython affects compatibility across code versions? e.g. if one wanted Stackless for web development, would Cheetah, Django, Zope, Plone et al play nicely with it? I've never tried

Re: [Tutor] tutor list equivalent for lisp?

2008-06-05 Thread Danny Yoo
But i only play with Lisp these days so am well out of date. The best Lisp tutorial IMHO is the How To Design Programs web site/book (htdp.org?) Yes, HTDP is one of the very good ones. I'd strongly recommend it. As a full disclosure thing: I'm involved with the folks doing HTDP: I'm not a n

Re: [Tutor] TypeError: argument 1 must be string or read-only character buffer, not instance

2008-06-05 Thread Kent Johnson
On Thu, Jun 5, 2008 at 8:06 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: import os from BeautifulSoup import BeautifulSoup file = '/home/david/test/stack.html' html = open(file, 'r') soup = BeautifulSoup(html) table = soup.find('table', {'class': 'order_tbl'}) >>>

[Tutor] Stackless Python and CPython code compatibility

2008-06-05 Thread OkaMthembo
Hi guys, Could someone please explain whether or not using Stackless Python with CPython affects compatibility across code versions? e.g. if one wanted Stackless for web development, would Cheetah, Django, Zope, Plone et al play nicely with it? Regards, -- Lloyd Dube ___

Re: [Tutor] Python in symbian (NOKIA E50)

2008-06-05 Thread Evans Anyokwu
See this is of any help! http://www.devshed.com/c/a/Python/Bluetooth-Programming-using-Python/ Evans http://www.javawug.org On Thu, Jun 5, 2008 at 3:45 PM, Ricardo Dueñas Parada <[EMAIL PROTECTED]> wrote: > Hi all, > > I want to write an script to send messages from my phone (Nokia E50) to my >

[Tutor] Python in symbian (NOKIA E50)

2008-06-05 Thread Ricardo Dueñas Parada
Hi all, I want to write an script to send messages from my phone (Nokia E50) to my computer via bluetooth, i'm kind of new in bluetooth applications in phones, so, can you recommend some document, web page, script, something to start? Thanks, _Ricardo

[Tutor] TypeError: argument 1 must be string or read-only character buffer, not instance

2008-06-05 Thread [EMAIL PROTECTED]
Hello, I am still fighting with parsing out the html text and this is what I have so far, but seems I keep hitting my head against a barrier. >>> import os >>> from BeautifulSoup import BeautifulSoup >>> file = '/home/david/test/stack.html' >>> html = open(file, 'r') >>> soup = BeautifulSoup(html

Re: [Tutor] Intercepting methods calls

2008-06-05 Thread Andreas Kostyrka
On Thursday 05 June 2008 12:31:56 you wrote: > On Jun 5, 2008, at 6:06 PM, Andreas Kostyrka wrote: > > well, don't return a string :-P > > > > class CallableString(str): > > def __call__(self, *args, **kw): > > return self > > > > And now instead of return '', write return CallableString('')

Re: [Tutor] Intercepting methods calls

2008-06-05 Thread Andreas Kostyrka
On Wednesday 04 June 2008 18:18:04 you wrote: > > Well, let's start the ball rolling then. > > > > __getattribute__ > > __getattr__ > > Metaclasses > > decorators > > properties > > __init__ > > Okay, I'll bite. I asked here a week or two ago about creating a > custom dummy object that returns a bl

Re: [Tutor] tutor list equivalent for lisp?

2008-06-05 Thread Alan Gauld
<[EMAIL PROTECTED]> wrote Well, my desire to extend emacs has made me want to get more serious about it. The emacs community is pretty good for supporting elispers but I don't know of any tutor style lists. ( So far as I know this list is fairly unique! There is something like it for PHP b

[Tutor] OT: tutor list equivalent for lisp?

2008-06-05 Thread broek
Hi all, I've an off-topic query; hope no one minds. I've poked into the lisp world a bit before (started SICP, etc., but never used it in anger), and put it on my `when I've more time' shelf. Well, my desire to extend emacs has made me want to get more serious about it. Does anyone kno

[Tutor] Fw: turbo gears

2008-06-05 Thread ALAN GAULD
It wasn't me asked the question so I've forwarded the message to the tutor list. Please use ReplyAll when responding. - Forwarded Message From: Laureano Arcanio <[EMAIL PROTECTED]> To: Alan Gauld <[EMAIL PROTECTED]> Sent: Thursday, 5 June, 2008 5:07:49 AM Subject: Re: [Tutor] turbo gear