[Sugar-devel] [PATCH Browse] Error page SL #3500

Martin Langhoff martin.langhoff at gmail.com
Wed Sep 19 21:56:16 EDT 2012


On Wed, Sep 19, 2012 at 6:54 AM, Manuel Kaufmann <humitos at gmail.com> wrote:
> On Tue, Sep 18, 2012 at 10:58 PM, James Cameron <quozl at laptop.org> wrote:
>> Neat.  What method did you use to convert the image?
>
> Python... It is my best friend :)
>
>>>> import base64
>>>> base64.b64encode(open('browse-logo.png', 'r').read())

You have the file on-disk. It is inefficient to base64-encode it. Just
say img src="file://<path-to-image". Keep in mind location changes
slighly between rpm-installed activities and those in ~/Activities .

cheers,



m
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff


More information about the Sugar-devel mailing list