[Pythonmac-SIG] Best Way to Copy Resource Fork Data?

Paul Baker baked@attglobal.net
Thu, 13 Jan 2000 18:52:00 -0800


I'm looking for suggestions on the best way to copy the resource fork data 
from one file to another.  Currently, I am using the following (in a nutshell):

file1 = ('Macintosh HD:TEST.EPS')
file2 = ('Macintosh HD:TEST2.EPS')
x = MacOS.openrf(file2, 'w')
y = MacOS.openrf(file1, 'w')

input = y.read(1000000)   # <----  This is the problem part!
x.write(input)

x.close
y.close

If I do the following for the problem line:

input = y.read()

then I get a the following TypeError:

TypeError: function requires exactly 1 argument; 0 given

I'm pretty new to Python and this is my first attempt at using it on a Mac 
so I'm sure there is a better way to do this (I hope!).

Any help will be greatly appreciated.

Thanks

Paul