[issue37306] "~/" not working with open() function in posix systems

2019-06-16 Thread Steven D'Aprano
Steven D'Aprano added the comment: Support for "~" isn't strictly part of the POSIX file system standard, it is a *shell* shortcut. As far as the file system is concerned, "~" is just a regular character like any other. -- nosy: +steven.daprano

[issue37306] "~/" not working with open() function in posix systems

2019-06-16 Thread SilentGhost
SilentGhost added the comment: Yes, '~' is not working out of the box and never had. You need to use os.path.expanduser or pathllib.Path.expanduser to get the useable path. -- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed

[issue37306] "~/" not working with open() function in posix systems

2019-06-16 Thread flipchan
flipchan added the comment: scratch """ However, "~/" is working with os.path modules: os.path.isfile("~/.hey") """ that's not working either -- ___ Python tracker

[issue37306] "~/" not working with open() function in posix systems

2019-06-16 Thread flipchan
New submission from flipchan : "~/" 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: