[Tutor] os.symlink can't find target

Cameron Simpson cs at zip.com.au
Wed Feb 26 23:04:16 CET 2014


On 26Feb2014 15:41, Bob Williams <linux at barrowhillfarm.org.uk> wrote:
> Many thanks for your helpful comments. I do still have some problems
> with my script, but it's probably better to start a new thread with an
> appropriate subject.

Very true.

> I'm a bit new to Python, so it still seems like magic sometimes
> (someone else said the same in a different thread). A lot of my coding
> is 'trial & error', and I'll admit that at the moment my main goal is
> getting things to work; after that I can explore making my code more
> efficient/readable etc. But I appreciate your suggestions.

Readable helps. Even for the author (when you come back later,
not to mention when trying to explain the code to others).

> >> linkName1 = pathList[j][0:-3] + "mp3"
> > 
> > Isn't this exactly the same as pathList[j] ?
> > 
> Actually, no. pathList[j] can contain either .mp3 files or .flac
> files.

Except that I thought this was inside the if-statement, so you know that this
time it is an mp3.

Cheers,
-- 
Cameron Simpson <cs at zip.com.au>

Trust the computer industry to shorten Year 2000 to Y2K. It was this
thinking that caused the problem in the first place.
- Mark Ovens <marko at uk.radan.com>


More information about the Tutor mailing list