1

i have this script for summarizing text and want to take the input from html text fields to input it to the script and them show the results on the page.

i currently have

title = raw_input('Type a title for the text here:')
content = raw_input('Type the text to be summarized here:')

how can i change this to get the input from the html form?

Title:< input type = "text>
Content:< input type = "text>
3
  • Is this in the context of a website, or do you want to use an offline webpage? Commented Feb 17, 2014 at 17:42
  • Why do you want to do this? Commented Feb 17, 2014 at 18:31
  • to make it easier to use the script on possibly put it online Commented Feb 17, 2014 at 18:33

1 Answer 1

1

I am not sure what do you mean when you say you want it as an offline webpage. You will need to use a server to handle that. This article here: http://docs.python.org/2/howto/webservers.html explains such a system. Once you are ready to put this on a server, you may take a look at http://learnpythonthehardway.org/book/ex51.html on how to handle web-forms with python.

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.