Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Pickle Serialization, input and output | |
| try: | |
| import cpickle as pickle | |
| except ImportError: | |
| import pickle | |
| def create_pyp(fname_pickle): | |
| d0 = { | |
| 'test0': 0., |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # from http://stackoverflow.com/questions/82831/how-do-i-check-if-a-file-exists-using-python | |
| try: | |
| fh = open('whatever.txt') | |
| except IOError as e: | |
| print("({})".format(e)) |