Re: [Tutor] sorting algorithim

2009-04-23 Thread R. Alan Monroe
> i know how to print for bubble sort in python, is there a way to > print each pass in the sort so i can see what happens at each step?  > thanks A good first guess would be to try sticking "print list" in there in a few different places. Others will probably point out that "list" is a built-in

[Tutor] sorting algorithim

2009-04-23 Thread tonyon boyo
hello,   i know how to print for bubble sort in python, is there a way to print each pass in the sort so i can see what happens at each step?  thanks   def bubblesort(list):     for passes in range(len(list)-1, 0, -1):     for index in range(passes):     if list[index] < list[index + 1

Re: [Tutor] understanding urllib.urlopen

2009-04-23 Thread bob gailer
johnf wrote: I'm trying to comfirm an address is a good address via google. Meaning does google report that the address exist. If I do urllib.urlopen( "http://maps.google.com/maps/geo?%s"; % params ) with the address in params. I get the longitude and latitude correctly. If I use the follo

Re: [Tutor] understanding urllib.urlopen

2009-04-23 Thread W W
On Thu, Apr 23, 2009 at 10:58 AM, johnf wrote: > On Thursday 23 April 2009 08:44:07 am Emile van Sebille wrote: > > johnf wrote: > > > > > > > But if I attempt this > > > urllib.urlopen( > > > "http://maps.google.com?q='18Tadlock > > > Place Woodland CA'" > > >

Re: [Tutor] understanding urllib.urlopen

2009-04-23 Thread johnf
On Thursday 23 April 2009 08:44:07 am Emile van Sebille wrote: > johnf wrote: > > > > But if I attempt this > > urllib.urlopen( "http://maps.google.com?q='18 Tadlock Place Woodland CA'" > > ) it always fails. > > What do you get? I don't get an error. > > Emile > > ___

Re: [Tutor] understanding urllib.urlopen

2009-04-23 Thread Emile van Sebille
johnf wrote: But if I attempt this urllib.urlopen( "http://maps.google.com?q='18 Tadlock Place Woodland CA'" ) it always fails. What do you get? I don't get an error. Emile ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/l

[Tutor] understanding urllib.urlopen

2009-04-23 Thread johnf
I'm trying to comfirm an address is a good address via google. Meaning does google report that the address exist. If I do urllib.urlopen( "http://maps.google.com/maps/geo?%s"; % params ) with the address in params. I get the longitude and latitude correctly. If I use the following in the addr

Re: [Tutor] Testing Frameworks and Organizations

2009-04-23 Thread Eike Welk
Hello Spir; hello all! I have a similar question: For projects with multiple packages (directories) and modules (files); where do you put your testcode, what framework do you use, and what design patterns do you employ? I currently work on a project with one package and several modules. I us

Re: [Tutor] testing framework

2009-04-23 Thread Alan Gauld
"spir" wrote My app is about parsing, which input and output usually both are big and complicated *strings*. So that I find the command line model really unappropriate for expressing test cases and their expected results. Any hint/pointer/comment welcome, What about using command line red

Re: [Tutor] Tokenizing Help

2009-04-23 Thread Paul McGuire
For the given test case, this pyparsing sample parses the data, without having to anticipate all the possible 2-letter keys. from pyparsing import * integer = Word(nums) DASH = Literal('-').suppress() LT = Literal('<').suppress() GT = Literal('>').suppress() entrynum = LT + integer + GT keycod

Re: [Tutor] testing framework

2009-04-23 Thread Kent Johnson
On Thu, Apr 23, 2009 at 8:55 AM, spir wrote: > Hello, > > I would like to refactor tests of an application in a consistent form. I have > a ton of tests for each module, but they are all ad hoc things. > My app is about parsing, which input and output usually both are big and > complicated *str

Re: [Tutor] testing framework

2009-04-23 Thread Oxymoron
Hello, On Thu, Apr 23, 2009 at 10:55 PM, spir wrote: > > My app is about parsing, which input and output usually both are big and > complicated *strings*. So that I find the command line model really > unappropriate for expressing test cases and their expected results. > Interesting - haven't r

[Tutor] testing framework

2009-04-23 Thread spir
Hello, I would like to refactor tests of an application in a consistent form. I have a ton of tests for each module, but they are all ad hoc things. doctest looks great. The issue is it seems based on command line-like testing: """ This is the "example" module. The example module supplies one f

Re: [Tutor] Don't understand error messages.

2009-04-23 Thread spir
Le Wed, 22 Apr 2009 19:40:51 -0700, "WM." s'exprima ainsi: > Well, Kent was right, it was an indent error, but 'way high in the > program. I was so catching commas that I got sloppy at an indent > change. sorry guys. > ___ > Tutor maillist - Tutor@

[Tutor] py.test on Windows

2009-04-23 Thread Hans DushanthaKumar
Hi, Has anyone here got py.test running on Windows? How do I run a test script? I have previously installed and used it on Linux and it all worked magically - all I needed to do was type in "py.test ". However on windows, the installation doesn't seem to set the paths appropriately. Thanks,