File: package_globals.py

package info (click to toggle)
python-apptools 4.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,652 kB
  • sloc: python: 16,657; makefile: 77
file content (25 lines) | stat: -rw-r--r-- 493 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
Globals for the scripting package.
"""
# Author: Prabhu Ramachandran <prabhu@aero.iitb.ac.in>
# Copyright (c) 2008, Prabhu Ramachandran and Enthought, Inc.
# License: BSD Style.


# The global recorder.
_recorder = None

def get_recorder():
    """Return the global recorder.  Does not create a new one if none
    exists.
    """
    global _recorder
    return _recorder

def set_recorder(rec):
    """Set the global recorder instance.
    """
    global _recorder
    _recorder = rec