I'm writing this basic code , now i want to give 777 to ctp directory.. what is the best way to do that
import os
import sys
print ("Checking all required directories first...")
def checkDir():
x='/home/aspx/psharma1'
if os.path.isdir('x/tmp/ctp'):
print("Directory /x/tmp/ctp exists..")
else:
os.mkdirs("/x/tmp/ctp")