Menu



Manage

Cord > Study_Python 전체 다운로드
Study_Python > make/3Show.py Lines 24 | 522 바이트
다운로드

                        #test03.py
import info
import os

if not os.path.exists(info.basepath):
    os.mkdir(info.basepath)
else : 
    print("exist:", info.basepath)

subfullpath = info.basepath + info.subpath
if not os.path.exists(subfullpath) :
    os.mkdir(subfullpath)
else :
    print("exist:", subfullpath)


if not os.path.exists(info.subfullfile) :
    f = open(info.subfullfile, 'w')
    f.write("KSH")
    f.close()
    print("MAKE FILE")
else:
    with open(info.subfullfile, 'r') as f :
        print(f.read())