libtextworker 0.1.4
Cross-platform, free and open library for Python projects
|
In the code above, we import the require function from the libtextworker.versioning module, then use it to "require" version 0.1.3 of libtextworker. This ensures that your project is using the library with version 0.1.3, nothing else.
Here's the require
function:
You can use this function for other packages, just make sure that the package has __version__
attribute.
There are many functions for your use: require_exact
, require_lower
, and even is_development_version
, is_development_version_from_project
for verions type-checking.
The top-level module has some useful attributes:
~/.configs/textworker/themes
; where all themes for GUIs are placed~/.configs/textworker/editorconfigs/
; default configs directory for GUI editorsgeneral.Importable
, contains check results for Python modules.In libtextworker.general module we have a variable called available_toolkits (since 0.1.3), indicates supported GUI toolkits. Only wxPython and Tkinter are supported. Also we have LOG_PATH shows us where the log file is located, TOPLV_DIR for the top-level settings path.
Take a look at all library modules:
general
: Has functions that mostly about file/directory touch. They are born to make file operations easier.get_config
ported from texteditor, contains GetConfig class which is an advanced INI parser (json import/export ongoing), with backup, value aliases, and runtime update.versioning
: See above.interface.manager
: Contains ColorManager which handles GUI widgets color/fontinterface._colors
(since 0.1.3) specifies some colors. Moved to interface
since version 0.1.4.interface
: GUIs support ('wx' for wxPython, 'tk' for Tkinter)Head over to this page.
Want to get widgets example? See the tests/
foldder on our GitHub repo!