Index: modlib/modeller/parallel/job.py =================================================================== --- modlib/modeller/parallel/job.py (revision 11699) +++ modlib/modeller/parallel/job.py (working copy) @@ -54,11 +54,18 @@ return 'localhost' def get_default_modeller_path(self): + def quote(pth): + # quote the path if it contains spaces so as to not confuse + # the shell + if ' ' in pth: + return '"%s"' % pth + else: + return pth bindir = modeller.info.bindir modpy = os.path.join(bindir, 'modpy.sh') modslave = os.path.join(bindir, 'modslave.py') if os.path.exists(modslave) and not _modeller.mod_embedded_get(): - path = sys.executable + " " + modslave + path = quote(sys.executable) + " " + quote(modslave) if os.path.exists(modpy): path = modpy + " " + path return path