Python Forum
Python to interact with the Linux Command Line - Centos/RHEL - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: Python to interact with the Linux Command Line - Centos/RHEL (/thread-26639.html)



Python to interact with the Linux Command Line - Centos/RHEL - redhat_boy - May-08-2020

Hi,

This is part of my project. If I have a Python script ready to work on CLI as menu-driven to perform certain System Administration tasks on a Linux Server like monitoring, check history logs, install required package, perform a reboot, backup configuration, manage user accounts/website files on the server, transfer accounts, etc, how I can create a web interface for the same to work through a website(not a public hosted website but has only internal access for staff)?. Through the web interface, it will be much easier to do that tasks

What are the exact requirements to accomplish this for having Python interact with the Linux(Centos/RHEL) command line in depth through the web interface?.


RE: Python to interact with the Linux Command Line - Centos/RHEL - experimental - May-09-2020

dont know if i understand well, but it should be possible making a website interface - just as a wrapper (similarly like a gui interface) around the cli.

you can make a website with a menu option for instance and by clicking a button a particullar command will send as subprocess to cli, then response from cli will be saved and send to web interface.

just learn some web framework, flask would be good for this i believ


RE: Python to interact with the Linux Command Line - Centos/RHEL - redhat_boy - May-10-2020

(May-09-2020, 04:52 PM)experimental Wrote: dont know if i understand well, but it should be possible making a website interface - just as a wrapper (similarly like a gui interface) around the cli.

you can make a website with a menu option for instance and by clicking a button a particullar command will send as subprocess to cli, then response from cli will be saved and send to web interface.

just learn some web framework, flask would be good for this i believ

Thank you very much @experimental for your reply.

I will look into that further.