pawelsalawa / sqlitestudio

A free, open source, multi-platform SQLite database manager.
https://sqlitestudio.pl
Other
4.67k stars 571 forks source link

ScriptingPython: portable version binds to Python library 2.7-3.13 at runtime #5049

Closed tuffnatty closed 3 months ago

tuffnatty commented 3 months ago

This PR is assumed to be applied on top of #5047 and #5048.

It adds support for runtime binding to Python library configured by user. It also adds some needed UI features.

Screenshot 2024-08-19 at 04 22 41

Tested on: MacOS 10.14, Python SDK 3.4–3.13, Python library 2.7–3.13. Fixes: #4662.

tuffnatty commented 3 months ago

I am not sure why CodeFactor reports additional code complexity in scriptingpython.cpp (no line number). Yes, there is a preprocessor-generated function body with lots of ifs, but it's in another module, dynamicapythonapi.cpp.

pawelsalawa commented 3 months ago

General comment - it's an awesome improvement!

tuffnatty commented 3 months ago

Added some cosmetic braces and comments.