0

I have built a python parser that lets the user enter certain search parameters and then searches through a set of syslogs looking for specific information. When there is a match it writes the lines to a separate text document so that the user can review/save the output. All works great, but as of now its all done via CLI on a local PC.

The next step in my project I want to be able to host a web server whereby users can upload their syslogs from their PC to a front end website, and have my python parser do a search based on their search parameters and then print the result to the webpage. Is this possible? I have been playing with DJANGO a bit, but its becoming clear that this might not be the best route to go.

I was thinking maybe using the Python HTTP simple server as an alternative?

2
  • what is the problem with Django? as jonzlin95 already mentioned it is easy to run the function with Django. Do you have any experience with web development? If you just want your code to run maybe you should ask somebody to write the site for you and concentrate on improving your own code instead of learning HTML,CSS,JS,Django just to show your function... Commented May 30, 2017 at 19:24
  • @hansTheFranz Thanks for the advice. Web Dev skills are not my strong point, but I am using this project as a way to learn. Now that I know its possible, I should be good. Thanks again. Commented May 30, 2017 at 20:57

1 Answer 1

1

Django vs Simple python HTTP doesn't matter, to run a command line program from the python interpreter is simple just use

import os
os.system("curl X")

To run the python script just move the script to where your HTTP stuff is, and import it

from SCRIPT import FUNCTION

FUNCTION()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.