Prev: Richard Stallman's Interview - Well, it has to dump itself out. The reason is to avoid taking the time to load up the standard LISP code every time you start it, so it actually unexecs itself.
Next: Accumulate function in python
From: Nobody on 19 Jul 2010 14:46 On Mon, 19 Jul 2010 17:57:31 +0100, MRAB wrote: >> About this one. I tried the os.system copy. But it seems I cant find the >> right syntax. >> >> *os.system ("xcopy /s %s %s" % (dirname1, dirname2))* >> >> This one seems to not working. >> > In what way doesn't it work? > > If the names contain spaces then you need to quote them: > > os.system('xcopy /s "%s" "%s"' % (dirname1, dirname2)) No, you need to use subprocess.call() instead of os.system(). If you absolutely must use os.system() for some reason, at least quote the arguments correctly. If you want to know how to do this, look at the subprocess.py source code (hint: it's not as simple as the above suggests). |