python mkdir ~/.foo
This is probably simple but I just can't seem to find the answer.
From the command line mkdir ~/.foo will make a directory .foo/ in the home folder of the current user. in python import os os.mkdir("~/.foo") Will die with an error Code:
SyntaxError: invalid syntax |
I was right it was simple.
import os,os.path homedir = os.path.expanduser('~') foo_folder = homedir + "/.foo" os.mkdir(foo_folder) |
All times are GMT -5. The time now is 08:33 PM. |