Re: [Tutor] Guessing Game Program

2011-03-26 Thread Malcolm Newsome
I noticed an error in my code...and got a cool tip on how to add an "out of range" response if the user types in a number outside of 1-100. Enjoy! Malcolm # guess.py # a simple number guessing game import random #--- ---

[Tutor] how to join two text files ?

2011-03-26 Thread Mateusz K
Hello, I have many text files, where data is delimited by space. Each file contain three colums: coordinate x, coordinate y and value for this location. I would like to join this data to get one big file which will contain columns: coordinate x, coordinate y, value1,value2,..., value_n an

Re: [Tutor] Python closes out on attempt to run script

2011-03-26 Thread David Abbott
On Sat, Mar 26, 2011 at 4:14 PM, Dave Angel wrote: > On 01/-10/-28163 02:59 PM, Matthew Speltz wrote: >> >> I'm trying to teach myself python and have run across a rather >> annoying error.  I'm not sure exactly where the fault lies, so please >> pardon me for posting too much information, I'm not

Re: [Tutor] Python closes out on attempt to run script

2011-03-26 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Matthew Speltz wrote: I'm trying to teach myself python and have run across a rather annoying error. I'm not sure exactly where the fault lies, so please pardon me for posting too much information, I'm not sure what would be relevant. I'm running the Python 3.2 Window

[Tutor] Python closes out on attempt to run script

2011-03-26 Thread Matthew Speltz
I'm trying to teach myself python and have run across a rather annoying error. I'm not sure exactly where the fault lies, so please pardon me for posting too much information, I'm not sure what would be relevant. I'm running the Python 3.2 Windows X86-64 MSI Installer found on http://www.python.o

[Tutor] Installing python3.2 from source on Centos 5.5

2011-03-26 Thread Rance Hall
I thought I had successfully installed python3.2 parallel to the python2.x that is required by Centos. Im getting error messages from python scripts indicating that the _ssl module is not installed. I thought that this would be installed by default, but apparently you need to have -with-ssl in th

Re: [Tutor] Fw: Fw: Fw: Parsing data from a csv file [NC]

2011-03-26 Thread Louis LEICHTNAM
For example the line 1 in the csv file is: Barney Gumble, Breakfast, Duffbeer, 1, I could?ve gone to Harvard and I want to be able to clean it and turn it into: Barney Gumble had for beakfast 1 Duffbeer while thinking "I coul?ve gone to Harvard" so basically using in this line the column0 + "h

Re: [Tutor] script conversion windows -> linux error

2011-03-26 Thread Peter Otten
Rance Hall wrote: > On Fri, Mar 25, 2011 at 1:54 PM, Walter Prins wrote: >> >> On 25 March 2011 18:26, Rance Hall wrote: >>> config_version = config.get('versions','configver',0) >>> This line fails under 3.2 Linux with the error message: >>> TypeError: get() takes exactly 3 positional argumen

Re: [Tutor] Recursively flatten the list

2011-03-26 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Prasad, Ramit wrote:" >A more important problem is that it is flattening only one level. >Multi-level flattening is I think not possible without using some kind >of recursion." > >Not true, just requires more iterations to check each element. Each >iteration could chec