Re: [Tutor] Beginner problem: name 'convertToFahrenheit' is not defined

2008-08-15 Thread Steve Willoughby
Joseph Bae wrote: Thanks for the help! I have managed to get a good temperature converter program working! I am working on beefing it up a bit with some exception handling and an "and-or trick". The error handling works okay but I am having problems using and-or. Here's my updated code: def mai

Re: [Tutor] Beginner problem: name 'convertToFahrenheit' is not defined

2008-08-15 Thread Joseph Bae
Sorry! I copied the sample output from my command prompt incorrectly. Correct sample output: Enter A Number : 50 Convert to (F)ahrenheit or (C)elsius? C 50 Fahrenheit = 32 Celsius *50 *(not 32) Celsius = 147 Fahrenheit Joe On Fri, Aug 15, 2008 at 10:22 PM, Joseph Bae <[EMAIL PROTECTED]> wrote:

Re: [Tutor] Beginner problem: name 'convertToFahrenheit' is not defined

2008-08-15 Thread Joseph Bae
Thanks for the help! I have managed to get a good temperature converter program working! I am working on beefing it up a bit with some exception handling and an "and-or trick". The error handling works okay but I am having problems using and-or. Here's my updated code: def main(): true = 1

Re: [Tutor] os.path.walk vs unix find command

2008-08-15 Thread Steve Willoughby
Kent Johnson wrote: Is os.popen("find") faster or slower than os.path.walk to find file pattern in the The general answer to "is find faster than os.[path.]walk faster" is "it depends." Find is optimized, compiled, and fast at what it does. However, what it does is somewhat limited. If you

Re: [Tutor] What has Editor X got that PyWin32 hasn't?

2008-08-15 Thread Eike Welk
On Tuesday 12 August 2008, Jaggo wrote: > Hello. > > I haven't much experience with programming. > > I'd like to point this question to programmers who write in editors > other than the default PyWin32: > > Why do you use your editor rather than using Pywin? What feature > has editor X got that PyW

Re: [Tutor] os.path.walk vs unix find command

2008-08-15 Thread Kent Johnson
On Fri, Aug 15, 2008 at 6:17 PM, Angela Yang <[EMAIL PROTECTED]> wrote: > Hi Python gurus: > > Is os.popen("find") faster or slower than os.path.walk to find file pattern > in the > directory tree? I thought os.path.walk would be faster than unix find, but > that doesn't > seem to be the case? In

Re: [Tutor] os.path.walk vs unix find command

2008-08-15 Thread Chris Fuller
On Friday 15 August 2008 17:17, Angela Yang wrote: > Hi Python gurus: > > > > Is os.popen("find") faster or slower than os.path.walk to find file pattern > in the > > directory tree?  I thought os.path.walk would be faster than unix find, but > that doesn't > > seem to be the case? > > > I'd expec

[Tutor] os.path.walk vs unix find command

2008-08-15 Thread Angela Yang
Hi Python gurus: Is os.popen("find") faster or slower than os.path.walk to find file pattern in the directory tree?  I thought os.path.walk would be faster than unix find, but that doesn't seem to be the case? What is the fastest way in python to search for a file with a given pattern in

Re: [Tutor] RE expressions

2008-08-15 Thread Steve Willoughby
Steve Willoughby wrote: Johan Nilsson wrote: In [74]: p.findall('asdsa"123abc\123"jggfds') Out[74]: ['"123abcS"'] By the way, you're confusing the use of \ in strings in general with the use of \ in regular expressions and the appearance of \ as a character in data strings encountered by you

Re: [Tutor] RE expressions

2008-08-15 Thread Steve Willoughby
Johan Nilsson wrote: 'text "http:\123\interesting_adress\etc\etc\" more text' Does this really use backslashes in the text? The standard for URLs (if that's what it is) is to use forward slashes. For your RE, though, you can always use [...] to specify a range including whatever you like.

Re: [Tutor] What has Editor X got that PyWin32 hasn't?

2008-08-15 Thread Steve Willoughby
Alan Gauld wrote: "Lie Ryan" <[EMAIL PROTECTED]> wrote I've seen vi(m) being praised a lot, well, personally the thing that I hate the most about vim is its directional button (khjl) which is unnatural But very logical and easy to remember when you recall that ^H was backspace (go left), and

[Tutor] RE expressions

2008-08-15 Thread Johan Nilsson
Hi all python experts I am trying to work with BeautifulSoup and re and running into one problem. What I want to do is open a webpage and get some information. This is working fine I then want to follow some of links on this page and proces them. I manage to get links that I am interested

Re: [Tutor] What has Editor X got that PyWin32 hasn't?

2008-08-15 Thread Alan Gauld
"Lie Ryan" <[EMAIL PROTECTED]> wrote I've seen vi(m) being praised a lot, well, personally the thing that I hate the most about vim is its directional button (khjl) which is unnatural But very logical and easy to remember when you recall that ^H was backspace (go left), and ^j was linefeed (

Re: [Tutor] Questions about the new turtle module in Python 2.6b2

2008-08-15 Thread Gregor Lingl
Hi Dick, as I promised some days ago, here is an event driven version of a rectangle generator, which is based on my first example: from turtle import * from random import random, randint from time import sleep MAXLEN = 30 MAXWID = 25 def randomcolor(): return random(), random(), random() d

Re: [Tutor] What has Editor X got that PyWin32 hasn't?

2008-08-15 Thread Jeff Johnson
You can use just the Editor if you wish. Editor.py is the program. Dick Moores wrote: Thanks for the info. I'll take a look at Dabo. Dick -- Jeff Jeff Johnson [EMAIL PROTECTED] Phoenix Python User Group - [EMAIL PROTECTED] ___ Tutor maillist - T

Re: [Tutor] What has Editor X got that PyWin32 hasn't?

2008-08-15 Thread Jeff Johnson
It has a Run command on the menu and copies your .py to a temp file and executes it. Output is displayed in the lower split window. It works very nice without ever having to leave the editor. I will tell you that I am not a person that likes a lot of features. It does indenting and code colori

Re: [Tutor] What has Editor X got that PyWin32 hasn't?

2008-08-15 Thread Lie Ryan
On Wed, 2008-08-13 at 16:59 +0200, [EMAIL PROTECTED] wrote: > > Message: 2 > Date: Wed, 13 Aug 2008 09:04:40 -0500 > From: "W W" <[EMAIL PROTECTED]> > Subject: Re: [Tutor] What has Editor X got that PyWin32 hasn't? > To: "Dick Moores" <[EMAIL PROTECTED]> > Cc: Python Tutor List > Message-ID: >

Re: [Tutor] Image Matching

2008-08-15 Thread Kent Johnson
On Fri, Aug 15, 2008 at 3:54 AM, ShivKumar Anand <[EMAIL PROTECTED]> wrote: > Hello!! Everyone, > > I have to match two images and tell how much identical they are. > > I am trying with Python Imaging Library 1.2.6, but not able to do it > > I am using ImageChops.difference(im1, im2).histogram() an

[Tutor] Image Matching

2008-08-15 Thread ShivKumar Anand
Hello!! Everyone, I have to match two images and tell how much identical they are. I am trying with Python Imaging Library 1.2.6, but not able to do it I am using ImageChops.difference(im1, im2).histogram() and trying to achieve. regards Shiv Kumar