def disk_size(path):
total=os.path.getsize(path)
if os.path.isdir(path):
pathd=os.listdir(path)
for f in pathd:
total=total+disk_size(f)
elif os.path.isfile(path):
total=os.path.getsize(path)
print({0:<7} {1}).format(total, path)
return total
path=raw_input()
if path==os.path.exists(path):
print disk_size(path)
이게 코드 인데 틀린건 없는거 같은데 왜 안되는지 모르겠네요.. 파이썬 배운지 얼마 안되서 익숙하지가 않아서.. 왜 안되는지만 좀 알려주세요 ㅜ
바로 밑에 써놨으니 이 경우인가 봐바.
음 왜 안되는지 모르겠네요;; 백슬래시도 슬래시도 안되는데 인터넷에서 좀 찾아봐야할거같아요 감사합니다 ㅜ
path==os.path.exists(path):
os.path.exists의 리턴값이 bool인데 path 문자열이랑 같을 수가 없지
아..저기 왜저렇게 썻지 감사합니다
되서->돼서 (되어 = 돼임) [리듬 맞춤법 봇♬]