wxPython: images from URLs

Jonathan Daugherty cygnus at cprogrammer.org
Thu Jan 29 23:44:47 EST 2004


# Why wouldn't you use wxBitmapFromImage?

The api docs suggest that using the wxBitmap(image) constructor
is better.  Besides: this is beside the point -- this code fails:

  stream = cStringIO.StringIO(imgdata)
  imgobj = wx.wxImage(stream)

The second line raises a TypeError: "String or Unicode type
required."

-- 

  Jonathan Daugherty
  http://www.cprogrammer.org

  "It's a book about a Spanish guy called Manual, you should read it."
                                                            -- Dilbert




More information about the Python-list mailing list