Python Forum

Full Version: editors for python in python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
i am looking for an editor for coding python, implemented in python, and can work in a full screen text-only (not GUI) environment like i have (terminal).  it should be smart about python code.  it's a big plus if it can handle .rst and plain text.  it's also a plus if it is smart about some other languages.  if it has a scripting method of it's own is also a plus.  even better if that scripting is done in python.
Ninja IDE is written in Python. It's not a ncursed/terminal like application but full GUI one ( Qt ).  I have used it for a while. But again is a not cli application.
sublime text has python/C++. Handling plugins is python and the settings is JSON format.
VS code has done a lot of stuff right.
It's in the category as multi language editors like Sublime and Atom.
With one plugin get a lot of stuff for Python(has 4 269 279 installs),
there no plugin for Sublime or Atom that has all this features in 1 plugin.
My quick review.

There setting format is all JSON,but they have a new take on it which is good.
If new to change all the default setting will stay intact,
it comes up a edit button which will make a new JSON file with the overwrite setting.
Here's a wiki list of editors: https://wiki.python.org/moin/PythonEditors

but don't see any that fit your bill.

There's: https://unix.stackexchange.com/questions...-to-python
which is console based, but not sure which language it is written in.

You could write your own.
i don't want to write my own.  parsing python code (in the edit buffer) would be hard for me.  right now i use emacs and the python understanding seems to be buggy.  that suggests to me that it is a hard problem.

here is why i do not want an X windows editor:

i may suddenly need to edit a file on a remote host. most likely i have not set up the connect up for X windows.  most like the remote host has no X libraries (so X programs can't even run).  the terminal session may be a session in the screen command.  the terminal session may be a session in the script command to log its output.

i run the non-X version of emacs.
You could use vim instead. A long time ago I read this and after that, I found this one. Called spf13. I have tried the second but had no time to learn all features it offers. That was on some Ubuntu installation. Now I am using Arch Linux perhaps I will try it again.
 

Neovim? You can write plugins in Python for this if you want to.
why vi-like editors?  well, ok, if it is written 100% in python.  but i still want it to smartly deal with python code ... at least as well as emacs does.  an emacs-like command set would be a plus (personal thing).
You could write an editor for Python in Python. With prompt_toolkit this should be not a difficult task. You get syntax highlighting right away. Just have to implement the indentation and some syntax parser to show the syntax errors. It's enough for starters.
Quote:i may suddenly need to edit a file on a remote host. most likely i have not set up the connect up for X windows. most like the remote host has no X libraries (so X programs can't even run).
Thats exactly why i started using Vim. And then i started liking Vim. And then i started disliking bloated IDE's. Then i use Tmux to split the terminal into as many as i need, usually for execution. Then i prefer to have my .vimrc file for making coding python easier, but i dont really need it. And make sure to set it to paste mode before pasting in code.
Pages: 1 2