We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
os.expandTilde may support "~user", in addition to path beginning with "~"
os.expandTilde
"~user"
"~"
Python's os.path.expanduser support both '~' and '~user'
os.path.expanduser
'~'
'~user'
And there's a TODO in source code of os.expandTilde:
# TODO: handle `~bob` and `~bob/` which means home of bob
Also, if ~user cannot be replaced, the path will be returned AS-IS.
~user
No response
import std/os echo os.expandTilde("~root")
This is an expansion to the previous procedure.
A few path that didn't be expanded will be.
https://docs.python.org/3/library/os.path.html#os.path.expanduser
A todo in issue #8177 make extractFilename("~bob") work
The text was updated successfully, but these errors were encountered:
I'm working on it.
Mostly done, just testing.
Sorry, something went wrong.
feat(os): expandTilde supports "~bob". closes nim-lang#24655
b9c9e90
Successfully merging a pull request may close this issue.
Summary
os.expandTilde
may support"~user"
, in addition to path beginning with"~"
Description
Python's
os.path.expanduser
support both'~'
and'~user'
And there's a TODO in source code of
os.expandTilde
:Also, if
~user
cannot be replaced, the path will be returned AS-IS.Alternatives
No response
Examples
Backwards Compatibility
This is an expansion to the previous procedure.
A few path that didn't be expanded will be.
Links
https://docs.python.org/3/library/os.path.html#os.path.expanduser
A todo in issue #8177 make extractFilename("~bob") work
The text was updated successfully, but these errors were encountered: