I am new to python. I am trying to port a python 2 file to python 3. I understand that "file" is not a type in python 3, unlike in python 2. The class in my python 2 file is defined with a file object. I tried but could not find a way to port this to python 3.
class MyFile(file):
def __init__(self, fname):
file.__init__(self, fname, *args, **kwargs)
This class was used in the main module as follow:
fname = "myfile.bin"
f = MyFile(fname)
The above worked in python 2 but cannot work in python 3 because "file" is undefined. I know this looks simple to fix but I really cannot get it to work in python 3. Please help.