Copy an Object (Again?)
Schüle Daniel
uval at rz.uni-karlsruhe.de
Fri Jan 6 15:29:11 EST 2006
I was not very clear about it
> or even if you "could" copy instances
>
> class X:
> def __init__(self, filename = "/path/file")
> self.file = file(filename, "w+")
> def modifyByteAt(offset):
> self.file.tell(offset)
> self.file.write("X")
>
> this is untested pseudocode, it should only give you an idea
even when x=X() and y=copyItSomehowFrom(x)
what is supposed to be copied?
the whole file? but where?
in your case .. what is supposed to happen with the mirrored image?
should it be mirrored inplace
if I recall properly in "import PIL.Image as image" if you image.open
an image and want to mirror it you can create a real copy
and then "save as " it into a file
my 2 cents
More information about the Python-list
mailing list