Re: Tutorial on working with Excel files in Python (without COM and crossplatform!) at EuroPython 2009

2009-06-23 Thread Chris Withers
Jeremiah Jester wrote: Chris, Do you have any online tutorial for this topic? I'm afraid not currently... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk -- http://mail.python.org/mailman/listinfo/python-list

Re: Tutorial on working with Excel files in Python (without COM and crossplatform!) at EuroPython 2009

2009-06-19 Thread Jeremiah Jester
Chris, Do you have any online tutorial for this topic? Thanks, JJ On Thu, 2009-06-18 at 08:38 -0700, Chris Withers wrote: > Hi All, > > Too many people in the Python community *still* think the only way to > work with Excel files in Python is using COM on Windows. > > To try and correct this, I

Re: Tutorial on working with Excel files in Python (without COM and cross platform!) at EuroPython 2009

2009-06-19 Thread Piet van Oostrum
> John Machin (JM) wrote: >JM> [1] No kidding: http://www.google.com/patents/about?id=QMwnEBAJ Apart from these patents probably being silly, why don't they just write the code in Python? :=) -- Piet van Oostrum URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Private email: p...@

Re: Tutorial on working with Excel files in Python (without COM and cross platform!) at EuroPython 2009

2009-06-18 Thread John Machin
Mike Driscoll gmail.com> writes: > On Jun 18, 10:38 am, Chris Withers wrote: > > working with Excel files in Python using the pure-python libraries xlrd, > > xlwt and xlutils. > As I recall, these utilities don't allow the programmer to access > Excel's formulas. Is that still an issue? xlwt

Re: Tutorial on working with Excel files in Python (without COM and cross platform!) at EuroPython 2009

2009-06-18 Thread Mike Driscoll
On Jun 18, 10:38 am, Chris Withers wrote: > Hi All, > > Too many people in the Python community *still* think the only way to > work with Excel files in Python is using COM on Windows. > > To try and correct this, I'm giving a tutorial at this year's EuroPython > conference in Birmingham, UK on Mo

Re: Tutorial or example use for python-graph library

2009-05-11 Thread Paul Moore
On May 8, 3:19 pm, "(e.g. emre)" wrote: > you might want to check networkx as well, it is considerably well > documented:http://networkx.lanl.gov/ Interesting, I hadn't seen that before. I'll certainly check it out! Thanks, Paul -- http://mail.python.org/mailman/listinfo/python-list

Re: Tutorial or example use for python-graph library

2009-05-11 Thread Paul Moore
On May 8, 4:03 pm, Scott David Daniels wrote: > Paul Moore wrote: > > I have just discovered the python-graph library. I've been interested > > in graph algorithms for a long time, so I'd like to give this a try. > > But there seems to be very little in the way of examples, or tutorial > > documen

Re: Tutorial or example use for python-graph library

2009-05-08 Thread Scott David Daniels
Paul Moore wrote: I have just discovered the python-graph library. I've been interested in graph algorithms for a long time, so I'd like to give this a try. But there seems to be very little in the way of examples, or tutorial documentation available. There's the API documentation, but that's not

Re: Tutorial or example use for python-graph library

2009-05-08 Thread (e.g. emre)
On May 8, 3:21 pm, Paul Moore wrote: > I have just discovered the python-graph library. I've been interested > in graph algorithms for a long time, so I'd like to give this a try. > But there seems to be very little in the way of examples, or tutorial > documentation available. There's the API do

Re: Tutorial on working with Excel files in Python (without COM and cross platform!) at PyConUS 2009

2009-01-31 Thread Glenn Linderman
On approximately 1/27/2009 5:19 PM, came the following characters from the keyboard of Chris Withers: Hi All, Too many people in the Python community think the only way to work with Excel files in Python is using COM on Windows. To try and correct this, I'm giving a tutorial at this year's PyCo

RE: tutorial on parser

2008-12-16 Thread Barak, Ron
Hi John, You may want to read http://nedbatchelder.com/text/python-parsers.html Bye, Ron. -Original Message- From: John Fabiani [mailto:jfabi...@yolo.com] Sent: Tuesday, December 16, 2008 08:47 To: python-list@python.org Subject: tutorial on parser Hi, I'm attempting to learn how to con

Re: Tutorial or Example (or Tutorial) of Using Canvas to Producea Plot

2007-09-20 Thread W. Watson
That's odd; however, it's likely close enough. Hendrik van Rooyen wrote: > "W. Watson" <[EMAIL PROTECTED]> wrote: > > >> I'm just trying to get some feel for how canvas works. I'm about to modify a >> program I use for meteor work. It uses canvas to display images, and I plan >> to draw on the

Re: Tutorial or Example (or Tutorial) of Using Canvas to Producea Plot

2007-09-20 Thread Hendrik van Rooyen
"W. Watson" <[EMAIL PROTECTED]> wrote: > I'm just trying to get some feel for how canvas works. I'm about to modify a > program I use for meteor work. It uses canvas to display images, and I plan > to draw on the image. For example, I plan to draw compass headings on a > circle every 30 degre

Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

2007-09-19 Thread W. Watson
Here seems to be another good source. W. Watson wrote: > Ah, I missed your link to Chap 11. That looks very helpful. > > W. Watson wrote: >> Thanks. I've arranged for an inter-library loan(ILL), and probably >> will not get his book for several days yet

Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

2007-09-19 Thread W. Watson
I'm just trying to get some feel for how canvas works. I'm about to modify a program I use for meteor work. It uses canvas to display images, and I plan to draw on the image. For example, I plan to draw compass headings on a circle every 30 degrees. Just warming up to the task. exhuma.twn wrote

Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

2007-09-19 Thread exhuma.twn
On Sep 18, 11:58 pm, Richard Townsend <[EMAIL PROTECTED]> wrote: > On Tue, 18 Sep 2007 13:18:36 -0700, "W. Watson" > > <[EMAIL PROTECTED]> wrote: > >Tk is it. I'm really not interested in the others at this point. > > John Grayson's book 'Python and Tkinter Programming' has a chapter on > plotting

Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

2007-09-18 Thread W. Watson
Ah, I missed your link to Chap 11. That looks very helpful. W. Watson wrote: > Thanks. I've arranged for an inter-library loan(ILL), and probably will > not get his book for several days yet. I've had the book before, but was > really unable to get the time to pursue it (the ILL). I have his web

Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

2007-09-18 Thread W. Watson
Thanks. I've arranged for an inter-library loan(ILL), and probably will not get his book for several days yet. I've had the book before, but was really unable to get the time to pursue it (the ILL). I have his web site bookmarked. I do not yet plan to buy his book, web or hardbound yet. Maybe I

Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

2007-09-18 Thread Richard Townsend
On Tue, 18 Sep 2007 13:18:36 -0700, "W. Watson" <[EMAIL PROTECTED]> wrote: >Tk is it. I'm really not interested in the others at this point. > John Grayson's book 'Python and Tkinter Programming' has a chapter on plotting Graphs and Charts. You can even download that chapter as a PDF file: http:

Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

2007-09-18 Thread W. Watson
Tk is it. I'm really not interested in the others at this point. Grant Edwards wrote: > On 2007-09-18, W. Watson <[EMAIL PROTECTED]> wrote: > >> What would be appropriate? What are the choices? I'm pretty new to Python, >> but am familiar with the XWindow widget set. > > There's no such thing a

Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

2007-09-18 Thread Grant Edwards
On 2007-09-18, W. Watson <[EMAIL PROTECTED]> wrote: > What would be appropriate? What are the choices? I'm pretty new to Python, > but am familiar with the XWindow widget set. There's no such thing as "the XWindow widget set". There are at least 8-10 different X Windows widget sets. The ones t

Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

2007-09-18 Thread kyosohma
On Sep 18, 12:23 pm, "W. Watson" <[EMAIL PROTECTED]> wrote: > What would be appropriate? What are the choices? I'm pretty new to Python, > but am familiar with the XWindow widget set. I think it is available under > Python, but if there's a more suitable choice, that's fine. I would think > Tkinter

Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

2007-09-18 Thread W. Watson
What would be appropriate? What are the choices? I'm pretty new to Python, but am familiar with the XWindow widget set. I think it is available under Python, but if there's a more suitable choice, that's fine. I would think Tkinter would be the simplest choice. Yes, Tkinter would be preferable.

Re: Tutorial or Example (or Tutorial) of Using Canvas to Produce a Plot

2007-09-18 Thread Grant Edwards
On 2007-09-18, W. Watson <[EMAIL PROTECTED]> wrote: > I'm looking for an example with canvas that produces, say, a > complete x-y plot of some data. With what widget set? -- Grant Edwards grante Yow! I'm a nuclear at

Re: Tutorial creates confusion about slices

2007-04-28 Thread Steve Holden
Antoon Pardon wrote: > On 2007-04-26, Steve Holden <[EMAIL PROTECTED]> wrote: [...] > >> Warning: this is an explicit test to see whether you can sit on your >> hands and refrain from replying. It's hard to find a thread where you >> don't make the last comment on every branch you get involved i

Re: Tutorial creates confusion about slices

2007-04-27 Thread Antoon Pardon
On 2007-04-26, Steve Holden <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote: >> On 2007-04-25, Steve Holden <[EMAIL PROTECTED]> wrote: > [...] >>> Most people reading a tutorial are aware that they are being given the >>> knowledge they need to put the subject matter to immediate use, and th

Re: Tutorial creates confusion about slices

2007-04-26 Thread Steve Holden
Michael Hoffman wrote: > Neil Cerutti wrote: >>> On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote: The following is part of the explanation on slices in the tutorial: The best way to remember how slices work is >>> ... +---+---+---+---+---+ | H | e | l |

Re: Tutorial creates confusion about slices

2007-04-26 Thread Michael Hoffman
Neil Cerutti wrote: >> On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote: >>> The following is part of the explanation on slices in the >>> tutorial: >>> >>> The best way to remember how slices work is >> ... >>> +---+---+---+---+---+ >>> | H | e | l | p | A | >>> +---+---+---+---+-

Re: Tutorial creates confusion about slices

2007-04-26 Thread Neil Cerutti
On 2007-04-25, Ant <[EMAIL PROTECTED]> wrote: > On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote: >> The following is part of the explanation on slices in the >> tutorial: >> >> The best way to remember how slices work is > ... >> +---+---+---+---+---+ >> | H | e | l | p | A | >> +

Re: Tutorial creates confusion about slices

2007-04-26 Thread Steve Holden
Antoon Pardon wrote: > On 2007-04-25, Steve Holden <[EMAIL PROTECTED]> wrote: [...] >>> >> Most people reading a tutorial are aware that they are being given the >> knowledge they need to put the subject matter to immediate use, and that >> there may well be refinements that are glossed over or c

Re: Tutorial creates confusion about slices

2007-04-26 Thread Antoon Pardon
On 2007-04-25, Steve Holden <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote: >> On 2007-04-25, Ant <[EMAIL PROTECTED]> wrote: >>> On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote: The following is part of the explanation on slices in the tutorial: The best way to rem

Re: Tutorial creates confusion about slices

2007-04-25 Thread Ant
On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote: > The following is part of the explanation on slices in the > tutorial: > > The best way to remember how slices work is ... > +---+---+---+---+---+ > | H | e | l | p | A | > +---+---+---+---+---+ > 0 1 2 3 4 5 > -5 -4

Re: Tutorial creates confusion about slices

2007-04-25 Thread Neil Cerutti
On 2007-04-25, Hamilton, William <[EMAIL PROTECTED]> wrote: > That's how everything I've ever learned has been taught. Start > with a simple explanation that may not be completely accurate > but is functional, then fill in the details later when there is > a context to put them in. The tutorial c

Re: Tutorial creates confusion about slices

2007-04-25 Thread Duncan Booth
Steve Holden <[EMAIL PROTECTED]> wrote: >> Wording to that effect makes it more clear that it is a crutch >> that can be usefull now but that it should be discarded later. >> > Most people reading a tutorial are aware that they are being given the > knowledge they need to put the subject matter

Re: Tutorial creates confusion about slices

2007-04-25 Thread Steve Holden
Antoon Pardon wrote: > On 2007-04-25, Ant <[EMAIL PROTECTED]> wrote: >> On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote: >>> The following is part of the explanation on slices in the >>> tutorial: >>> >>> The best way to remember how slices work is to think of the indices as >> ... >>>

RE: Tutorial creates confusion about slices

2007-04-25 Thread Hamilton, William
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Antoon Pardon > Sent: Tuesday, April 24, 2007 7:40 AM > To: python-list@python.org > Subject: Re: Tutorial creates confusion about slices > > On 2007-04-24, Michael B

Re: Tutorial creates confusion about slices

2007-04-25 Thread Antoon Pardon
On 2007-04-25, Ant <[EMAIL PROTECTED]> wrote: > On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote: >> The following is part of the explanation on slices in the >> tutorial: >> >> The best way to remember how slices work is to think of the indices as > ... >> +---+---+---+---+---+ >> |

Re: Tutorial creates confusion about slices

2007-04-25 Thread Ant
On Apr 23, 1:38 pm, Antoon Pardon <[EMAIL PROTECTED]> wrote: > The following is part of the explanation on slices in the > tutorial: > > The best way to remember how slices work is to think of the indices as ... > +---+---+---+---+---+ > | H | e | l | p | A | > +---+---+---+---+---+ > 0 1

Re: Tutorial creates confusion about slices

2007-04-25 Thread Tim Golden
Antoon Pardon wrote: > On 2007-04-24, Michael Hoffman <[EMAIL PROTECTED]> wrote: > >> Really only one person has argued that the docs do not need to be >> changed. The other two people seemed to think you were asking for help >> rather than discussing how to revise the docs. Understandable, sinc

Re: Tutorial creates confusion about slices

2007-04-25 Thread Ant
Hi Antoon, > The best way to remember how slices work is to think of the indices as ... > +---+---+---+---+---+ > | H | e | l | p | A | > +---+---+---+---+---+ > 0 1 2 3 4 5 > -5 -4 -3 -2 -1 > > This is all very well with a simple slice like: > > "HelpA"[2:4]=> "lp

Re: Tutorial creates confusion about slices

2007-04-25 Thread Antoon Pardon
On 2007-04-24, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Antoon Pardon wrote: >> On 2007-04-24, Michael Bentley <[EMAIL PROTECTED]> wrote: >> > >> > On Apr 24, 2007, at 6:35 AM, Antoon Pardon wrote: >> > >> >> People don't read tutorials in a strictly linear fashion. They can >> >> continue

Re: Tutorial creates confusion about slices

2007-04-25 Thread Antoon Pardon
On 2007-04-24, Michael Hoffman <[EMAIL PROTECTED]> wrote: > Really only one person has argued that the docs do not need to be > changed. The other two people seemed to think you were asking for help > rather than discussing how to revise the docs. Understandable, since > that's why most people

Re: Tutorial creates confusion about slices

2007-04-24 Thread [EMAIL PROTECTED]
Antoon Pardon wrote: > On 2007-04-24, Michael Bentley <[EMAIL PROTECTED]> wrote: > > > > On Apr 24, 2007, at 6:35 AM, Antoon Pardon wrote: > > > >> People don't read tutorials in a strictly linear fashion. They can > >> continue to later subjects and then come back here to see how things > >> tie

Re: Tutorial creates confusion about slices

2007-04-24 Thread Michael Hoffman
[Michael Hoffman] >> Personally, I do not think of slices in the way this tutorial suggests, >> but I think taking it out without replacement would not help. If you >> want to add a more accurate replacement, I think that would be better >> received than just saying that the section should be re

Re: Tutorial creates confusion about slices

2007-04-24 Thread Antoon Pardon
On 2007-04-24, Michael Hoffman <[EMAIL PROTECTED]> wrote: > Antoon Pardon wrote: > >>> Submit a patch if you want it changed. I'm sure your valuable >>> insights will greatly improve the quality of the python documentation. >> >> Fat chance, if they reason like you. > > I don't think that Micha

Re: Tutorial creates confusion about slices

2007-04-24 Thread Michael Hoffman
Antoon Pardon wrote: >> Submit a patch if you want it changed. I'm sure your valuable >> insights will greatly improve the quality of the python documentation. > > Fat chance, if they reason like you. I don't think that Michael Bentley is the documents maintainer. Are you trying to pick a fi

Re: Tutorial creates confusion about slices

2007-04-24 Thread Antoon Pardon
On 2007-04-24, Michael Bentley <[EMAIL PROTECTED]> wrote: > > On Apr 24, 2007, at 6:35 AM, Antoon Pardon wrote: > >> People don't read tutorials in a strictly linear fashion. They can >> continue to later subjects and then come back here to see how things >> tie together. So the fact that it is onl

Re: Tutorial creates confusion about slices

2007-04-24 Thread Michael Bentley
On Apr 24, 2007, at 6:35 AM, Antoon Pardon wrote: > On 2007-04-24, Michael Bentley <[EMAIL PROTECTED]> wrote: >> >> On Apr 24, 2007, at 4:47 AM, Antoon Pardon wrote: >> >>> On 2007-04-24, Michael Bentley <[EMAIL PROTECTED]> wrote: On Apr 24, 2007, at 1:39 AM, Antoon Pardon wrote: >

Re: Tutorial creates confusion about slices

2007-04-24 Thread Antoon Pardon
On 2007-04-24, Michael Bentley <[EMAIL PROTECTED]> wrote: > > On Apr 24, 2007, at 4:47 AM, Antoon Pardon wrote: > >> On 2007-04-24, Michael Bentley <[EMAIL PROTECTED]> wrote: >>> >>> On Apr 24, 2007, at 1:39 AM, Antoon Pardon wrote: >>> I suspect that if you give this explanation to someone an

Re: Tutorial creates confusion about slices

2007-04-24 Thread Michael Bentley
On Apr 24, 2007, at 4:47 AM, Antoon Pardon wrote: > On 2007-04-24, Michael Bentley <[EMAIL PROTECTED]> wrote: >> >> On Apr 24, 2007, at 1:39 AM, Antoon Pardon wrote: >> >>> I suspect that if you give this explanation to someone and explain >>> that there is also a step parameter, chances are he w

Re: Tutorial creates confusion about slices

2007-04-24 Thread Antoon Pardon
On 2007-04-24, Michael Bentley <[EMAIL PROTECTED]> wrote: > > On Apr 24, 2007, at 1:39 AM, Antoon Pardon wrote: > >> I suspect that if you give this explanation to someone and explain >> that there is also a step parameter, chances are he will answer >> correctly if you ask him, what he thinks the

Re: Tutorial creates confusion about slices

2007-04-24 Thread Michael Bentley
On Apr 24, 2007, at 1:39 AM, Antoon Pardon wrote: > On 2007-04-23, Michael Bentley <[EMAIL PROTECTED]> wrote: >> >> On Apr 23, 2007, at 7:38 AM, Antoon Pardon wrote: >> >>> The following is part of the explanation on slices in the >>> tutorial: >>> >>> The best way to remember how slices work is

Re: Tutorial creates confusion about slices

2007-04-23 Thread Antoon Pardon
On 2007-04-23, Hamilton, William <[EMAIL PROTECTED]> wrote: >> -Original Message- >> From: [EMAIL PROTECTED] > [mailto:python- >> [EMAIL PROTECTED] On Behalf Of Antoon > Pardon >> Sent: Monday, April 23, 2007 7:38 AM >> To: python-list@python.org >> Subject: Tutorial creates confusion about

Re: Tutorial creates confusion about slices

2007-04-23 Thread Antoon Pardon
On 2007-04-23, Michael Bentley <[EMAIL PROTECTED]> wrote: > > On Apr 23, 2007, at 7:38 AM, Antoon Pardon wrote: > >> The following is part of the explanation on slices in the >> tutorial: >> >> The best way to remember how slices work is to think of the indices as >> pointing between characters, wi

RE: Tutorial creates confusion about slices

2007-04-23 Thread Hamilton, William
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of Antoon Pardon > Sent: Monday, April 23, 2007 7:38 AM > To: python-list@python.org > Subject: Tutorial creates confusion about slices > > The following is part of the explanation on slices in the

Re: Tutorial creates confusion about slices

2007-04-23 Thread Michael Bentley
On Apr 23, 2007, at 7:38 AM, Antoon Pardon wrote: > The following is part of the explanation on slices in the > tutorial: > > The best way to remember how slices work is to think of the indices as > pointing between characters, with the left edge of the first character > numbered 0. Then the righ

Re: Tutorial creates confusion about slices

2007-04-23 Thread Antoon Pardon
On 2007-04-23, Rob Wolfe <[EMAIL PROTECTED]> wrote: > > Antoon Pardon wrote: >> The following is part of the explanation on slices in the >> tutorial: >> >> The best way to remember how slices work is to think of the indices as >> pointing between characters, with the left edge of the first charact

Re: Tutorial creates confusion about slices

2007-04-23 Thread Rob Wolfe
Antoon Pardon wrote: > The following is part of the explanation on slices in the > tutorial: > > The best way to remember how slices work is to think of the indices as > pointing between characters, with the left edge of the first character > numbered 0. Then the right edge of the last character o

Re: Tutorial on setuptools

2006-10-24 Thread Ben Finney
"Thomas W" <[EMAIL PROTECTED]> writes: > I'm might just be dumb, but I cannot get the hang of usting > setuptools based on the docs at > http://peak.telecommunity.com/DevCenter/setuptools. Yes, the documentation there is long on verbiage and short on realistic examples. It is also hard to navigat

Re: tutorial example?????

2005-11-13 Thread Brian van den Broek
john boy said unto the world upon 2005-11-12 19:43: > OK...I have the following program > > i = 1 > while i <= 6: > print 2 * i,' ', > i = i + 1 > print > > this is supposed to give you a "new" blank line after the program runs > instead it just gives: > 2 4 6 8 10 12 > >

Re: tutorial example

2005-11-12 Thread Steven D'Aprano
On Sat, 12 Nov 2005 13:42:37 +, Max Erickson wrote: > > Not in python. > > For example, what would you call the following? > > def rsum(n, m): > print n+m > return n+m > > > In python a method is callable attached to an object. A function is a > callable object constructed with a

Re: tutorial example

2005-11-12 Thread Colin J. Williams
Max Erickson wrote: > Not in python. > > For example, what would you call the following? > > def rsum(n, m): > print n+m > return n+m > I would call it a python function with a side-effect. Colin W. > > In python a method is callable attached to an object. A function is a > callable o

Re: tutorial example

2005-11-12 Thread Roel Schroeven
Ruben Charles wrote: > That is the diference between a method and a function. > A method do something and a function return something. I'd rather say it's the difference between a procedure and a function, as it is used in e.g. Pascal. Procedures in Pascal don't return anything, more or less analo

Re: tutorial example

2005-11-12 Thread Colin J. Williams
Ruben Charles wrote: > That is the diference between a method and a function. > A method do something and a function return something. > This is not quite correct. The difference between a method and a function is that the method is associated with a type or class object, a function is not. A m

Re: tutorial example

2005-11-12 Thread Ruben Charles
On 11/12/05, Max Erickson <[EMAIL PROTECTED]> wrote: > > Not in python. > > For example, what would you call the following? > > def rsum(n, m): > print n+m > return n+m > > > In python a method is callable attached to an object. A function is a > callable object constructed with a def state

Re: tutorial example

2005-11-12 Thread Max Erickson
Not in python. For example, what would you call the following? def rsum(n, m): print n+m return n+m In python a method is callable attached to an object. A function is a callable object constructed with a def statement. max -- http://mail.python.org/mailman/listinfo/python-list

Re: tutorial example

2005-11-12 Thread Ruben Charles
That is the diference between a method and a function. A method do something and a function return something. Example: def psum(n, m): print (n + m) def rsum(n, m): return (n +m) Then try this... >>> psum(2, 3) >>> a = psum(2, 3) >>> a >>> a = rsum(2, 3) >>> a You see it? -- ht

Re: tutorial example

2005-11-11 Thread Max Erickson
>>> import math >>> def distance1(x1, y1, x2, y2): dx = x2 - x1 dy = y2 - y1 dsquared = dx**2 + dy**2 result = math.sqrt(dsquared) print result return result >>> def distance2(x1, y1, x2, y2): dx = x2 - x1 dy = y2 - y1 dsquared = dx**2 + dy**2 result = math.s

Re: tutorial

2005-06-03 Thread J. W. McCall
zzz wrote: > May I know where is the good website for Python tutorial? Many thanks. How about...the Python website? (www.python.org) Google is also a good place to find a great multitude of things, including Python Tutorials. -- http://mail.python.org/mailman/listinfo/python-list

Re: tutorial

2005-06-03 Thread Sandman
I'm a beginner as well, and I liked this one: http://docs.python.org/tut/tut.html But I ended up buying the "Learning Python" book anyway. -- http://mail.python.org/mailman/listinfo/python-list

Re: tutorial idea

2005-01-29 Thread Nick Coghlan
ElctrcElctrcgtr1 wrote: have a java applet that runs python code, with a tutorial that goes along with it. that way you just have to go to a website to learn it, instead of downloading and installing a few programs. (i would make it so it assumes that you don't know how to program anything.) Someth

Re: Tutorial problem

2004-12-27 Thread Steve Holden
Rÿe9veillÿe9 wrote: Hello, I have just started doing the python tutorials and i tried to modify one of the exercises, it has to to with defining functions. I wanted the user to be able to enter an option and then get a print of the selected option. I also wanted to have an exit for the us

Re: Tutorial problem

2004-12-27 Thread Steven Bethard
Rÿe9veillÿe9 wrote: Hello, I have just started doing the python tutorials and i tried to modify one of the exercises, it has to to with defining functions. I wanted the user to be able to enter an option and then get a print of the selected option. I also wanted to have an exit for the us

Re: Tutorial problem

2004-12-27 Thread Paul Robson
On Mon, 27 Dec 2004 08:15:51 -0800, Rÿe9veillÿe9 wrote: > The problem is that it doesnt print the > > [ choice = input ('Pick a number:') ] > > command. It just runs thru the whole thing without > allowing the user a selection. Are you running it from the command line ? Some editors do

RE: Tutorial problem

2004-12-27 Thread Batista, Facundo
Title: RE: Tutorial problem [Rÿe9veillÿe9] #- The problem is that it doesnt print the #- #- [ choice = input ('Pick a number:') ] #- #- command. It just runs thru the whole thing without #- allowing the user a selection. Are you sure? It should raise a NameErrorin