Did I find the right examples for you? yes no

All Samples(11)  |  Call(4)  |  Derive(2)  |  Import(5)

src/i/s/ishell-HEAD/examples/linux_shell.py   ishell(Download)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
 
from ishell.command import Command
from ishell.console import Console
def main():
    console = Console("root@dev:~", '#')
    ls = LS("ls")
    bash = Bash("bash")
    top = Top("top")

src/i/s/ishell-HEAD/examples/cisco.py   ishell(Download)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
 
from ishell.command import Command
from ishell.console import Console
def main():
    console = Console("RouterA")
    enable = Enable("enable", help="Enter enable mode")
    ping = PingCommand('ping', help="Ping destination ip. Ex: ping 8.8.8.8")
    traceroute = TraceRouteCommand('traceroute', help="Trace route to destination ip. Ex: traceroute 8.8.8.8")

src/i/s/ishell-HEAD/ishell/command.py   ishell(Download)
import readline
from ishell import logger
from ishell.console import Console
from ishell.utils import _print
 
__all__ = ["Command"]
 
class Command(Console):

src/i/s/ishell-0.1.1/ishell/command.py   ishell(Download)
import readline
from ishell import logger
from ishell.console import Console
from ishell.utils import _print
 
__all__ = ["Command"]
 
class Command(Console):

src/i/s/ishell-HEAD/test_shell.py   ishell(Download)
import unittest
from ishell.console import Console
from ishell.command import Command
 
class TestConsole(unittest.TestCase):
 
    def test_console_creation(self):
        """Console must be created."""
        c = Console()
    def test_console_has_prompt(self):
        """Console should have a default prompt string."""
        c = Console()
        assert c.prompt == "Prompt"
        assert c.prompt_delim == ">"