[OFF] Python, how to copy file with res fork

Stephan Huber ratzfatz at digitalmind.de
Fri May 30 17:15:48 CDT 2003



--On Freitag, 30. Mai 2003 17:30 Uhr +0300 Ruslan Zasukhin 
<sunshine at public.kherson.ua> wrote:

> Anybody know how make Python copy such files correctly ?

You can invoke ditto from python. ditto is a clt which is capable copying 
files with resourcefork, add -rsrcFork as parameter. See the man-page for 
more details.

a la:

system("/usr/bin/ditto -rsrcFork /path/to/source/file 
/path/to/destination");

I am not sure, if ditto is part of the bsd-subsystem, or part of the 
developer-tools. Anybody?

HTH,
Stephan


More information about the Valentina mailing list