Introducing Python to others

Sells, Fred fred.sells at adventistcare.org
Thu Apr 2 13:07:11 EDT 2009


When doing the same thing, I like....
Using a dictionary to return a function or a class definition based on a
msg id and let that returned value "handle" the message that contained
the id.  Something like
Class XYZ:
	...

MyHandlers = {42:XYZ, ...

Message = read_from_somewhere_else()
HandlerDefn = MyHandlers[Message.id]
Handler = HandlerDefn(Message)
Handler.processMessage()

As opposed to a switch statement in other languages.

I get my fellow codes to install Eclipse+PyDev as I find it easier to
comprehend that IDLE.  It's nice to just hit F9; although ^c^c is cool
for emacs folks.

I prefer turbogears over Django because it is simpler (and thus less
robust) but it sure is cool to edit your server side code, save it and
watch the server reload it automatically.  Of couse I hate HTML and use
Flex for the client side and turbogears JSON or my own XML converter
make Flex a joy.
Good luck
Fred.

> -----Original Message-----
> From: python-list-bounces+frsells=adventistcare.org at python.org
> [mailto:python-list-bounces+frsells=adventistcare.org at python.org] On
> Behalf Of Paddy O'Loughlin
> Sent: Thursday, March 26, 2009 5:36 AM
> To: python-list at python.org
> Subject: Introducing Python to others
> 
> Hi,
> As our resident python advocate, I've been asked by my team leader to
> give a bit of a presentation as an introduction to python to the rest
> of our department.
> It'll be less than an hour, with time for taking questions at the end.
> 
> There's not going to be a whole lot of structure to it. First, I'm
> going to open up a python terminal and show them how the interpreter
> works and a few basic syntax things and then a file .py files (got to
> show them that python's indenting structure is not something to be
> afraid of :P). I think I'll mostly show things in the order that they
> appear in the python tutorial (http://docs.python.org/tutorial/).
> 
> My question to you, dear python-list, is what suggestions do you have
> for aspects of python that I should show them to make them maybe think
> that python is better than what they are using at the moment.
> All of the audience will be experienced (4+ years) programmers, almost
> all of them are PHP developers (2 others, plus myself, work in C, know
> C#, perl, java, etc.).
> Because of this, I was thinking of making sure I included exceptions
> and handling, the richness of the python library and a pointing out
> how many modules there were out there to do almost anything one could
> think of.
> Anything else you think could make PHP developers starting think that
> python is a better choice?
> If I were to do a (very) short demonstration one web framework for the
> PHP devs, what should I use? CherryPy (seems to be the easiest),
> Django (seems to be the "biggest"/most used), or something else?
> 
> Any other suggestions for a possible "wow" reaction from an audience
like
> that?
> 
> Thanks,
> Paddy
> 
> --
> "Ray, when someone asks you if you're a god, you say YES!"
> --
> http://mail.python.org/mailman/listinfo/python-list
---[Notification]--------------------------------------------------------------------
The information contained in this message may be privileged and / or
confidential and protected from disclosure. If the reader of this message is
not the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the sender
immediately by replying to this message and deleting the material from any
computer.
--------------------------------------------------------------------------------------




More information about the Python-list mailing list