よく忘れるのでメモ
home_directory.py
import os
print os.environ['HOME']
追記
winにも対応するなら
from os.path import expanduser
home = expanduser("~")
参考: https://stackoverflow.com/questions/4028904/how-to-get-the-home-directory-in-python
Go to list of users who liked
More than 5 years have passed since last update.
よく忘れるのでメモ
import os
print os.environ['HOME']
winにも対応するなら
from os.path import expanduser
home = expanduser("~")
参考: https://stackoverflow.com/questions/4028904/how-to-get-the-home-directory-in-python
Register as a new user and use Qiita more conveniently
Go to list of users who liked