Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python makedir

def mkdir(path):
    import os
    path=path.strip()
    path=path.rstrip("")
    isExists=os.path.exists(path)
    
    if not isExists:
        os.makedirs(path) 
        print path+' 创建成功'
        return True
    else:
        print path+' 目录已存在'
        return False

mkpath="d:qttcweb"
mkdir(mkpath)
Comment

PREVIOUS NEXT
Code Example
Python :: save model history keras 
Python :: python get array from json 
Python :: how to get the parent class using super python 
Python :: python randrange 
Python :: save object pickle python 
Python :: how to reshape dataframe in python 
Python :: time difference between two datetime.time 
Python :: add new row to dataframe pandas 
Python :: django order by foreign key count 
Python :: how to split a string with newline in python 
Python :: boids algorithm 
Python :: flask authentication user without database 
Python :: python add one month to a date 
Python :: pandas if else 
Python :: python calculator file size to megabytes 
Python :: how to learn python 
Python :: how to get scrapy output file in json 
Python :: heatmap in python 
Python :: pandas dataframe get first n rows 
Python :: sklearn ridge regression 
Python :: python string manipulation 
Python :: split a string into an array of words in python 
Python :: docker mount volume 
Python :: python dictionary multiple same keys 
Python :: python switch case 3.10 Structural Pattern Matching 
Python :: mutiple condition in dataframe 
Python :: how to update values in tkinter 
Python :: higlight words in python 
Python :: for loop get rid of stop words python 
Python :: how to import and use keyboard with pygame 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =