[Qgis-developer] Pythonpath to qgis API (Pedro Camargo)

侯伟 houw11 at lzu.edu.cn
Tue Nov 6 00:43:40 PST 2012


I think you meet the same question. early days i asked this question.
and finally i solved it. I
I wrote a python script to setup environment. now it can work under windows.
Can it be added to qgis installation to simple this work to others want use the qgis qpi.


> -----原始邮件-----
> 发件人: qgis-developer-request at lists.osgeo.org
> 发送时间: 2012年11月6日 星期二
> 收件人: qgis-developer at lists.osgeo.org
> 抄送: 
> 主题: Qgis-developer Digest, Vol 85, Issue 10
> 
> Send Qgis-developer mailing list submissions to
> 	qgis-developer at lists.osgeo.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.osgeo.org/mailman/listinfo/qgis-developer
> or, via email, send a message with subject or body 'help' to
> 	qgis-developer-request at lists.osgeo.org
> 
> You can reach the person managing the list at
> 	qgis-developer-owner at lists.osgeo.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Qgis-developer digest..."
> 
> 
> Today's Topics:
> 
>    1. Non-analytical tools in SEXTANTE (Victor Olaya)
>    2. Removing pymorph?? (Victor Olaya)
>    3. Re: Layer loading after analyses (Lauri Kajan)
>    4. Pythonpath to qgis API (Pedro Camargo)
>    5. Re: Pythonpath to qgis API (Lauri Kajan)
>    6. Re: Layer loading after analyses (Victor Olaya)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Mon, 5 Nov 2012 21:33:02 +0100
> From: Victor Olaya <volayaf at gmail.com>
> To: qgis-developer <qgis-developer at lists.osgeo.org>, 	qgis-community
> 	<qgis-community-team at lists.osgeo.org>
> Subject: [Qgis-developer] Non-analytical tools in SEXTANTE
> Message-ID:
> 	<CAJsc-7y1X_NERKyOvg_=V7pGnKPWRNpoSOe2F2jnyhBAASck3g at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hi all
> 
> I have started adding some tools in SEXTANTE that do not actually perform
> analysis, but that are interesting to have there, especially to add them as
> parts of a model to handle results.
> 
> The first group I am working on is tools for managing GeoServer (importing
> a layer, styling a layer, telling GWC to seed it, etc) and PostGIS tools
> (importing data, etc...), since at this moment they are rather useful for
> me.
> 
> I would like to hear opinions about what else could be added. Putting
> something in SEXTANTE does not, of course, mean removing it from where it
> is now, but I guess that replicating some QGIS tools in SEXTANTE might make
> them more useful, since they can be incorporated in models, scripts, run in
> batch processes, etc.
> 
> Thanks in advance for your help!
> 
> Victor
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20121105/629c3754/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 2
> Date: Mon, 5 Nov 2012 21:36:50 +0100
> From: Victor Olaya <volayaf at gmail.com>
> To: qgis-user <qgis-user at lists.osgeo.org>, 	qgis-developer
> 	<qgis-developer at lists.osgeo.org>
> Subject: [Qgis-developer] Removing pymorph??
> Message-ID:
> 	<CAJsc-7x6dsj+ws4R3zxstsVM6qMRZywX0djJqWc8UgjYLa34rA at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> How many people are using the pymorph algorithms in SEXTANTE? The
> performance is terrible (it runs very slow also outside of SEXTANTE, with
> the examples provided), and I am thinking about removing it, since I guess
> not a lot of people are using it.
> 
> There is OTB for image processing stuff, and in case pymorph is
> interesting, there is a library with parts c++ code, much faster in theory,
> called mahotas, by the same author, which shouldn't be hard to incorporate.
> 
> If no one is against it, I will remove pymorph from SEXTANTE, since now it
> is not very operative...but want to check a bit before doing it.
> 
> Regards
> 
> Victor
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20121105/25d8ac93/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 3
> Date: Mon, 5 Nov 2012 23:08:52 +0200
> From: Lauri Kajan <lauri.kajan at gmail.com>
> To: qgis-developer <qgis-developer at lists.osgeo.org>
> Subject: Re: [Qgis-developer] Layer loading after analyses
> Message-ID:
> 	<CAKWoFMKVmdgkPLTvYeZRobTptFXRroZtUJMtB9c7x_Bspy1ipg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Hi!
> 
> +1 for #3 also.
> 
> Maybe little bit off topic. But in many cases it would be enough to save
> the result as a memory layer.
> I find it distracting to save all the results as a shape files when I know
> that I don't need those after that phase.
> 
> These memory layers could be automatically added to toc and after that it
> is also possible to save those to a disk.
> I admit that with large data sets this doesn't make sense. Maybe plugins
> could have an option to choose the output between memory or file.
> 
> At least it sould be possible to save also to other formats than shape.
> 
> 
> BR,
> 
> -Lauri
> 
> 
> On Mon, Nov 5, 2012 at 1:49 PM, Paolo Cavallini <cavallini at faunalia.it>wrote:
> 
> > Il 05/11/2012 20:45, Werner Macho ha scritto:
> > > And - what I already wanted to discuss at the HF in Essen - we need
> > > Plugin-Developer GUI (or better overall) Guidelines ..
> > > (How things should work, where "help" should be, where "about" should
> > > be and so on)
> > Agreed, and most of these things should go in the Plugin Builder.
> > Could you please open a ticket on this (unsure where, however)?
> > Thanks.
> >
> > --
> > Paolo Cavallini - Faunalia
> > www.faunalia.eu
> > Full contact details at www.faunalia.eu/pc
> > Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
> >
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20121105/01067fa1/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 4
> Date: Mon, 5 Nov 2012 13:09:36 -0800
> From: "Pedro Camargo" <veigacamargo at gmail.com>
> To: <qgis-developer at lists.osgeo.org>
> Subject: [Qgis-developer] Pythonpath to qgis API
> Message-ID: <00a001cdbb99$ddbe7790$993b66b0$@gmail.com>
> Content-Type: text/plain;	charset="us-ascii"
> 
> Hi,
> 	I'm trying for a while now to access the Python API from a regular
> python console and I'm pretty sure that the there is something wrong with
> the instructions in the cookbook.
> 
> 	It is said that  the pythonpath should include something like "
> c:\qgispath\python", but the internal structure of QGIS changed, and there
> is no such folder. I tried many folders, but python could not find
> qgis.core.
> 
> 	Any thoughts?
> 
> 
> BTW, I'm working with QGIS 1.8 on Windows 7 pro 64 bits.
> 
> 
> Thanks,
> 	Pedro
> 
> 
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Mon, 5 Nov 2012 23:20:02 +0200
> From: Lauri Kajan <lauri.kajan at gmail.com>
> To: qgis-developer <qgis-developer at lists.osgeo.org>
> Subject: Re: [Qgis-developer] Pythonpath to qgis API
> Message-ID:
> 	<CAKWoFMJbeuX+jxtFStLOrWR02k=i_UrQjw7+ruJK6W411Vf1uA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Hi Pedro,
> 
> Have you tried to add
> C:\Program Files\Quantum GIS Lisboa\apps\qgis\python (or equivalent path on
> win7)
> to your PYTHONPATH?
> 
> 
> BR,
> 
> -Lauri
> 
> 
> On Mon, Nov 5, 2012 at 11:09 PM, Pedro Camargo <veigacamargo at gmail.com>wrote:
> 
> > Hi,
> >         I'm trying for a while now to access the Python API from a regular
> > python console and I'm pretty sure that the there is something wrong with
> > the instructions in the cookbook.
> >
> >         It is said that  the pythonpath should include something like "
> > c:\qgispath\python", but the internal structure of QGIS changed, and there
> > is no such folder. I tried many folders, but python could not find
> > qgis.core.
> >
> >         Any thoughts?
> >
> >
> > BTW, I'm working with QGIS 1.8 on Windows 7 pro 64 bits.
> >
> >
> > Thanks,
> >         Pedro
> >
> >
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20121105/36d9a24a/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 6
> Date: Mon, 5 Nov 2012 22:21:55 +0100
> From: Victor Olaya <volayaf at gmail.com>
> To: Lauri Kajan <lauri.kajan at gmail.com>
> Cc: qgis-developer <qgis-developer at lists.osgeo.org>
> Subject: Re: [Qgis-developer] Layer loading after analyses
> Message-ID:
> 	<CAJsc-7zfsFiktsgdWvXN8_TpeEPtnDXLN2nH77LKFXcyW91aSA at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Lauri,
> 
> That option is the defualt in SEXTATNE, it all goes to a temp file unless
> you set a filename explicitly.
> 
> Maybe, as it was suggested, that could be added to some template of
> guidelines doc, so other plugins could reuse the SEXTANTE component
> handling that, and behave similarly.
> 
> Regards
> 
> Victor
> 
> 
> 2012/11/5 Lauri Kajan <lauri.kajan at gmail.com>
> 
> > Hi!
> >
> > +1 for #3 also.
> >
> > Maybe little bit off topic. But in many cases it would be enough to save
> > the result as a memory layer.
> > I find it distracting to save all the results as a shape files when I know
> > that I don't need those after that phase.
> >
> > These memory layers could be automatically added to toc and after that it
> > is also possible to save those to a disk.
> > I admit that with large data sets this doesn't make sense. Maybe plugins
> > could have an option to choose the output between memory or file.
> >
> > At least it sould be possible to save also to other formats than shape.
> >
> >
> > BR,
> >
> > -Lauri
> >
> >
> > On Mon, Nov 5, 2012 at 1:49 PM, Paolo Cavallini <cavallini at faunalia.it>wrote:
> >
> >> Il 05/11/2012 20:45, Werner Macho ha scritto:
> >> > And - what I already wanted to discuss at the HF in Essen - we need
> >> > Plugin-Developer GUI (or better overall) Guidelines ..
> >> > (How things should work, where "help" should be, where "about" should
> >> > be and so on)
> >> Agreed, and most of these things should go in the Plugin Builder.
> >> Could you please open a ticket on this (unsure where, however)?
> >> Thanks.
> >>
> >> --
> >> Paolo Cavallini - Faunalia
> >> www.faunalia.eu
> >> Full contact details at www.faunalia.eu/pc
> >> Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
> >>
> >> _______________________________________________
> >> Qgis-developer mailing list
> >> Qgis-developer at lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >>
> >
> >
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20121105/b769d792/attachment.html>
> 
> ------------------------------
> 
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
> 
> End of Qgis-developer Digest, Vol 85, Issue 10
> **********************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qgisenv.py
Type: application/octet-stream
Size: 917 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20121106/b76a069a/attachment.obj>


More information about the Qgis-developer mailing list