MCPcopy
hub / github.com/InstaPy/InstaPy / get_home_path

Function get_home_path

instapy/file_manager.py:123–136  ·  view source on GitHub ↗

Get user's home directory

()

Source from the content-addressed store, hash-verified

121
122
123def get_home_path():
124 """Get user's home directory"""
125
126 if python_version() >= "3.5":
127 from pathlib import Path
128
129 home_dir = str(Path.home()) # this method returns slash as dir sep*
130 else:
131 home_dir = expanduser("~")
132
133 home_dir = slashen(home_dir)
134 home_dir = remove_last_slash(home_dir)
135
136 return home_dir
137
138
139def slashen(path, direction="forward"):

Callers 1

get_workspaceFunction · 0.85

Calls 2

slashenFunction · 0.85
remove_last_slashFunction · 0.85

Tested by

no test coverage detected