You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
686 B
21 lines
686 B
7 months ago
|
# autoserv_console.srv - gives you an interactive interpreter within an autoserv
|
||
|
# control file. If you pass "-m hostname", a RemoteHost will be available under
|
||
|
# the variable "host".
|
||
|
|
||
|
# If you install IPython (http://ipython.scipy.org/, Ubuntu package "ipython"),
|
||
|
# you'll get a snazzy IPython console with readline and completion and all that.
|
||
|
# Otherwise you'll get a simple console without any of that.
|
||
|
|
||
|
# -Steve Howard (showard@google.com)
|
||
|
|
||
|
if machines:
|
||
|
host = hosts.create_host(machines[0])
|
||
|
|
||
|
try:
|
||
|
import IPython
|
||
|
ipshell = IPython.Shell.IPShellEmbed(argv=[])
|
||
|
ipshell()
|
||
|
except ImportError:
|
||
|
import code
|
||
|
code.interact("Autoserv console", raw_input, locals())
|