[Tutor] XML-RPC data transfers.
Hugo González Monteverde
hugonz-lists at h-lab.net
Thu Jan 11 08:13:55 CET 2007
Luke Paireepinart wrote:
> But the main strategy is to get the data out of the ImageGrab object.
> one way is stated above - use the save method to write to a file.
> another possible way is to create a filelike class, implementing 'tell'
> 'seek' and 'write' methods, that just collects all the data written to
> it and keeps it in memory
> rather than writing it out to a file.
> This is hinted at in the documentation for im.save():
> "You can use a file object instead of a filename. In this case, you must
> always specify the format. The file object must implement the *seek*,
> *tell*, and *write* methods, and be opened in binary mode."
> (I assume it means you can use a file-like object, also, but it's
> possible that you can't, and I leave it to you to test that :) )
hmmm StringIO module maybe?
Hugo
More information about the Tutor
mailing list