I'd like to take advantage of the seekable() method of io.IOBase with existing open file objects, especially the standard in/out/err file objects. I know on Linux I can just do this:
fp = io.open("/dev/stderr") but that's kind of cheating. File objects in Python 2.7 aren't created using the io module's machinery. Assume somewhere else a plain old open file object, for example: fp = open("/some/path/to/nowhere.txt", "w") and wanted to treat fp as if it had been opened with the io module machinery, I don't see any sort of "fdopen" or "freopen" equivalent mentioned in the io module documentation. Is this possible in a clean way? Thx, Skip -- https://mail.python.org/mailman/listinfo/python-list