Programming Bootcamp for Scientists #19

Bootcamp
  • 00:00 The Files chapter

  • 00:45 File types: Text vs. Binary - Images, Excel files, text files

  • 04:15 Open vs. Read vs. Load

  • 06:15 Binary files: Images

  • 10:50 Reading an Excel file

  • 14:49 Open and read file (easy but not recommended)

  • 20:45 Open and read file using "with" (recommended)

  • 23:14 Read file remove newlines

  • 27:22 Filename on the command line

  • 28:00 Filehandle with return

  • 33:29 Read all the lines into a list

  • 35:45 Read all the characters of a file into a single string (slurp)

  • 37:00 Not existing file

  • 37:50 Open file exception handling

  • 40:00 Exception hierarchy of Python

  • 43:05 Open many files - exception handling

  • 46:47 Writing to a file

  • 48:23 Append to a file

  • 51:30 Binary mode

  • 53:57 Does the file exist? Is it a file?

  • 50:50 Direct access of a line in a file

  • 57:50 Exercise: count numbers

  • 58:20 Exercise: strip newlines

  • 58:35 Exercise: color selector

  • 59:12 Exercise: ROT13

  • 01:01:05 Exercise: combine lists

Author

Gabor Szabo (szabgab)

Gabor Szabo, the author of the Python Maven web site.

Gabor Szabo