"David" <da...@abbottdavid.com> wrote
Forwarded to the list, I would also like to understand the forward slash;
os.system("mv %s/%s %s" % (src, fnames, dst))
The slash separates the file path, src, from the filename.
Thus if src is /foo/bar/baz
and fnames is spam
then %s/%s becomes
/foo/bar/baz/spam
Another way of doing the same thing would be with join:
'/'.join([src,fnames])
or for platform independance:
os.sep.join([src,fnames])
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor