QGIS Python Integration (Was Re: [Qgis-developer] Re: [Qgis-user] Atlas plugin - create map books)

Tim Sutton lists at linfiniti.com
Thu Feb 9 03:50:23 EST 2012


Hi Martin

I took the liberty of taking this over to a new thread.

On Tue, Jan 31, 2012 at 1:39 AM, Martin Dobias <wonder.sk at gmail.com> wrote:
> On Thu, Jan 26, 2012 at 5:15 PM, Tim Sutton <lists at linfiniti.com> wrote:
>>
>> Martin I have been doing quite a bit of QGIS python programming the
>> last few weeks and I must say, it's is a really awesome development
>> environment and I could see a lot of merit in replacing what we have
>> in app with pure python and then using C++ for core, analysis and gui
>> libs. I can see that on new platforms (e.g. android mobile) new
>> interfaces are going to be needed and in my opinion it isn't something
>> we should discount over the long term. However the massive work
>> involved in doing that is probably a show stopper. Just mixing in
>> python functionality in the way of gdaltools and ftools seems to me a
>> viable way to continue for the medium term. What exactly would you
>> vision of a more python centric QGIS amount to?
>
> My vision is roughly the same as you describe: first of all, leave the
> libraries (core, gui, analysis) strictly in c++. These are our engines
> and they should be robust and fast. However the application code (in
> src/app) taking care of GUI usually does not run tasks that need to be
> super-fast. This is the area where the possibility to switch from c++
> to Python might be useful. The python code could be more compact, not
> needing to compile and in case of fatal errors it would just show an
> error message instead of crashing whole QGIS.
>
> I certainly do not support rewriting stuff from c++ to python. The
> whole point is that by having the possibility to put python code
> directly in qgis app we may be more efficient implementing new
> features and/or reusing existing code from plugins.
>
> Martin

Still in the context of trying to understand what Martin proposes
without necessarily endorsing the idea...

Martin how would you see python integration working in the context of
keeping our existing C++ code base for src/app and extending it with
python? I assume you are thinking to provide a way to add e.g. a new
dialog, etc to the app without having to write a plugin? So how did
you see that working? Would the python layer load after the main app
is loaded and python elements of the app just attach themselves to the
mainwindow as a plugin would?

Regards

Tim


-- 
Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Visit http://linfiniti.com to find out about:
 * QGIS programming and support services
 * Mapserver and PostGIS based hosting plans
 * FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
==============================================


More information about the Qgis-developer mailing list