Object Orientated Programming: Week 6

Banner

Strings and Serialization

LEARNING OBJECTIVES


This week we are going to look at:

1. Introducing STRING MANIPULATION and STRING FORMATTING.
2. Reviewing FILE MANAGEMENT.
3. Introducing SERIALIZING OBJECTS.


Python 


Powerpoint: String Manipulation

Two page summary

Powerpoint: Regular Expressions

Two page summary

Revision:
Powerpoint: File Management

Revision: Powerpoint: Exception Handling

Powerpoint: Serializing Objects

Two page summary




Videos:

String Manipulation


Regular Expressions




File Management


Exception Handling


Serializing Objects






String Code:
BasicStrings * MoreStringFunctions * KeywordArguments * KeywordArguments-mixed * EscapingBraces * StringFormatting * StringFunctions * ContainerLookups * ContainerLookups2 * ObjectLookups * MatchingPatterns * MatchingPatterns-arguments * MatchingPatterns-singlecharacters * MatchingPatterns-multiplecharacters * GettingInformation


File Code:
File Reading (Example 1, Example 2, Example 3, Example 4, Example 5, Example 6, Example 7) * Binary File Reading * File Writing (Example 1, Example 2, Example 3, Example 4, Example 5) * Exception Handling (Example 1, Example 2, Example 3, Example 4, Example 5, Example 6, Example 7)

Sample Files:
MyData.txt * MyData2.txt * Python.gif

Serialization Code:
Serializing Objects

Python IntrepreterCode in Action



Python String Formatting


Let's Learn Python - Regular Expressions


Pickles


Serialization with Pickle





Links
PyFormat: Using % and .format() for great good!
https://pyformat.info/

TutorialsPoint.com: Python Strings
https://www.tutorialspoint.com/python/python_strings.htm


Python Docs: Regular Expression Operations
https://docs.python.org/2/library/re.html


Python Wiki: Using Pickle
https://wiki.python.org/moin/UsingPickle

PyMOTW: Pickle and Cpickle
https://pymotw.com/2/pickle/

Ben Frederickson: Don't Pickle Your Data
http://www.benfrederickson.com/dont-pickle-your-data/



Lab #6
Lab #5 is all about checking if what you have learned in the episodes above all makes sense, and if you can use the property function in Python.



Back

If you have any suggestions, corrections, or comments, please feel free to e-mail me at:
Damian.X.Gordon(a)tudublin.ie