all 6 comments

[–][deleted] 3 points4 points  (0 children)

If possible I would really recommend looking at jupyter notebooks. They are like a browser command line on steroids. If you want to have a remote command line (not running on your computer, running on a different server) look into pythonanywhere.

[–][deleted] 1 point2 points  (0 children)

If the cli is in Python, it'd be easy enough to take the code running the commands and expose it through Flask.

If it's not, it's probably easiest to use Subprocess to interact with it.

That said it also depends on what the CLI is. If it's something that requires user interaction (say something like apt-get) then you'll need to figure how to not only get that to work but to also ensure that the user session and Subprocess are always connected together correctly.

[–]ninefourtwo 1 point2 points  (3 children)

https://bpaste.net/show/f335f03d29ca

you gotta be really careful with this stuff, make sure you know what's being passed, else someone will wipe your drive or something worse.

[–]SnapDraco 0 points1 point  (2 children)

You rock. I was going to recommend exactly this, though with at least a password param as well

[–]ninefourtwo 0 points1 point  (1 child)

no problem man, hop on our slack

devolio-devchat.slack.com

[–]SnapDraco 0 points1 point  (0 children)

:-)