Debian Codegraph @

envisage/plugins/python_shell/i_python_shell.py

raw
1 # (C) Copyright 2007-2025 Enthought, Inc., Austin, TX
2 # All rights reserved.
3 #
4 # This software is provided without warranty under the terms of the BSD
5 # license included in LICENSE.txt and may be redistributed only under
6 # the conditions described in the aforementioned license. The license
7 # is also available online at http://www.enthought.com/licenses/BSD.txt
8 #
9 # Thanks for using Enthought open source!
10 """ A simple interface for the Python shell. """
11
12
13 # Enthought library imports.
14 from traits.api import Interface
15
16
17 class IPythonShell(Interface):
18 """A simple interface for the Python shell."""
19
20 def bind(self, name, value):
21 """Binds a name to a value in the interpreter's namespace."""
22
23 def execute_command(self, command, hidden=True):
24 """Execute a command in the interpreter."""
25
26 def execute_file(self, path, hidden=True):
27 """Execute a file in the interpreter."""
28
29 def lookup(self, name):
30 """Returns the value bound to a name in the interpreter's namespace."""