| 1 | initial version |
DSM's answer is good. Another option: from within Sage, you can also do
sage: from sage.misc.misc import sage_makedirs
sage: sage_makedirs('/tmp/new/directory/here')
This will create any intermediate directories as necessary. (This function runs os.makedirs(...), along with a little error-checking.)
| 2 | added preparser info |
DSM's answer is good. Another option: from within Sage, you can also do
sage: from sage.misc.misc import sage_makedirs
sage: sage_makedirs('/tmp/new/directory/here')
This will create any intermediate directories as necessary. (This function runs os.makedirs(...), along with a little error-checking.)
Re the preparser: to turn it off, just do preparser(False), then execute the command, then turn it back on with preparser(True).
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.