Iñigo Serna added the comment:
Mainly, 2 reasons:
- It can make programs crash *unexpectedly*
- Pathlib should provide a complete and uniform API for dealing with all types
of files. If not, users would need to use Pathlib for some kind of files and go
to os and os.path for others, then why
New submission from Iñigo Serna:
Pathlib .owner() and .group() methods fail on broken symlinks.
They use:
return pwd.getpwuid(self.stat().st_uid).pw_name
and:
return grp.getgrgid(self.stat().st_gid).gr_name
It should be self.lstat().
Attached simple fix as unified diff
Iñigo Serna inigose...@gmail.com added the comment:
Q. Why not change getch() to always use get_wch()?
This could break backwards compatibility.
There are some code out there that may use getch() to get the bytes
stream one by one and build the wide char.
In fact I'm using this trick to get
Iñigo Serna inigose...@gmail.com added the comment:
Btw, I don't know if this is the best place to comment it but as it is
somehow related with ncurses...
Other functions I miss a lot are wcwidth() and wcswidth().
These functions return the real width (read, cells length in screen
Changes by Iñigo Serna inigose...@gmail.com:
Added file: http://bugs.python.org/file14782/test_ucs2w.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6755
Changes by Iñigo Serna inigose...@gmail.com:
Added file: http://bugs.python.org/file14783/ucs2w.c
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6755
Iñigo Serna inigose...@gmail.com added the comment:
Thanks for the pointer, haven't seen anything when I searched for get_wch.
The patch provided here only adds this get_wch function, because as A.M.
Kuchling explained in issue700921, it's possible to use wide chars now,
the only feature
Iñigo Serna inigose...@gmail.com added the comment:
In issue6755 I provide a patch to support get_wch, which is the only
wide chars related feature I miss in current bindings (as python v2.6.2
or v3.1.1).
--
nosy: +inigoserna
___
Python tracker rep
New submission from Iñigo Serna inigose...@gmail.com:
Currently,there is no a simple way in curses bindings to get the code
associated with a key press of non ascii keystroke (f.e. ç) in terminals
configured with UTF-8 encoding.
getch returns the code for a wide character byte a byte
Iñigo Serna inigose...@gmail.com added the comment:
Added patch for the documentation
--
keywords: +patch
Added file: http://bugs.python.org/file14753/curses.get_wch.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6755
Iñigo Serna inigose...@gmail.com added the comment:
Added test example
--
Added file: http://bugs.python.org/file14754/test_get_wch.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6755
Iñigo Serna inigose...@gmail.com added the comment:
Added missing file: patch against Python v2.6.2
--
Added file: http://bugs.python.org/file14755/_cursesmodule.get_wch.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6755
Iñigo Serna inigose...@gmail.com added the comment:
Added patch against Python v3.1.1.
NOT TESTED!
--
versions: +Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14756/_cursesmodule.311.get_wch.patch
___
Python tracker rep
13 matches
Mail list logo