uuid.UUID(bytes=x.bytes) form where bytes are passed

uuid.UUID(bytes=x.bytes) form where bytes are passed

Postby shiva » Wed Apr 23, 2014 1:07 pm

We should use uuid.UUID(bytes=x.bytes) form where bytes are passed in by reading from random() which in Python/FreeBSD is hooked to /xxx/random] We do generate CSRF token per user session. Could you please suggest me how to do in the Python using random from FreeBSD related.?!

Thanks in advance....it will helpful fr me


http://svn.python.org/projects/python/b ... ib/uuid.py
Last edited by stranac on Wed Apr 23, 2014 1:23 pm, edited 1 time in total.
Reason: First post lock.
shiva
 
Posts: 3
Joined: Wed Apr 23, 2014 1:04 pm

Re: uuid.UUID(bytes=x.bytes) form where bytes are passed

Postby Yoriz » Wed Apr 23, 2014 2:56 pm

You have a broken url.
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Spam topic disapproval technician
Windows7, Python 2.7.4., WxPython 2.9.5.0., some Python 3.3
User avatar
Yoriz
 
Posts: 837
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: uuid.UUID(bytes=x.bytes) form where bytes are passed

Postby shiva » Fri Apr 25, 2014 5:08 am

[quote="shiva"]We should use uuid.UUID(bytes=x.bytes) form where bytes are passed in by reading from random() which in Python/FreeBSD is hooked to /xxx/random] We do generate CSRF token per user session. Could you please suggest me how to do in the Python using random from FreeBSD related.?!

Thanks in advance....it will helpful fr me


http://svn.python.org/projects/python/b ... ib/uuid.py
shiva
 
Posts: 3
Joined: Wed Apr 23, 2014 1:04 pm

Re: uuid.UUID(bytes=x.bytes) form where bytes are passed

Postby shiva » Sat Apr 26, 2014 2:12 pm

x=ramdom.randint(1,10000)
uuid.UUID(bytes=x.bytes)
getting this kind of error...........!
AttributeError: 'int' object has no attribute 'bytes'
shiva
 
Posts: 3
Joined: Wed Apr 23, 2014 1:04 pm


Return to Web Development

Who is online

Users browsing this forum: No registered users and 1 guest