PyEditor
Simple text editor made with python.
Features
- Basic edit/copy/paste/undo/redo
- Multi-files edit
- Showing line numbers
- Hightlight current line
- Files drag-n-drop
- Text drag-n-drop
- Code highlighting
- Code formatting
Run
Dependency
-
Tkinter
-
chardet
Install by
pip3 install chardet
-
Pillow (Only on Linux)
Install by
pip3 install Pillow sudo apt-get install python3-pil.imagetk
-
tkdnd (Optional)
This is an optional dependancy for supporting Drag-N-Drop feature. It's a little bit of tricky in the installation. PyEditor can run without it so it's okay to skip this process.
-
Ubuntu / Debian
This is the most simple way:
sudo apt-get install tkdnd
-
Fedora / RedHat This is untested:
sudo dnf install tkdnd
-
Arch Linux
There is an AUR called tkdnd, see here. But this is untested, you need to find out yourself.
For AUR install guide, see here
-
Windows & MacOS
Download tkdnd2.8 from here, make sure you are downloading the right arch. For example, if you are using Python 64-bit on Windows, you should download the Windows 64-bit version.
How to check my python version?
In your terminal, type
python3
and hit enter, you will see:Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
In this example, there is a string "64 bit" and "win32", so we can determine that we are on 64-bit python on Windows.
Then,
-
On Windows:
Nevigate to you python installation directory.
Check
C:\Program Files\Python
,C:\Program Files (x86)\Python
,D:\Program Files\Python
andD:\Program Files (x86)\Python
Hint: you can use
where.exe python3
to locate your installation directory.For example, my installation directory is
D:\Program Files\Python\Python38\
. Then goto its subfoldertcl
. Now the full path isD:\Program Files\Python\Python38\tcl\
.Extract tkdnd2.8 which you downloaded in the previous step and put the
tkdnd2.8
folder here. -
On MacOS: Simply put tkdnd folder under
/Library/Tcl
. If your system don't have that folder, just make a new one.On command line it will be
cd PathToYourTkdnd2.8Folder sudo mkdir /Library/Tcl sudo cp tkdnd2.8 /Library/Tcl/
-
-
Then run in terminal
python3 editor.pyw
Build
-
On macOS
Dependency
-
py2app
Will be satisfied automatically, or you can install manually with
pip3 install py2app
then run
python3 build.py
-
-
On Windows
Dependency
-
PyInstaller
Install by
pip3 install pyinstaller
then run
python3 build.py
-
-
On Linux
Dependency
-
PyInstaller
Install by
pip3 install pyinstaller
then run
python3 build.py
-
After that, you will find the executable file or app bundle under dist folder.