J'utilise gnome-terminal
, emacs -nw
, eshell
à l'intérieur de emacs
, et ipython
.emacs shell interprète incorrectement les caractères ipython
Pour une raison quelconque, le shell emacs interprète mal les caractères.
Voici ce que je vois (plese note les 3 dernières lignes):
$ ipython
Python 3.5.2 (default, Jun 28 2016, 08:46:01)
Type "copyright", "credits" or "license" for more information.
IPython 5.0.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
^[[?12l^[[?25hprint("hi")
^[[J^[[?7h^[[?12l^[[?25h^[[?2004lhi
^[[?12l^[[?25h
Je crois que cela doit être un problème d'encodage, mais je ne suis pas sûr de savoir comment diagnostiquer et corriger.
Voici mon sortie env
si elle aide:
$ env
XDG_VTNR=2
XDG_SESSION_ID=c3
TERM=xterm-256color
SHELL=/bin/bash
XDG_MENU_PREFIX=gnome-
VTE_VERSION=4402
GJS_DEBUG_OUTPUT=stderr
WINDOWID=29360134
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
USER=adrin
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
SESSION_MANAGER=local/mydarlingarch:@/tmp/.ICE-unix/498,unix/mydarlingarch:/tmp/.ICE-unix/498
USERNAME=adrin
MOZ_PLUGIN_PATH=/usr/lib/mozilla/plugins
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
MAIL=/var/spool/mail/adrin
DESKTOP_SESSION=gnome
QT_QPA_PLATFORMTHEME=qgnomeplatform
XDG_SESSION_TYPE=x11
PWD=/home/adrin
LANG=en_US.UTF-8
GDM_LANG=en_US.UTF-8
GDMSESSION=gnome
XDG_SEAT=seat0
HOME=/home/adrin
SHLVL=1
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
XDG_SESSION_DESKTOP=gnome
LOGNAME=adrin
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
WINDOWPATH=2
XDG_RUNTIME_DIR=/run/user/1000
DISPLAY=:0
XDG_CURRENT_DESKTOP=GNOME
COLORTERM=truecolor
XAUTHORITY=/run/user/1000/gdm/Xauthority
_=/usr/bin/env
Si vous exécutez ceci: 'echo -e « \ 033 [0; 31mhello \ 033 [1, 0m'', vous obtenez un rouge "bonjour" ou texte brouillées? Essayer de dire si c'est ipython ou tout votre shell. Si vous exécutez 'shell' au lieu de' eshell', voyez-vous la même chose? Enfin, si vous utilisez ipython sans couleurs, lancez 'ipython --colors = NoColor'. –
En essayant 'shell' d'imprimer un" hello "rouge, le' eshell' imprime exactement la même chaîne, comme si elle ne l'analysait pas. Mais l'ipython a le même problème dans les deux cas. Et '--colors = NoColor' n'aide pas, même résultat. – adrin
Et j'ai deux 'ipython's, l'un est 2.4, l'autre 5. Je n'ai pas le problème avec l'ancien. Le nouveau est ce que j'ai dans mon virtualenv. – adrin