Re: [Tutor] How do I test file operations (Such as opening, reading, writing, etc.)?

2016-01-27 Thread Ben Finney
boB Stepp writes: > I don't want to mess with what will become the program's *real* > classifiers.txt (And other needed text files to come, that will > likewise be editable.), so how do I simulate these various needed file > operations in a way that tests the actual program code, but without > to

[Tutor] How do I test file operations (Such as opening, reading, writing, etc.)?

2016-01-27 Thread boB Stepp
I am starting a new project and wish to do it from beginning to end using TDD best practices. This is also my practical foray for the first time into OOP. The application will have a primitive editor to create and edit certain text files that the program will need. The first file the program wil

Re: [Tutor] How do I test file operations (Such as opening, reading, writing, etc.)?

2016-01-27 Thread Danny Yoo
> And the current code in main.py: > > #!/usr/bin/env python3 > > class Editor(object): > def __init__(self): > pass > > def edit_classifiers(self): > pass > > if __name__ == "__main__": > main() > > At this moment I am stumped as to what sort of test to write for the >

Re: [Tutor] Change datatype for specific columns in an 2D array & computing the mean

2016-01-27 Thread Ek Esawi
Ops..here is the text file.; previously i copied and pasted from either Word or Excel. AA,BB,CC,DD,EE 1,A1,B1,11.2,11/20/2011 2,A2,B2,2.5,10/21/2011 3,A3,B3,13.67,9/21/2011 4,A4,B4,14.2,8/22/2011 5,A5,B5,20,7/23/2011 ___ Tutor maillist - Tutor@python.o

Re: [Tutor] Change datatype for specific columns in an 2D array & computing the mean

2016-01-27 Thread Ek Esawi
Sorry for the mishap. There are no blank lines on the file. I just did not delete the blank lines when i copied and pasted. Here it's again. EK *AA,BB,CC,DD,EE* *1,A1,B1,11.2,11/20/2011* *2,A2,B2,2.5,10/21/2011* *3,A3,B3,13.67,9/21/2011* *4,A4,B4,14.2,8/22/2011* *5,A5,B5,20,7/23/2011* ___

Re: [Tutor] Change datatype for specific columns in an 2D array & computing the mean

2016-01-27 Thread Oscar Benjamin
On 27 January 2016 at 02:00, Ek Esawi wrote: > Here is the file. > > AA,BB,CC,DD,EE > > 1,A1,B1,11.2,11/20/2011 > > 2,A2,B2,2.5,10/21/2011 > > 3,A3,B3,13.67,9/21/2011 > > 4,A4,B4,14.2,8/22/2011 > > 5,A5,B5,20,7/23/2011 That still doesn't look right to me. Is there really a blank line between each

Re: [Tutor] Change datatype for specific columns in an 2D array & computing the mean

2016-01-27 Thread Ek Esawi
Here is the file. AA,BB,CC,DD,EE 1,A1,B1,11.2,11/20/2011 2,A2,B2,2.5,10/21/2011 3,A3,B3,13.67,9/21/2011 4,A4,B4,14.2,8/22/2011 5,A5,B5,20,7/23/2011 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.p