0

I am using spacemacs with Emacs V26.1, with package elpy, on a Macbook. I believe this also happens on Windows.

the issue is when I run the magic function %hist in the IPython shell, i got lots of information like below:

import codecs, os;__pyfile = codecs.open('''/var/folders/y1/197_jjzs1yv2qz0m26z1jkxw0000gn/T/pysfAkcq''', encoding='''utf-8''');__code = __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/y1/197_jjzs1yv2qz0m26z1jkxw0000gn/T/pysfAkcq''');exec(compile(__code, '''/var/folders/y1/197_jjzs1yv2qz0m26z1jkxw0000gn/T/pysfAkcq''', 'exec'));
import codecs, os;__pyfile = codecs.open('''/var/folders/y1/197_jjzs1yv2qz0m26z1jkxw0000gn/T/pythwlpb''', encoding='''utf-8''');__code = __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/y1/197_jjzs1yv2qz0m26z1jkxw0000gn/T/pythwlpb''');exec(compile(__code, '''/var/folders/y1/197_jjzs1yv2qz0m26z1jkxw0000gn/T/pythwlpb''', 'exec'));
import codecs, os;__pyfile = codecs.open('''/var/folders/y1/197_jjzs1yv2qz0m26z1jkxw0000gn/T/pyUwYsfX''', encoding='''utf-8''');__code = __pyfile.read().encode('''utf-8''');__pyfile.close();os.remove('''/var/folders/y1/197_jjzs1yv2qz0m26z1jkxw0000gn/T/pyUwYsfX''');exec(compile(__code, '''/var/folders/y1/197_jjzs1yv2qz0m26z1jkxw0000gn/T/pyUwYsfX''', 'exec'));

anyone had the same issue and is there a way to remove these?

  • What's your ipython version? This is probably Bug#25753, but Bug#32042 might be relevant too. – npostavs Aug 5 '18 at 21:39
  • Add some info about the layer used - see also this github.com/TheBB/elpy-layer and the historical one here github.com/syl20bnr/spacemacs/issues/2050. Note there are also some other solution(s) in using elpy in spacemacs. – Ian Aug 6 '18 at 13:21
  • i think it is because the default python-shell-interpreter-args has argument of --simple-prompt, removing that solves this issue. Thanks to all! – shelper Aug 7 '18 at 0:27
  • i am wrong, removing the --simple-prompt does not help .... – shelper Aug 7 '18 at 1:21

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.