[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C-Escape sequences in print command
From: |
Jose E. Marchesi |
Subject: |
Re: C-Escape sequences in print command |
Date: |
Mon, 30 Sep 2019 11:27:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hi Henner.
(thanks for poke and the OrConf talk, just poking around :) ).
I am trying to use escape sequences in print commands. In my case, I
want to wrap the header of the 'dump' output in "\033[4m" ...
"\033[0m" so that it visually indicates that this is the header (in
pk-dump.pk).
Yet, pickle complains that "error: invalid \0 sequence in string". Is
it considered to allow more c-escape idioms in strings ?
Yeah, support for octal escape sequences in strings (like \033) is not
implemented yet. Shouldn't be difficult to do it: the relevant code is
in the `pkl_trans1_ps_string' handler in pkl-trans.c.
Happy poking! :)