Want to inherit from file

Franz GEIGER fgeiger at datec.at
Fri Nov 10 05:50:33 EST 2000


I'd like to inherit from file to add some functionality:

class MyFile(File):
   def __init__(...):
      :
      :
   def CopyTo(otherLocation):
      :
      :

   def MoveTo(newLocation):
      :
      :
etc.

 As a file object comes into existence by calling f=open() and not something
like f=File(), I guess there is no regular way to do it.

Any idea how to overcome this?

Best regards
Franz GEIGER






More information about the Python-list mailing list