There is an html page. On the page:

<form> <input type='text'> </form> 

There is also a python script that counts the number of characters in the request. Question: How can the script process the request from the form and return the script response to the browser window?

  • On Python, there are many libraries to work with the web. Which library does your "python script counting the number of characters in the query" use ? - jfs
  • None It is simply used: input () - we receive request and a method len () - we consider quantity. With what will be the processing of the request - everything seems to be clear. It is not clear how to transfer the request to the processing script, and then return it back to the browser. And so, if I understood the question correctly, BeautifulSoup will continue to handle the response to the request. - I'amNotYou
  • "it is not clear how to transfer the request to the processing script." Who told you that you can read the request using input() ? (this is possible, but it is not the only or the most preferred method). If you think that the server can probably use BeautifulSoup to process a request from an HTML form, then you do not have an adequate model about this process. It is easy to answer your question with code using one of the dozens of web framework — which one can be chosen depending on a specific task. If you forget how this is implemented, what problem are you trying to solve? - jfs
  • Normally, we are all so confused :) 1) I do not read the request input (), I input (), as an example, I pass the request. As if this request came not from input (), but from the same form. - I'amNotYou
  • The last comment went awry, I apologize. In general, initially the essence was this: there is a form, the user enters a request into the form, presses the send button and throws it onto the page where the number of characters (how many letters, characters) in his request is displayed to him in the browser. - I'amNotYou p.m.

0