On Mon, Mar 27, 2017 at 8:52 PM, Barry wrote:
> I took to using
>
> chcp 65001
>
> This puts cmd.exe into unicode mode.
conhost.exe hosts the console, and chcp.com is a console app that
calls GetConsoleCP, SetConsoleCP and SetConsoleOutputCP to show or
modify the console's input and output c
I took to using
chcp 65001
This puts cmd.exe into unicode mode.
Of course the python 3.6 make this uneccesary i understand.
Barry
> On 24 Mar 2017, at 15:41, Ryan Gonzalez wrote:
>
> Recently, I was working on a Windows GUI application that ends up running
> ffmpeg, and I wanted to se
On 27 March 2017 at 13:10, Steve Dower wrote:
> On 26Mar2017 0707, Nick Coghlan wrote:
>>
>> Perhaps it would be worth noting in the table of error handlers at
>> https://docs.python.org/3/library/codecs.html#error-handlers that
>> backslashreplace is used by the `ascii()` builtin and the associat
On 26Mar2017 0707, Nick Coghlan wrote:
Perhaps it would be worth noting in the table of error handlers at
https://docs.python.org/3/library/codecs.html#error-handlers that
backslashreplace is used by the `ascii()` builtin and the associated
format specifiers
backslashreplace is also the default
Yes Python is turing complete, there is always a solution to everything.
You can also do decorators with func = wrapper(func) instead of
@wrapper, no need for a new syntax.
Le 26/03/2017 à 20:42, Chris Angelico a écrit :
> On Mon, Mar 27, 2017 at 5:22 AM, Michel Desmoulin
> wrote:
>>
>>
>> Le 26/
On Mon, Mar 27, 2017 at 5:22 AM, Michel Desmoulin
wrote:
>
>
> Le 26/03/2017 à 10:31, Victor Stinner a écrit :
>> print(msg) calls sys.stdout.write(msg): write() expects text, not bytes.
>
> What you are saying right now is that the API is not granular enough to
> just add a parameter. Not that it
Le 26/03/2017 à 10:31, Victor Stinner a écrit :
> print(msg) calls sys.stdout.write(msg): write() expects text, not bytes.
What you are saying right now is that the API is not granular enough to
just add a parameter. Not that it can't be done. It just mean we need to
expose stdout.write() encodi
FWIW, using the ascii function does have the problem that Unicose
characters will be escaped, even if the terminal could have handled them
perfectly fine.
--
Ryan (ライアン)
Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else
http://refi64.com
On Mar 26, 2017 9:07 AM, "Nick Cog
On 26 March 2017 at 18:31, Victor Stinner wrote:
> print(msg) calls sys.stdout.write(msg): write() expects text, not bytes. I
> dislike the idea of putting encoding options in print. It's too specific.
> What if tomorrow you replace print() with file.write()? Do you want to add
> errors there too?
print(msg) calls sys.stdout.write(msg): write() expects text, not bytes. I
dislike the idea of putting encoding options in print. It's too specific.
What if tomorrow you replace print() with file.write()? Do you want to add
errors there too?
No, it's better to write own formatter function as shown
Le 24/03/2017 à 17:37, Victor Stinner a écrit :
> *If* we change something, I would prefer to modify sys.stdout. The
> following issue proposes to add
> sys.stdout.set_encoding(errors='replace'):
> http://bugs.python.org/issue15216
>
> You can already set the PYTHONIOENCODING environment variabl
On Fri, Mar 24, 2017 at 10:41:58AM -0500, Ryan Gonzalez wrote:
> Recently, I was working on a Windows GUI application that ends up running
> ffmpeg, and I wanted to see the command that was being run. However, the
> file name had a Unicode character in it (it's a Sawano song), and when I
> tried to
On 24 March 2017 at 16:37, Victor Stinner wrote:
> *If* we change something, I would prefer to modify sys.stdout. The
> following issue proposes to add
> sys.stdout.set_encoding(errors='replace'):
> http://bugs.python.org/issue15216
I thought I recalled seeing something like that discussed somewh
On Fri, Mar 24, 2017 at 9:37 AM, Victor Stinner
wrote:
> *If* we change something, I would prefer to modify sys.stdout. The
> following issue proposes to add
> sys.stdout.set_encoding(errors='replace'):
> http://bugs.python.org/issue15216
>
I like that.
> You can already set the PYTHONIOENCODI
*If* we change something, I would prefer to modify sys.stdout. The
following issue proposes to add
sys.stdout.set_encoding(errors='replace'):
http://bugs.python.org/issue15216
You can already set the PYTHONIOENCODING environment variable to
":replace" to use "replace" on sys.stdout (and sys.stderr
On 24 March 2017 at 15:41, Ryan Gonzalez wrote:
> Recently, I was working on a Windows GUI application that ends up running
> ffmpeg, and I wanted to see the command that was being run. However, the
> file name had a Unicode character in it (it's a Sawano song), and when I
> tried to print it to t
Recently, I was working on a Windows GUI application that ends up running
ffmpeg, and I wanted to see the command that was being run. However, the
file name had a Unicode character in it (it's a Sawano song), and when I
tried to print it to the console, it crashed during the encode/decode. (The
enc
17 matches
Mail list logo