On Wed, 25 Nov 2009 01:11:29 -0000, Rhodri James <rho...@wildebst.demon.co.uk> wrote:

On Tue, 24 Nov 2009 21:20:25 -0000, utabintarbo <utabinta...@gmail.com> wrote:

On Nov 24, 3:27 pm, MRAB <pyt...@mrabarnett.plus.com> wrote:

.readlines() doesn't change the "\10" in a file to "\x08" in the string
it returns.

Could you provide some code which shows your problem?

Here is the code block I have so far:
for l in open(CONTENTS, 'r').readlines():
    f = os.path.splitext(os.path.split(l.split('->')[0]))[0]
    if f in os.listdir(DIR1) and os.path.isdir(os.path.join(DIR1,f)):
        shutil.rmtree(os.path.join(DIR1,f))
if f in os.listdir(DIR2) and os.path.isdir(os.path.join(DIR2,f)):
            shutil.rmtree(os.path.join(DIR2,f))

Ahem. This doesn't run. os.path.split() returns a tuple, and calling os.path.splitext() doesn't work.

I meant, "doesn't work on a tuple".  Sigh.  It's been one of those days.

--
Rhodri James *-* Wildebeest Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to