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
#!/usr/bin/env python | |
# jsonpickle doesn't handle the case of an object being serialized without | |
# __getstate__ to then be restored with __setstate__. __setstate__ is never | |
# called because the json data does not have the "py/state" key. Only by adding | |
# a custom handler can we support both formats to go through __setstate__ | |
import jsonpickle | |
class Original(object): |
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
# Log level manager and log viewer for wxPython | |
# | |
# Provides capture window to show logging messages and list of all loggers | |
# known to python logging module. Loggers may be turned on and off using simple | |
# pattern matching or the graphical list of loggers. | |
# | |
# Remembers the initial log level of each logger and sets the log level to | |
# DEBUG when turning on a logger, returning the log level to the initial log | |
# level when turning off. | |
# |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser(description=""" | |
I never freaking remember argparse syntax and the docs are so all over the place | |
that I need this for an example. |
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
"""Simple self-contained tasks application | |
Use Window -> New Window to create new windows. Without a default layout, | |
File -> Exit will cause the following exception if there are multilpe | |
windows open: | |
Traceback (most recent call last): | |
File "/data/home/rob/src/enthought/pyface/pyface/ui/wx/action/action_item.py", line 260, in _on_menu | |
self.controller.perform(action, action_event) | |
File "/data/home/rob/src/enthought/pyface/pyface/tasks/action/task_action_controller.py", line 31, in perform |