Explorar el Código

Add shell command

theenglishway (time) hace 6 años
padre
commit
cbb2d89782
Se han modificado 1 ficheros con 9 adiciones y 0 borrados
  1. 9 0
      pyplanner/cli.py

+ 9 - 0
pyplanner/cli.py

@@ -148,6 +148,15 @@ def list(ctx):
     for i in db.list(model):
         click.echo(output.output_data(i))
 
+@main.command()
+@click.pass_context
+def shell(ctx):
+    """Launch shell session"""
+    db = ctx.obj['db']
+    output = ctx.obj['output']
+    session = db.session_factory()
+    import IPython; IPython.embed()
+
 
 for group in [milestone, sprint, item]:
     for command in [new, list]: