##// END OF EJS Templates
Merge branch 'newkernel' of git://github.com/ellisonbg/ipython into qtfrontend
Merge branch 'newkernel' of git://github.com/ellisonbg/ipython into qtfrontend

File last commit:

r2807:a28a565a
r2809:9f100488 merge
Show More
payload.py
39 lines | 1.1 KiB | text/x-python | PythonLexer
# -*- 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