GNU bug report logs -
#49822
28.0.50; python-shell-send functions show no output
Previous Next
Reported by: dalanicolai <at> gmail.com
Date: Mon, 2 Aug 2021 14:33:01 UTC
Severity: normal
Tags: patch
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #53 received at 49822 <at> debbugs.gnu.org (full text, mbox):
On Sat, 28 Aug 2021 at 17:41, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
> Yes, it might be a good idea to raise this topic on emacs-devel and see
> if there's any feedback.
Okay, nobody chimed in on this thread (and I think I forgot to mention
it in emacs-devel), but this patch works well for me so far. So I would
suggest to merge it.
>
> Some minor comments on the patch:
>
>> +(defvar python-shell-eval-setup-code
>> + "\
>> +def __PYTHON_EL_eval(source, filename):
>> + import ast, sys
>> + if sys.version_info[0] == 2:
>> + from __builtin__ import compile, eval, globals
>
> I think it might be a better long-term maintenance solution to put the
> Python code here (and from `python-shell-completion-native-setup') into
> a .py file under etc (for instance in a new "python-mode"
> sub-directory), and then read it in run-time (accessed via
> `data-directory', which points to etc), and cache it in an internal
> variable.
>
> Editing Python that's inside a Lisp string is awkward.
Yes, that makes sense. On the other hand, it would make the entire
setup a bit more complicated, and I'm unsure about some of the details.
I do want to refactor `python-shell-send-file', though, so that at least
it doesn't generate Python code strings on the fly (and at the same time
solve the remaining part of Bug#32042).
This bug report was last modified 3 years and 333 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.