[New-bugs-announce] [issue29831] os.path.exists seems can not recgnize "~"

quanyechavshuo report at bugs.python.org
Thu Mar 16 21:43:15 EDT 2017


New submission from quanyechavshuo:

os.system is ok to recgnize "~",but os.path.exists can not recgnize "~".

eg:

#1.py:
import os
os.system("ls -al ~/.zshrc")

python3 1.py

output:
-rw-r--r--  1 root  wheel  5391  3 14 18:12 /var/root/.zshrc


#2.py:
import os
a=os.path.exists("~/.zshrc")
print(a)

python3 2.py

output:
False

----------
messages: 289740
nosy: quanyechavshuo
priority: normal
severity: normal
status: open
title: os.path.exists seems can not recgnize "~"
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29831>
_______________________________________


More information about the New-bugs-announce mailing list