저는 파이썬 3을 사용하는 OS X 플랫폼을 사용하고 있으며 디렉토리로 링크되는 파일 경로를 만드는 방법을 잘 모릅니다. 나는 Windows 플랫폼에서 다음과 같이 보일 것이라고 생각합니다.Mac에서 파일 경로를 만들려면 어떻게해야합니까?
import os
path = 'C:\\Users\\User\\Desktop\\<directory name>'
os.mkdir(path)
file = open(path + '\\<file name>.txt', w)
[Mac에서 파일의 디렉토리 주소 찾기] (http://stackoverflow.com/questions/3324486/finding-a-files-directory-address-on-a-mac) – OzizLK
가깝지만 나는 그 디렉토리를 만들고있다. 'os.mkdir()'은 OSX에서 windows와 동일한 기능을합니까? 이 경우 – Jason
이 도움이됩니다. [http://stackoverflow.com/questions/273192/how-to-check-if-a-directory-exists-and-create-it-if-necessary](http://stackoverflow .com/questions/273192/os.makedirs를 사용하여 필요한 경우 디렉토리를 확인하고 필요한 경우). –