1
0
mirror of https://github.com/balkian/gists.git synced 2025-08-23 15:12:21 +00:00

Move files

This commit is contained in:
J. Fernando Sánchez
2021-10-30 15:23:01 +02:00
parent f798a3e673
commit f48bab94dd
113 changed files with 1 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
a = u"codificación"
print a # u"codificación"
print type(a) # <type 'unicode'>
b = a.encode("utf-8")
print b # codificación # But it depends on your terminal settings
print type(b) # <type 'str'>
c = b.decode("utf-8")
print type(c) # <type 'unicode'>
print c # u"codificación"

View File

@@ -0,0 +1,15 @@
#!/usr/bin/python
from flask import Flask, request, Markup
app = Flask("prueba")
@app.route("/")
def home():
args = ("<pre>")
for i in request.args:
a = request.args[i]
args += u"{} [{}]: {}\n".format(i, Markup.escape(str(type(a))), a)
args += "</pre>"
return args
app.run(debug=True)