Hi Mark,

On Sun, Sep 13, 2009 at 8:07 AM, Mark <marklawso...@gmail.com> wrote:

>
> Hi, I am trying to allow users of my app to download binary files
> which are created on the fly. These files will contain model data in
> binary format.
>
> I am doing the following now;
>
>  def post(self):
>    self.response.headers["Content-Type"] = "application/octet-stream"
>    self.response.headers["Content-Disposition"] =
> "attachment;filename=license.bin"
>    self.response.out.write(89372379324)
>
> However I have found out that out.write is actually writing strings..
> how I can change this to write a binary file?
>

Python raw strings _are_ binary. What is the desired output of your snippet
above?

-Nick


>
> >
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to