[Tutor] Creating folders in windows...
Chris Hengge
pyro9219 at gmail.com
Thu Oct 12 00:00:07 CEST 2006
I found this from a 2004 mailing on this list..
os.path.mkdir('folder')
Doesn't work... there is no mkdir in os.path (old style maybe?)
>>> os.path.mkdir('folder')
Traceback (most recent call last):
File "<input>", line 1, in ?
AttributeError: 'module' object has no attribute 'mkdir'
>>> dir(os.path)
['__all__', '__builtins__', '__doc__', '__file__', '__name__',
'abspath', 'altsep',
'basename', 'commonprefix', 'curdir', 'defpath', 'devnull', 'dirname',
'exists',
'expanduser', 'expandvars', 'extsep', 'getatime', 'getctime',
'getmtime', 'getsize',
'isabs', 'isdir', 'isfile', 'islink', 'ismount', 'join', 'lexists', 'normcase',
'normpath', 'os', 'pardir', 'pathsep', 'realpath', 'sep', 'split',
'splitdrive',
'splitext', 'splitunc', 'stat', 'supports_unicode_filenames', 'sys', 'walk']
Anyways... could someone please point me in the right direction?
I can use os.system('md test'), but that isn't cross platform...
Hopefully nothing is wrong with my python installation.
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061011/9b0bf72a/attachment.htm
More information about the Tutor
mailing list