fgimian / paramiko-expect

A Python expect-like extension for the Paramiko SSH library which also supports tailing logs.
MIT License
205 stars 78 forks source link

Django #27

Closed ozcanyarimdunya closed 7 years ago

ozcanyarimdunya commented 7 years ago

I am trying to use interact.take_control() in django view which will be shown in browser and user will send
command from form. Does it possible, if not what should i do ?

fruch commented 7 years ago

take_control is for interactive, while in shell.

you could build something in django, but 1) it would be for a one time command ? if not you'll need to save the open connections somehow... 2) would it wait for the command to finish ? and only then return ?

If you want something interactive you might need to find something based on websockets or emulate a shell maybe something like this: https://github.com/sourcelair/xterm.js

ozcanyarimdunya commented 7 years ago

Yes, this is definitely what i want. Thanks.

fruch commented 7 years ago

@ozcaan11 glad I've could be of service :) (but damn, now i'm looking for doing something with this xtrem.js...)

ozcanyarimdunya commented 7 years ago

i think it is would be perfect :)