Searching for the best scripting language,
Steve Lamb
grey at despair.dmiyu.org
Mon Jun 14 18:58:08 EDT 2004
On 2004-06-14, Carl Banks <imbosol at aerojockey.invalid> wrote:
> Of course you can.
> import glob
> import os
> import re
> f = {}
> for pattern in ("*.rar.*","*.r[0-9][0-9].*"):
> for listing in glob.glob(prefix+pattern):
> f[listing] = None
> for filename in f:
> os.system("cat %s.* > %s" % (sesc(filename),sesc(filename)))
Ah, grab anything with a rar extension and more (badly split usenet
binaries?) and splice them together.
> I don't know what sesc is. I assume he had defined it elsewhere,
Stab in the darb based on the cat call as well as the purpose of this
snippet I would surmise "space escape". IE, escape possible spaces in the
file name so as not to flub the command line that hits the system call.
--
Steve C. Lamb | I'm your priest, I'm your shrink, I'm your
PGP Key: 8B6E99C5 | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------
More information about the Python-list
mailing list