# encoding=gbk import os cwd = os.getcwd() updir = os.path.dirname(cwd) print cwd print updir new_dir = updir + '/' 'pic' if os.path.exists(new_dir): print '已经存在' else: print '新建%s' % new_dir os.mkdir(new_dir)