<mkieverpy <at> tlink.de> schrieb: > and I could not find a replacement for 'FileType'. > Has this been overlooked? > > Found this thread which does not mention FileType: > http://mail.python.org/pipermail/stdlib-sig/2008-April/thread.html#172 > > I guess I just did not see something simple. > Anyone with a hint?
That's because this isn't simple. Python 3 doesn't have one file type. It has several different kinds of streams in the io module. If you're checking for a file type, you'll want to use isinstance(some_file, io.IOBase). If you're inheriting form it, I suggest you look at the io module's classes. -- http://mail.python.org/mailman/listinfo/python-list