##// END OF EJS Templates
Final attempt to fix init_io logic.
Final attempt to fix init_io logic.

File last commit:

r2807:a28a565a
r2810:41d9236f
Show More
payload.py
39 lines | 1.1 KiB | text/x-python | PythonLexer
Brian Granger
Adding payload module.
r2807 # -*- coding: utf-8 -*-
"""Payload system for IPython.
Authors:
* Fernando Perez
* Brian Granger
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2010 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
from IPython.config.configurable import Configurable
from IPython.utils.traitlets import Dict
#-----------------------------------------------------------------------------
# Main payload class
#-----------------------------------------------------------------------------
class PayloadManager(Configurable):
_payload = Dict({})
def write_payload(self, key, value):
self.payload[key] = value
def reset_payload(self):
self.payload = {}
def read_payload(self):
return self._payload