Re: [Tutor] monitor other running applications with Python?

2007-05-27 Thread Alan Gauld
"Che M" <[EMAIL PROTECTED]> wrote > Hi, searched a bit for this but haven't found much. > Is it possible to use Python to monitor the use of > other applications? Yes, definitely. > At minimum, I wan't to know that the application was running Thats fairly easy using OS tools such as ps on U

[Tutor] error message questions

2007-05-27 Thread adam urbas
Hello all,I was wondering if there would be someone who would be able to give me a list of error messages and their meanings. I've attached this test.py to illustrate my problem. When I run the program, I am able to enter all the data, yet it will not calculate.It says:can't multiply sequence

Re: [Tutor] trouble with "if"

2007-05-27 Thread adam urbas
Thank you for the help Brian. I would like to ask you about these things. Which one of the examples you gave would be most fool proof.> Date: Wed, 23 May 2007 13:40:09 -0400> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> CC: tutor@python.org> Subject: Re: [Tutor] trouble with "if"> > adam ur

Re: [Tutor] error message questions

2007-05-27 Thread Rikard Bosnjakovic
On 5/27/07, adam urbas <[EMAIL PROTECTED]> wrote: > It says: > > can't multiply sequence by non-int of type 'str' The reason is that raw_input() returns a string. What you are trying to do is multiply a string with a string, which - in Python - is an illegal operation. What you want to do is to

[Tutor] numbers and ranges

2007-05-27 Thread Jon Crump
Dear all, Here's a puzzle that should be simple, but I'm so used to words that numbers tend to baffle me. I've got fields that look something like this: 1942. Oct. 1,3,5,7,8,9,10 I need to parse them to obtain something like this: The xml representation is incidental, the basic problem is

Re: [Tutor] error message questions

2007-05-27 Thread Alan Gauld
"adam urbas" <[EMAIL PROTECTED]> wrote in > Hello all,I was wondering if there would be someone who > would be able to give me a list of error messages and > their meanings. The errors are actually self explanatory - no really! - once you undestandd the basic concepts. But to understand those you

Re: [Tutor] trouble with "if"

2007-05-27 Thread Brian van den Broek
adam urbas said unto the world upon 05/27/2007 01:49 PM: > Thank you for the help Brian. I would like to ask you about these > things. Which one of the examples you gave would be most fool > proof. Hi Adam and all, Adam was asking about how to use raw_input to drive a basic command prompt m

Re: [Tutor] numbers and ranges

2007-05-27 Thread Bob Gailer
Jon Crump wrote: > Dear all, > > Here's a puzzle that should be simple, but I'm so used to words that > numbers tend to baffle me. > > I've got fields that look something like this: > 1942. Oct. 1,3,5,7,8,9,10 > > I need to parse them to obtain something like this: > > > > > > The xml represen

Re: [Tutor] numbers and ranges

2007-05-27 Thread Kent Johnson
Jon Crump wrote: > Dear all, > > Here's a puzzle that should be simple, but I'm so used to words that > numbers tend to baffle me. > > I've got fields that look something like this: > 1942. Oct. 1,3,5,7,8,9,10 > > I need to parse them to obtain something like this: > > > > > > The xml repr

Re: [Tutor] numbers and ranges

2007-05-27 Thread Jon Crump
Kent, That's damned clever! Your solution hovers right at the limit of my understanding, but the print statements illustrate very clearly the operation of the function. Many thanks! Jon On Sun, 27 May 2007, Kent Johnson wrote: >> Here's a puzzle that should be simple, but I'm so used to words

Re: [Tutor] numbers and ranges

2007-05-27 Thread Kent Johnson
Jon Crump wrote: > Kent, > > That's damned clever! Your solution hovers right at the limit of my > understanding, but the print statements illustrate very clearly the > operation of the function. You're welcome! I recently wrote some notes about iterators and generators that might help your un

Re: [Tutor] trouble with indents

2007-05-27 Thread adam urbas
Thanks for the clarification, but I'm still a tad confused. I'm not sure when to indent. I understand that it has to be done. That link was really confusing. Very newb non-friendly. Arrg... That site is doom. So confusing. I need somewhere to start from the beginning. This site uses all

Re: [Tutor] trouble with indents

2007-05-27 Thread Brian van den Broek
adam urbas said unto the world upon 05/28/2007 12:24 AM: > Thanks for the clarification, but I'm still a tad confused. I'm > not sure when to indent. I understand that it has to be done. > That link was really confusing. Very newb non-friendly. Arrg... > That site is doom. So confusing. I nee

Re: [Tutor] trouble with "if"

2007-05-27 Thread adam urbas
You don't know what a Ti 83 is. Calculator. The most basic programming available. It already has so many functions built into it that it is much easier to tell it to do things. You don't have to do all this integer conversion and such whatnot. Wow... I'm really unsure of how this thing is

Re: [Tutor] trouble with indents

2007-05-27 Thread Bob Gailer
adam urbas wrote: Thanks for the clarification, but I'm still a tad confused.  I'm not sure when to indent.  The following keywords introduce a "suite" (1 or more statements) that are "controlled" by the keyword. Those statements must be indented further than the keyword. What more can

Re: [Tutor] trouble with "if"

2007-05-27 Thread adam urbas
I thank you much Alan. This has been very helpful already and I'm only on page 2. The world needs more newb-friendly people like you.> To: tutor@python.org> From: [EMAIL PROTECTED]> Date: Thu, 24 May 2007 23:39:41 +0100> Subject: Re: [Tutor] trouble with "if"> > Hi adam. > > With the aid of Go

[Tutor] square root

2007-05-27 Thread adam urbas
Hi all,I was just wondering how I would go about performing a square root thing, for my radiacir.py program. _ Change is good. See what’s different about Windows Live Hotmail. www.windowslive-hotmail.com/learnmore/default.html?locale=

Re: [Tutor] square root

2007-05-27 Thread John Fouhy
Check out the math module. On 28/05/07, adam urbas <[EMAIL PROTECTED]> wrote: > > Hi all, > > I was just wondering how I would go about performing a square root thing, > for my radiacir.py program. > > > Create the ultimate e-mail address book. Import your contacts

Re: [Tutor] square root

2007-05-27 Thread Norman Khine
Hello, I have not seen your radiacir.py programme so I am not sure what you want, but for square root, try this http://mail.python.org/pipermail/tutor/2001-February/003411.html HTH adam urbas wrote: > Hi all, > > I was just wondering how I would go about performing a square root > thing, for my