kushaldas/pym — pull request #16 by iamsudip (2013-07-11 12:48:52+00:00)
Title: Modified no of tabs, spaces program & corrected some typos

1. Corrected comma, space related issues.

2. Changed ie to i.e.

3. Added 3 new lines in "Important" of closing file for proper output in html

4. "loop through the lines in a file object" line 85: f changed to fobj

5. Added "[]" in line 151 and "(showfile.py)" in line 92 for better understanding to novice programmers.

6. Deleted seek(...) added fileObject.seek(offset[, whence]) for proper syntax.

7. in line 214: Changed comment because in practical example seek(0) sets the pointer to 1st byte of the file so seek(5) will point to (1+5)th byte of the file.

8. In the last program counting of space, tabs:
if len(sys.argv) >1 #it means if user gives more than 1 parameter as ./some.py it will accept. but it is not good cause it is only considering the 1st path so why the program should accept other path!

Changed the above line to if len(sys.argv) == 2 #it will only accept as ./some.py
if other parameters given then it will reject it saying "Wrong parameter" and the syntax of using the program.

Removed sys.exit(-1). it was not necessary cause either if is true or false it will always execute sys.exit(0).