Write then read a cookie in Python

Nigel Wright 291 Reputation points
2021-11-06T18:34:31.747+00:00

I need to store a cookie on client side then read it back to update information then send it again.
My code passes syntax ok and runs with no errors but doesnt read/write the cookies

def readcookiestring() :
cname = 'nigel1234567890'
global cookiestring
cookiestring = ""
try:
res=make_response()
cookiestring = request.cookies.get(cname)

except Exception as e:
    messagebox.showinfo("rd ",e)

messagebox.showinfo("rd ",cookiestring)
return

def writecookiestring():
global cookiestring
cookiestring="a string"
cname = 'nigel1234567890'
try:
res = make_response()
res.set_cookie(cname, "cookiestring")
except Exception as e:
messagebox.showinfo("wr ",e)

return
Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,249 questions
No comments
{count} votes