python.el

how to configure python.el for emacs to use python3 shell?

感情迁移 提交于 2021-02-07 10:38:39
问题 I am new to emacs. I installed emacs24 which has a built-in python mode(python.el). I cannot find this file and don't know how to configure it to use python3 shell (it's using python2.7 as default). Thannks 回答1: M-x customize-variable RET python-shell-interpreter RET Set it to python3. Afterwards M-x run-python RET should open a Python3 shell. If not working yet, check $PATH, make sure the directory holding python3 executable appears. 来源: https://stackoverflow.com/questions/23852308/how-to

Set Python project root in Emacs?

僤鯓⒐⒋嵵緔 提交于 2020-01-13 05:07:15
问题 emacs-for-python (based on python.el ) provides nice capability to start Python process and send buffer there right from Emacs (normally you do it with C-c C-c ). However, this way new process is created for every buffer , and Python's working directory is set to the directory of corresponding file . Instead, I'd like to have single Python process with working directory set to the root of the project . Or maybe even several processes, but started at the root directory, not the directory of

Set Python project root in Emacs?

依然范特西╮ 提交于 2019-12-04 13:38:48
emacs-for-python (based on python.el ) provides nice capability to start Python process and send buffer there right from Emacs (normally you do it with C-c C-c ). However, this way new process is created for every buffer , and Python's working directory is set to the directory of corresponding file . Instead, I'd like to have single Python process with working directory set to the root of the project . Or maybe even several processes, but started at the root directory, not the directory of the module. Why do I need it? It's all about imports. Imagine following project structure: myproject