Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Gareth Beacham

Gareth Beacham

Community Learner
Active in: SQL Server Python
Share
6Questions
3Answers
14.7KViews on questions

How to get the home directory in Python?

I will recommend to use os.path.expanduser(path) which works on both Unix and Windows,it returns the argument with an initial component of (tilt) ~ or ~user replaced by user’s home address. Ex- from os.path import expanduser home_address = expanduser("~") For Python 3.5 or more,you can use pathlib.Path.home() for…

Python

Answered Apr 10, 2021 · 3.5K Views Read answer →

More members from the SQL Server community

Learners asking and answering questions on the same topics — follow their questions and join in.

Latest SQL Server Blogs

Guides, tips and career advice on SQL Server from JanBask experts.

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.