python:实现如果不存在,则创建目录dir
import os # Import the OS module
MESSAGE = "The directory already exists."
TESTDIR = "testdir"
try:
home = os.path.expanduser(
"~"
) # Set the vari
import os # Import the OS module
MESSAGE = "The directory already exists."
TESTDIR = "testdir"
try:
home = os.path.expanduser(
"~"
) # Set the vari