Categories
5G Network
Agile
Amazon EC2
Android
Angular
Ansible
Arduino
Artificial Intelligence
Augmented Reality
AWS
Azure
Big Data
Blockchain
BootStrap
Cache Teachniques
Cassandra
Commercial Insurance
C#
C++
Cloud
CD
CI
Cyber Security
Data Handling
Data using R
Data Science
DBMS
Design-Pattern
DevOps
ECMAScript
Fortify
Ethical Hacking
Framework
GIT
GIT Slack
Gradle
Hadoop
HBase
HDFS
Hibernate
Hive
HTML
Image Processing
IOT
JavaScript
Java
Jenkins
Jira
JUnit
Kibana
Linux
Machine Learning
MangoDB
MVC
NGINX
Onsen UI
Oracle
PHP
Python
QTP
R Language
Regression Analysis
React JS
Robotic
Salesforce
SAP
Selenium
Service Discovery
Service Now
SOAP UI
Spark SQL
Testing
TOGAF
Research Method
Virtual Reality
Vue.js
Home
Recent Q&A
Feedback
Ask a Question
What’s The Process To Get The Home Directory Using ‘~’ In Python?
Home
>
Python
>
What’s The Process To Get The Home Directory Using ‘~’ In Python?
Dec 22, 2019
in
Python
Q: What’s The Process To Get The Home Directory Using ‘~’ In Python?
#python-directory
1
Answer
0
votes
Dec 22, 2019
You need to import the os module, and then just a single line would do the rest.
import os
print (os.path.expanduser('~'))
Output:
/home/runner
Click here to read more about Python
Click here to read more about Insurance
Facebook
Twitter
LinkedIn
Related questions
0
votes
Q: Does The Functions Help() And Dir() List The Names Of All The Built_in Functions And Variables in Python? If No, How Would You List Them in Python?
Jun 28, 2020
in
Python
#python-help
#python-dir
#python-directory
#dir-python
#python-built-in-functions
#python-variables
0
votes
Q: What's the cycle to get the home index utilizing '~' in Python Language?
Aug 29, 2020
in
Python
#python-utilization
0
votes
Q: Write a Docker file to create and copy a directory and built it using python modules in Devops?
Apr 5, 2020
in
DevOps
#docker-directory
0
votes
Q: You are having multiple Memcache servers running Python, in which one of the memcacher server fails, and it has your data, will it ever try to get key data from that one failed server?
Jan 2
in
Python
#python-memcache
0
votes
Q: How to save an image locally using Python in which we already know the URL address?
May 23, 2020
in
Python
#python-url-address
#pthon-save-image
#save-image-python
0
votes
Q: When using the Python shell and code block, what triggers the interpreter to begin evaluating a block of code?
Jun 24, 2020
in
Python
#python-shell
#python-code-block
#python-triggers
#python-interpreter
...