[Level 1] How to get user home directoy in Python
#!/bin/env python import os print os.path.expanduser('~') print os.path.expanduser('~stanley') print os.environ['HOME']
./getUserHomeDirectory.py /home/stanley /home/stanley /home/stanleyWish this helps.
regards,
Stanley Huang
Comments
Post a Comment