Python Forum
creating my own file-like object - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: creating my own file-like object (/thread-36308.html)



creating my own file-like object - Skaperen - Feb-06-2022

how much must i implement to create a file-like object that can have a reference to it passed along as argument one in open() as well as the file object in other functions like bz2.open() (an arbitrary example). i am making an I/O-like data filter but suspect i cannot thoroughly make test code for it. i will be making objects for reading and objects for writing but no objects for both reading and writing although that might also be interesting.