November 2015
Intermediate to advanced
304 pages
5h 23m
English
Chapter 1

1 #!/usr/bin/env python 2 3 import sys, os, string 4 5 # Utility for handling the intermediate 'secondary memory' 6 def touchopen(filename, *args, **kwargs): 7 try: 8 os.remove(filename) 9 except OSError: 10 pass 11 open(filename, "a").close() # "touch" file 12 return open(filename, *args, **kwargs) 13 14 # The constrained memory ...