Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to build the web interface for executing or doing linux tasks . Although there may be some existing tools but i have build a complete system on the top of that so i need to program that system myself.

1)Is Python/Django good for making that

2)E,g with basic commands like creating user / copying files , removing files. Is it better to use direct shell commands or python commands can be used for more safety

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Most scripting languages will have their own ways of executing system commands, so I'd recommend to go with what you're good at; but Python is a pretty good choice. It's great at stringing together a lot of other commands and it has a lot of well supported libraries for parsing the output and handling the web side of things.

As for executing the commands, I'd suggest sticking with Python wherever possible, as you'll find it easier to handle the error conditions. You probably won't be able to achieve everything you need that way, though. So, where you do have to fall back on system commands, take care to verify/sanitise your inputs. A missing variable, and extra space, or a file in the wrong place could have pretty catastrophic results. Not more than misusing the command line directly, of course, but with web interfaces you're at a remove from the command being run and you won't see the problem until it's too late.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.