[Tutor] symlinking dirs with spaces
eryksun
eryksun at gmail.com
Fri Apr 26 22:52:34 CEST 2013
On Fri, Apr 26, 2013 at 8:10 AM, mike <mike at froward.org> wrote:
>
> def link():
> print "Adding %s to %s..." % (origFul, loadDir)
> os.symlink('origFul', 'media')
Your arguments for symlink() are string literals. How about this?
LOAD_DIR = "/opt/data/music/load"
def link(media):
src = os.path.abspath(media)
dst = os.path.join(LOAD_DIR, os.path.basename(media))
print "Adding %s to %s..." % (src, LOAD_DIR)
os.symlink(src, dst)
More information about the Tutor
mailing list