Commit 62c3bdd1 authored by Romain Bignon's avatar Romain Bignon

start implementation of CLItoDB

parents
__pycache__
*.pyc
import builtins
from xonsh.shell import Shell
class CLItoDB(Shell):
def cmdloop(self):
builtins.__xonsh_shell__ = self
builtins.__xonsh_subproc_uncaptured__ = self.sql_cmd
builtins.__xonsh_subproc_captured_stdout__ = self.sql_cmd
builtins.__xonsh_subproc_captured_inject__ = self.sql_cmd
builtins.__xonsh_subproc_captured_object__ = self.sql_cmd
builtins.__xonsh_subproc_captured_hiddenobject__ = self.sql_cmd
builtins.__xonsh_env__['PROMPT'] = '{BOLD_CYAN}{user}{BOLD_WHITE}@{BOLD_GREEN}{hostname}{BOLD_BLUE}:budgea>{NO_COLOR} '
self.shell.cmdloop()
def sql_cmd(self, *args, **kwargs):
print(args, kwargs)
#!/usr/bin/env python3
from clitodb.main import CLItoDB
if __name__ == '__main__':
CLItoDB().cmdloop()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment