파이썬으로 파일을 열고 작업하고 싶지만 전체 경로 대신 파일을 참조 할 때 %systemdrive%
을 사용하고 싶습니다. 이 코드 조각 작품 :파이썬에서 % systemdrive % 사용하기
if not os.path.isfile('C:\\Work\\test\sample.txt'):
이되지 않습니다
if not os.path.isfile('%systemdrive%\\Work\\test\\sample.txt'):
어떤 생각? 미리 감사드립니다.
감사합니다. :) – Michel