-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic expanduser for path #915
Comments
BoPeng
pushed a commit
that referenced
this issue
Mar 7, 2018
However, this makes the |
BoPeng
pushed a commit
that referenced
this issue
Mar 8, 2018
BoPeng
pushed a commit
that referenced
this issue
Mar 15, 2018
BoPeng
pushed a commit
that referenced
this issue
Mar 15, 2018
BoPeng
pushed a commit
to vatlab/sos-docs
that referenced
this issue
Mar 15, 2018
How does this work now? Is there a way to automatically do this? |
This is already the case. With the following code, print(path('~/Download'))
prints the expanded path. |
I'm sorry, I should be in the pathlib GitHub. Thanks @BoPeng. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Our
path
type is derived frompathlib.Path
with additional format operators, and likePath
, we will have to useexpanduser()
to expand~
:Since
path
is a SoS type and SoS automatically expand~
, I believe we should treatas
The problem is that we will have to redefine many functions such as
exists
,is_dir
,is_file
, ..., and it does not look right if we automatically change the string representation of input pathThe text was updated successfully, but these errors were encountered: