Re: Introducing Python to others

2009-04-02 Thread David C. Ullrich
In article mailman.3007.1238515574.11746.python-l...@python.org, andrew cooke and...@acooke.org wrote: David C. Ullrich wrote: In article tm6dnzxrviq0qfbunz2dnuvz_rmdn...@pdx.net, Scott David Daniels scott.dani...@acm.org wrote: [...] class Vector(list): def

RE: Introducing Python to others

2009-04-02 Thread Sells, Fred
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()

Re: Introducing Python to others

2009-04-02 Thread Rhodri James
On Thu, 02 Apr 2009 17:02:30 +0100, David C. Ullrich dullr...@sprynet.com wrote: Sometime I gotta get around to actually learning this 2.x stuff. Thought I had an idea how 1.x worked... 3.x may come as a bit of a surprise :-) -- Rhodri James *-* Wildebeeste Herder to the Masses --

Re: Introducing Python to others

2009-03-31 Thread David C. Ullrich
In article 039360fb-a29c-4f43-b6e0-ba97fb598...@z23g2000prd.googlegroups.com, Mensanator mensana...@aol.com wrote: On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote: David C. Ullrich wrote: In article mailman.2701.1238060157.11746.python-l...@python.org,  Paddy O'Loughlin

Re: Introducing Python to others

2009-03-31 Thread David C. Ullrich
In article tm6dnzxrviq0qfbunz2dnuvz_rmdn...@pdx.net, Scott David Daniels scott.dani...@acm.org wrote: Mensanator wrote: On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote: ... that's cute, but if you show them 2.6 or 3 it's even cuter: from operator import add class

Re: Introducing Python to others

2009-03-31 Thread andrew cooke
David C. Ullrich wrote: In article tm6dnzxrviq0qfbunz2dnuvz_rmdn...@pdx.net, Scott David Daniels scott.dani...@acm.org wrote: Mensanator wrote: On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote: ... that's cute, but if you show them 2.6 or 3 it's even cuter: from operator

Re: Introducing Python to others

2009-03-29 Thread BackSeat
On Mar 26, 10:35 am, Paddy O'Loughlin patrick.olough...@gmail.com wrote: If I were to do a (very) short demonstration one web framework for the PHP devs, what should I use? No question: use web2py. See the website and the videos that demonstrate it. You could build a reasonably substantial

Re: Introducing Python to others

2009-03-28 Thread Beni Cherniavsky
Small additions: On Mar 26, 7:35 pm, J. Cliff Dyer j...@sdf.lonestar.org wrote: 2) Aliasing imports is also cool.  Show people how easy it is to switch from import MySQLdb as db to import psycopg2 as db and have all your dbapi2 code still work.  Or from from StringIO import StringIO

Re: Introducing Python to others

2009-03-26 Thread *nixtechno
On Mar 26, 2:35 am, Paddy O'Loughlin patrick.olough...@gmail.com wrote: 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

Re: Introducing Python to others

2009-03-26 Thread Hendrik van Rooyen
Paddy O'Loughlin patrick.olough...@gmail.com wrote: Any other suggestions for a possible wow reaction from an audience like that? two simple demos: The first one is a simple client server thingy on the LAN. I have seen hardened people do a double take when they see how little code it takes to

Re: Introducing Python to others

2009-03-26 Thread Jeremiah Dodds
On Thu, Mar 26, 2009 at 9:35 AM, Paddy O'Loughlin patrick.olough...@gmail.com wrote: 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

Re: Introducing Python to others

2009-03-26 Thread Bruno Desthuilliers
Paddy O'Loughlin a écrit : (snip) Anything else you think could make PHP developers starting think that python is a better choice? The debugger ?-) (debugging PHP code is kind of nightmare). If I were to do a (very) short demonstration one web framework for the PHP devs, what should I use?

Re: Introducing Python to others

2009-03-26 Thread Marco Mariani
Paddy O'Loughlin wrote: 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.). Show them the same classical design patterns in Java and Python. Explain how it's much more flexible.

Re: Introducing Python to others

2009-03-26 Thread python
Paddy, I've tried to categorize some ideas for your presentation. Note that the ideas within each category are ordered by my random stream of conscience vs. prioritized in some logical order. Good luck with your presentation! (BTW: It would be great if you could share your final outline with

Re: Introducing Python to others

2009-03-26 Thread Scott David Daniels
Hendrik van Rooyen wrote: Paddy O'Loughlin patrick.olough...@gmail.com wrote: Any other suggestions for a possible wow reaction from an audience like that? two simple demos: The first one is a simple client server thingy on the LAN. I have seen hardened people do a double take when they see

Re: Introducing Python to others

2009-03-26 Thread David C. Ullrich
In article mailman.2701.1238060157.11746.python-l...@python.org, Paddy O'Loughlin patrick.olough...@gmail.com wrote: Here's my favorite thing about Python (you'd of course remark that it's just a toy example, doing everything in as dumb but easily understood way as possible): x=[1,2] print x+x

Re: Introducing Python to others

2009-03-26 Thread J. Cliff Dyer
On Thu, 2009-03-26 at 09:35 +, Paddy O'Loughlin wrote: 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.

Re: Introducing Python to others

2009-03-26 Thread andrew cooke
David C. Ullrich wrote: In article mailman.2701.1238060157.11746.python-l...@python.org, Paddy O'Loughlin patrick.olough...@gmail.com wrote: Here's my favorite thing about Python (you'd of course remark that it's just a toy example, doing everything in as dumb but easily understood way as

Re: Introducing Python to others

2009-03-26 Thread Mensanator
On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote: David C. Ullrich wrote: In article mailman.2701.1238060157.11746.python-l...@python.org,  Paddy O'Loughlin patrick.olough...@gmail.com wrote: Here's my favorite thing about Python (you'd of course remark that it's just a toy

Re: Introducing Python to others

2009-03-26 Thread mmanns
On Thu, 26 Mar 2009 12:42:01 -0400 (CLT) andrew cooke and...@acooke.org wrote: that's cute, but if you show them 2.6 or 3 it's even cuter: from operator import add class Vector(list): ... def __add__(self, other): ... return map(add, self, other) ... x = Vector([1,2]) x+x [2,

Re: Introducing Python to others

2009-03-26 Thread Peter Otten
Mensanator wrote: On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote: David C. Ullrich wrote: In article mailman.2701.1238060157.11746.python-l...@python.org, Paddy O'Loughlin patrick.olough...@gmail.com wrote: Here's my favorite thing about Python (you'd of course remark that

Re: Introducing Python to others

2009-03-26 Thread Paddy O'Loughlin
Thanks for all your replies. A lot of very strong answers :) 2009/3/26 Mensanator mensana...@aol.com: What would you have to do to make this work? x+x+x      # expecting [3,6] [2, 4, 1, 2] What's happening is that the call to map() is returning a list object. So after it calculates the first

Re: Introducing Python to others

2009-03-26 Thread Irmen de Jong
Apart from the other suggestions that have been made already, it could be very wow-provoking if you have a nice example using ctypes to interface to existing c libraries. Python shines as a glue language too :-) --irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: Introducing Python to others

2009-03-26 Thread Scott David Daniels
Mensanator wrote: On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote: ... that's cute, but if you show them 2.6 or 3 it's even cuter: from operator import add class Vector(list): ... def __add__(self, other): ... return map(add, self, other) ... x = Vector([1,2]) x+x [2, 4]

Re: Introducing Python to others

2009-03-26 Thread Jervis Whitley
class Vector(list): ...   def __add__(self, other): ...     return map(add, self, other) ... x = Vector([1,2]) I've used the complex type for a similar problem (2D Cartesian points) in the past, I saw the suggestion once on the pygame list. x = complex(1,2) x + x (2 + 4j)

Re: Introducing Python to others

2009-03-26 Thread Mensanator
On Mar 26, 4:32 pm, Jervis Whitley jervi...@gmail.com wrote: class Vector(list): ...   def __add__(self, other): ...     return map(add, self, other) ... x = Vector([1,2]) I've used the complex type for a similar problem (2D Cartesian points) in the past, I saw the suggestion once on

Re: Introducing Python to others

2009-03-26 Thread Rhodri James
On Thu, 26 Mar 2009 09:35:55 -, Paddy O'Loughlin patrick.olough...@gmail.com wrote: 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

RE: Introducing Python to others

2009-03-26 Thread Delaney, Timothy (Tim)
Rhodri James wrote: On Thu, 26 Mar 2009 09:35:55 -, Paddy O'Loughlin patrick.olough...@gmail.com wrote: 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

Re: Introducing Python to others

2009-03-26 Thread André
On Mar 26, 6:35 am, Paddy O'Loughlin patrick.olough...@gmail.com wrote: 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