1 Reusable Code Snippet Topic

Remove Filter
Member Avatar for
Member Avatar for Gribouillis

Any sequence of python strings can be disguised to look like a file opened for reading, which can then be passed on the fly to functions expecting such an input file. This code snippet defines the necessary adapter class. The obtained file-like objects store only one string of the sequence …

Member Avatar for Gribouillis
2
1K

The End.