I want to return 4 bytes of data from AppEngine (Python).
In some cases I want to return a), in some cases b)
a) 393217 = 0x60001
b) 393218 = 0x60002
The trouble is, If I just write out the base10 number to the output stream like this:
class MyClass(webapp.RequestHandler):
def get(self, option):
self.response.out.write(393217)
It returns 6 bytes of data, which is correct if 393217 was interpreted as a string. But I want to return just 4 bytes 0x00060001
Any ideas?
Thanks
Ok, it seems If I do this:
I get the 4 bytes I’m after.