def openStream(self, source):
<EOL>if hasattr(source, '<STR_LIT>'):<EOL><INDENT>stream = source<EOL><DEDENT>else:<EOL><INDENT>stream = StringIO(source)<EOL><DEDENT>return stream<EOL>
Produces a file object from source.

        source can be either a file object, local filename or a string.