Loading views...
python NAS 검증 툴

python NAS 검증 툴

Date
Date
2020 Jan 22 0:0
Created by
Created by
Seonglae ChoSeonglae Cho
Created time
Created time
2023 Feb 28 12:39
Last edited by
Last edited by
Seonglae ChoSeonglae Cho
Last edited time
Last edited time
2023 Apr 15 16:52
Refs
Refs

Object - Nas File Inspect Integrity Program

EOF line 복붙 하다가 난다 - 이상한 파이썬
 
notion image
파일 구조는 이렇게 만들고
 
 
notion image
메인에서 이렇게 recursive 부른다
 
 
 

os.walk 가 파일 상대경로 안줘서 상대경로 구해야함

recutsive indent 넣기 귀찮아서 그냥 새로 만들라고
 
 
 
  • try except 로 file exection error
파이썬 파트12. 예외처리 - try / except, raise
try hello world 파이썬 입문 강의 파이썬으로 프로그래밍 중에 다양한 에러가 발생할 수 있다. 이 에러가 발생하는 예외상황은 유연하게 프로그래밍을 할 수 있는 도구가 되기도 한다. 에러가 발생할 것 같은 코드를 try안에 넣고 except 뒤에 발생할 수 있는 에러의 이름을 적어두면, 에러 발생시 프로그램이 멈추지 않고 별도 처리가 가능하다.
파이썬 파트12. 예외처리 - try / except, raise
 
 
 
bcolors
Setting Text ForeGround Color. This can be used with Print Statement. Eg: Python3.x: import bcolors as b print(b.OK + "Color Statement" + b.END) Python2.x: import bcolors as b print b.OK + "Color Statement" + b.END Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
bcolors
요거 더해주고
 
notion image
 
Python | os.path.relpath() method - GeeksforGeeks
OS module in Python provides functions for interacting with the operating system. OS comes under Python's standard utility modules. This module provides a portable way of using operating system dependent functionality. os.path module is sub module of OS module in Python used for common path name manipulation.
Python | os.path.relpath() method - GeeksforGeeks
위키독스
온라인 책을 제작 공유하는 플랫폼 서비스
위키독스
 
재귀 귀찮다.. 그냥 relpath랑 walk 로 구현
 
 
 
 
 
 
 
 
 

Recommendations