Answer the question
In order to leave comments, you need to log in
How to copy to clipboard in flask?
I am slowly learning web programming, twisting Flask. I came up with a project - a site parser. By clicking on the button, you need to call a function that will parse the site and copy the text to the clipboard. Let's take the simplest code as an example:
from flask import Flask, request
app = Flask(__name__)
@app.route("/")
def hello():
return '<form action="/echo" method="GET"><input name="text"><input type="submit" value="Echo"></form>'
@app.route("/echo")
def echo():
return '<form action="/echo" method="GET"><input name="text"><input type="submit" value="Echo"></form>' +\
"You said: " + request.args.get('text', '')
if __name__ == "__main__":
app.run()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question