• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1AUTHOR = "Steve Howard <showard@google.com>"
2TIME = "SHORT"
3NAME = "Sample - Autotest console"
4TEST_TYPE = "client"
5TEST_CLASS = "Kernel"
6TEST_CATEGORY = "Functional"
7
8DOC = """
9Gives you an interactive interpreter within an autotest control file.
10
11If you install IPython (http://ipython.scipy.org/, Ubuntu and Fedora's package
12"ipython"), you'll get a snazzy IPython console with readline and completion
13and all that. Otherwise you'll get a simple python console.
14
15The point of this control file is to give you an interactive interpreter with
16all autotest 'magic' loaded in, so you can inspect objects and have fun.
17"""
18
19try:
20    import IPython
21    ipshell = IPython.Shell.IPShellEmbed(argv=[], banner='autotest console')
22    ipshell()
23except ImportError:
24    import code
25    code.interact('autotest console', raw_input)
26