New submission from flipchan <flipc...@riseup.net>:

"~/" being a shortcut to the current home directory on posix systems(bsd/linux).
its not working with the build in open() function open:

It works to get the path as a string:
    with open(str(Path.home())+'/.hey', wb') as minfil:                         
                              
        minfil.write(nycklen)
        
But not out of the box:        
    with open('~/.hey', 'wb') as minfil:
        minfil.write(nycklen)          
 
        
   
However, "~/" is working with os.path modules:   
     os.path.isfile("~/.hey")


Tested with Python 3.6.8

----------
components: Library (Lib)
messages: 345743
nosy: flipchan
priority: normal
severity: normal
status: open
title: "~/" not working with open() function in posix systems
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37306>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to