A code editor written in python
Project description
ped
ped is an editor and accompanying tools written in python.
Background
I wrote ped since 2009 basically for my own use. I wanted an editor that emulated Brief(TM) and that I could easily extend and that would run in terminals on linux or other places that curses was available. I had been using a Brief(TM) emulation macro in emacs, but that was very limited and emacs is complicated to extend because of all of the mass of features and variants that exist. When I started the project I was working in python almost exclusively, and I realized that a lot of sophisticated features would be made relatively easy because python packages existed for them, so I embarked on writing my own editor.
I guess this was an act of vanity, stupidity, or stubbornness, but it was fun and I got what I wanted in the end and have been using the editor and extending it since then. I don’t expect that this will be anyone’s favorite editor but mine, but there might be some snippets of code or modules that others find useful, so please use the code as you like.
If you find bugs let me know or send me a fix I may apply it or fix the bug or not. I don’t warrant that this code is good for any particular purpose.
Installation
Install from pypy:
python3 -m pip install ped-editor
Make sure that ~/.local/bin is on your PATH
OR
Check out the source code to a path OR download the release .zip file and unzip there.
Put the path on your operating system’s execution path.
Requires python 3.8 or better.
Requires a terminal that works with the python curses module.
There is a requirements.txt file, you can do: pip install -r requirements.txt
Notes
I’ve recently added a suite of pytest tests that cover about 78% of the code.
You can run them by doing the following in the source directory:
export SSH_DIALOG_BASEPATH= { an ssh path of the form ssh://host/dir:port that points to a test sftp server where files can be get/put and directories created }
export SSH_DIALOG_USERNAME= { ssh username to run the test as, needs permissions for the above }
export SSH_DIALOG_PASSWORD= { ssh password for that user, you are responsible for the security of it }
python -m pytest tests
OR with coverage:
coverage run –source=. –omit=comment_extension.py,dummy_extension.py,lib/,tests/ -m pytest tests
Documentation
Have a look at the wiki page for usage and configuration documentation.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ped_editor-1.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f27ce08669da60b0b825a373f80310e860ada3f465050c873c5409fab6d3919 |
|
MD5 | b7b32a3ad0c2a07d217d10ada13e48f5 |
|
BLAKE2b-256 | 7d7ae2e98b49e494cdbae13f5061587e7d3594eb8fefea558a5fce06aefeb383 |