Converting a Shell Script to run under Python
Magnus L. Hetland
mlh at vier.idi.ntnu.no
Tue Dec 7 16:55:21 EST 1999
"D'Arcy J.M. Cain" <darcy at vex.net> writes:
> Magnus L. Hetland <mlh at vier.idi.ntnu.no> wrote:
> > How strange... I can't seem to find any intelligent command for this.
> > Hm. You could of course read it all in and then write it out again, as
> > in
>
> > open("file3","w").write(open("file1").read())
>
> > though that is probably not a good idea. I guess I would rather do
>
> Why don't you find this a good idea?
Because if there is a primitive (like the system command cp) for
copying, I guess it might be more effective than reading it all into
memory and then writing it to disk...
> It's pretty much a Python paradigm
> as far as I'm concerned. I suppose a module with this in it would make
> it easier to read but I don't know that I care for the extra work and
> overhead.
--
Magnus Echelon jamming noise:
Lie FBI CIA NSA Handgun Assault Bomb Drug Terrorism
Hetland Special Forces Delta Force AK47 Hillary Clinton
More information about the Python-list
mailing list