No project description provided
Project description
English | 简体中文
CodeEditor
Syntax highlighting code editor. Easy to config.
A python editor package, based on QScintilla. support:
- find and replace dialog
- setting panel for config dialog
- easy config api
usage
Create editor, open file or find text:
from CodeEditor import editor
edt = editor() # create editor object
edt.load("file.c") # file.c will be opened, and highlighted under c syntax
edt.save("file.c") # file will be saved.
edt.setText("abc") # content in editor will be replace by "abc"
edt.clear() # content in editor will be cleaned.
edt.find() # show find dialog
edt.replace() # show replace dialog
find and replace dialog will dispaly as follow:
create setting panel:
from CodeEditor import editor
edt = editor() # create editor
panel = edt.settings.settingPanel() # create setting panel
panel.apply() # apply all change options in setting panel
panel.cancel() # cancel all change options and refresh setting panel
settingPanel is a Scrollable Qt Widget, it will display as follow:
config editor:
from CodeEditor import editor
from PyQt5.QtCore import Qt
edt = editor()
# config method
edt.setLanguage("CSS")
edt.setFontSize(12)
edt.setBackgroundColor(Qt.blue)
# anothor config method
edt.settings.configuate(language="CSS", fontSize=12, backgroundColor="blue",
color="#FF0000", edgeMode="EdgeLine")
get config of editor:
from CodeEditor import editor
edt = editor()
color = edt.color() # color=QColor("#FF0000")
color = edt.settings.get("color") # color="#FF0000"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file CodeEditor-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: CodeEditor-1.1.0-py3-none-any.whl
- Upload date:
- Size: 40.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.8.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9e52aaf4dc02628460eefe67d90059dcc1518b23cb862fc357168eee766dd93 |
|
MD5 | 58e9eb749071a371719c71617eb23299 |
|
BLAKE2b-256 | 9b16415aa9103c12fc4c25a3962a4087fef258234ff3e7beaf8bc1fd9a98e18f |