Re: Introducing Python to others

2009-04-02 Thread Rhodri James
On Thu, 02 Apr 2009 17:02:30 +0100, David C. Ullrich 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 -- http://mail.python.org/mailma

RE: Introducing Python to others

2009-04-02 Thread Sells, Fred
; To: python-list@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

Re: Introducing Python to others

2009-04-02 Thread David C. Ullrich
In article , "andrew cooke" wrote: > David C. Ullrich wrote: > > In article , > > Scott David Daniels wrote: [...] > >> > >> class Vector(list): > >> def __add__(self, other): > >> return type(self)(x + y for x, y in zip(self, other)) > > > > Question: I would have t

Re: Introducing Python to others

2009-03-31 Thread andrew cooke
David C. Ullrich wrote: > In article , > Scott David Daniels wrote: > >> Mensanator wrote: >> > On Mar 26, 11:42 am, "andrew cooke" wrote: >> >> ... >> >> that's cute, but if you show them 2.6 or 3 it's even cuter: >> >> >> > from operator import add >> > class Vector(list): >> >> ...

Re: Introducing Python to others

2009-03-31 Thread David C. Ullrich
In article , Scott David Daniels wrote: > Mensanator wrote: > > On Mar 26, 11:42 am, "andrew cooke" 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): > >> ...

Re: Introducing Python to others

2009-03-31 Thread David C. Ullrich
In article <039360fb-a29c-4f43-b6e0-ba97fb598...@z23g2000prd.googlegroups.com>, Mensanator wrote: > On Mar 26, 11:42 am, "andrew cooke" wrote: > > David C. Ullrich wrote: > > > In article , > > >  "Paddy O'Loughlin" wrote: > > > > > Here's my favorite thing about Python (you'd of course > > >

Re: Introducing Python to others

2009-03-29 Thread BackSeat
On Mar 26, 10:35 am, "Paddy O'Loughlin" 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 application in 2-3 minutes

Re: Introducing Python to others

2009-03-28 Thread Beni Cherniavsky
Small additions: On Mar 26, 7:35 pm, "J. Cliff Dyer" 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 André
On Mar 26, 6:35 am, "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. > > Ther

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 > 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 Rhodri James
On Thu, 26 Mar 2009 09:35:55 -, Paddy O'Loughlin 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 could think of. Once you've sh

Re: Introducing Python to others

2009-03-26 Thread Mensanator
On Mar 26, 4:32 pm, Jervis Whitley 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 >

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) >

Re: Introducing Python to others

2009-03-26 Thread Scott David Daniels
Mensanator wrote: On Mar 26, 11:42 am, "andrew cooke" 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] What would yo

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 Paddy O'Loughlin
Thanks for all your replies. A lot of very strong answers :) 2009/3/26 Mensanator : > 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 "x+x", you

Re: Introducing Python to others

2009-03-26 Thread Peter Otten
Mensanator wrote: > On Mar 26, 11:42 am, "andrew cooke" wrote: >> David C. Ullrich wrote: >> > In article , >> > "Paddy O'Loughlin" 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 understo

Re: Introducing Python to others

2009-03-26 Thread mmanns
On Thu, 26 Mar 2009 12:42:01 -0400 (CLT) "andrew cooke" 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

Re: Introducing Python to others

2009-03-26 Thread Mensanator
On Mar 26, 11:42 am, "andrew cooke" wrote: > David C. Ullrich wrote: > > In article , > >  "Paddy O'Loughlin" 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): > > >

Re: Introducing Python to others

2009-03-26 Thread andrew cooke
David C. Ullrich wrote: > In article , > "Paddy O'Loughlin" 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 > > class Vector(): > def __init__

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

Re: Introducing Python to others

2009-03-26 Thread David C. Ullrich
In article , "Paddy O'Loughlin" 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 class Vector(): def __init__(self, data): self.data = data def __rep

Re: Introducing Python to others

2009-03-26 Thread Scott David Daniels
Hendrik van Rooyen wrote: "Paddy O'Loughlin" 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 t

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 th

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 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? Ch

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

Re: Introducing Python to others

2009-03-26 Thread Hendrik van Rooyen
"Paddy O'Loughlin" 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 set up a server and a c

Re: Introducing Python to others

2009-03-26 Thread *nixtechno
On Mar 26, 2:35 am, "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. > > Ther

Introducing Python to others

2009-03-26 Thread Paddy O'Loughlin
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