[Pythonmac-SIG] Strange question.....string -> Filehandle

Schollnick, Benjamin Benjamin.Schollnick@usa.xerox.com
Fri, 29 Jun 2001 08:57:02 -0400


Folks,

	I'm going to ask a slightly strange question...

	I'm using a procedure (3rd party), that I'd prefer not to modify...
	But it requires either a filename or a filehandle to be passed, so
	that it can read the material out of the file.

	But what I need to process is an XML data stream that I've already
	read in from the socket....

	Sure I could go redesign it, so that this routine automatically
reads
	it, but this procedure is rarely used...

	I've glanced, but didn't see a way to make the string "appear" to be
	a filehandle....

	I was tossing around the idea of opening a TEMPORARYFILE (errors
module?)
	writing the contents, and then passing the handle to the routine,
but....
	that seemed less elegant then I'd like...

			- Benjamin