rreilink / pylvgl Goto Github PK
View Code? Open in Web Editor NEWPython bindings for the LittlevGL graphics library
License: BSD 2-Clause "Simplified" License
Python bindings for the LittlevGL graphics library
License: BSD 2-Clause "Simplified" License
Currently, some methods of objects are not instantiated because the data type is not yet supported; full support for all methods is desired.
Currently, the pylvgl binding creates one framebuffer with default size. It should be possible to create new displays of custom size (or not create one at all, if this would be done by some other (C-) part of the application)
Hello world :-)
Would that be possible to use PyLVGL for mobile applications development? :-)
The best part is that is can be used to create desktop applications in place of Qt or even FLTK.
That would be delightful if PyLVGL could be used as replacement for ugly JS solutions like React Native :-)
Did anyone try that / consider that? :-)
Here is my question directly on the LVGL project: lvgl/lvgl#2664
Installed via:
git clone --depth 1 --recurse-submodules -j8 https://github.com/rreilink/pylvgl.git
cd pylvgl
pip install .
Demo run:
QSettings::value: Empty key passed
QSettings::value: Empty key passed
Traceback (most recent call last):
File "/home/vshymanskyy/Business/Blynk/blynk-library/examples/Blynk.Edgent/pylvgl/demo.py", line 34, in <module>
win = LvglWindow();
File "/home/vshymanskyy/Business/Blynk/blynk-library/examples/Blynk.Edgent/pylvgl/demo.py", line 10, in __init__
self.setMinimumSize(lvgl.HOR_RES, lvgl.VER_RES)
AttributeError: module 'lvgl' has no attribute 'HOR_RES'
Tried commenting-out some lines, but more errors appear
It would be useful for user clarity and tooltip generation in the lv_gui_builder if the docstring of generated methods had more information.
For example, right now, calling:
import inspect
import lvgl
inspect.getdoc(lvgl.Btn.set_auto_realign)
will print 'void lv_obj_set_auto_realign(lv_obj_t *obj, bool en)'
. This is a good start. Perhaps this info could be formatted in such a way that it could be both human and machine-readable. A simple dictionary would do:
signature: void lv_obj_set_auto_realign(lv_obj_t *obj, bool en)
help: Enable autorealignment for this lvgl object
or something like that.
I'm starting work on the python-based LVGL GUI builder. I think it would be nice to target the upcoming 6.0 release since it supports runtime configuration of certain things like display resolution.
I have been working on updating the python binding generation code to work with LVGL 6.0 (see my fork branch here: https://github.com/AGlass0fMilk/pylvgl/tree/gui-builder-dev)
I am running into a few issues. I have gotten the generated bindings to compile. When I try to import the python library it complains about undefined symbols. So I'm tracing down those one-by-one.
I haven't really worked on Python bindings for C before, let alone the pycparser. I understand how the template is involved.
I'd like to get involved in development of this alongside the GUI builder. @rreilink when you have time can you submit issues that detail things that need to be done? Where is this binding lacking? How could it be better?
After installing pylvgl (by running python3 setup.py install
) I wasn't able to import
the module from other directories that didn't directly have pylvgl as a subdirectory.
This may be confusing so I reproduced the error in the following way:
# Create a virtualenv for testing
virtualenv python-test
source ./python-test/bin/activate
cd ~/Documents/pylvgl # you can import lvgl here
python3 setup.py install
cd ~/Documents # you will still be able to import lvgl here
mkdir test && cd test # attempting to import lvgl here will fail!
At least those required to react to user events should work
Hi,
I'm the author of LittlevG Land I've just found your project. It looked awesome! If you agree and your project become ready to use I'd like to advertise it on littelvgl.com .
So I was trying to install but got this error:
$ python setup.py install
running build
running build_ext
building 'lvgl' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/lvgl
creating build/temp.linux-x86_64-2.7/lvgl/lv_core
creating build/temp.linux-x86_64-2.7/lvgl/lv_draw
creating build/temp.linux-x86_64-2.7/lvgl/lv_hal
creating build/temp.linux-x86_64-2.7/lvgl/lv_misc
creating build/temp.linux-x86_64-2.7/lvgl/lv_objx
creating build/temp.linux-x86_64-2.7/lvgl/lv_themes
creating build/temp.linux-x86_64-2.7/lvgl/lv_misc/lv_fonts
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-3hk45v/python2.7-2.7.15~rc1=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c lvglmodule.c -o build/temp.linux-x86_64-2.7/lvglmodule.o
lvglmodule.c:1:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
Can you help with that?
Hello world :-)
I just found LVGL / PyLVGL. I thought it could be replacement for Qt on platforms where Qt/PyQT is not available easily out of the box (i.e. FreeBSD). But demo.py
and examples
requires Qt !!
Line 4 in 1287d49
pylvgl/examples/basicdemo_qt.py
Line 4 in 1287d49
Is it possible to create demo that does not require Qt? It could use OpenGL / EGL / Framebuffer directly :-)
Why use PyLVGL if it required Qt anyway?
Thanks :-)
Document:
hello,
i am using python 3.7.2 on windows 10
when i try to install the package i get the error:
"error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2"
i tried to appdate several visual studio c++ versions but there is no change,
there is also the solution to use this page:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
but the package is not there.
also i am getting another error:
"lvglmodule.c(3): fatal error C1083: Cannot open include file: 'lvgl/lvgl.h': No such file or directory"
whrer shoul be the lvgl.h file ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.