Skip to content

xqian/clish

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clish

Documentation Status

Command Line Shell Framework is application framework to create application with shell interactive interface.

#!/usr/bin/python

import os
import time

from clish import Command, Shell


class Application(object):
    def __init__(self):
        self.client = None

    def run(self):
        shell = Shell(banner="Welcome to CLI Shell v0.1", prompt="clish> ")
        shell.run()


def main():
    app = Application()
    app.run()


if __name__ == "__main__":
    main()

This application will return follow interactive console:

Welcome to CLI Shell v0.4

Type "help" at any time for a list of commands.

>>> hello
Unknown command: "hello". Type "help" for a list of commands.

>>> help
The following commands are available:

  exit     Exit the program.

>>> exit

About

Command Line Shell Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%