[message resent with some changes, because message too big... ]
Hi Tara,
the good news: you (almost) succeeded. Here is your stuff back (I've
upgraded it to version 0.11 :-)
http://www.duif.net/qgis/new_layer.zip
1) don't put python plugins in the directory you mentioned:
C:\Program Files\Quantum GIS_091\share\qgis\python\plugins\
You are right, that's where the plugin installer is (which is I would
say still beta (aka not yet working the way it is supposed to yet).
But put your files in a directory new_layer here:
C:\Program Files\Quantum GIS_091\python\plugins\new_layer
There (after some fixes...) it works!!
2) python is very picky with whitespaces! you will see error messages
when you put your old plugin code in the right place ;-)
I removed them, or changed them (see new zip)
3) remove the linenumbers in your newlayer.py
4) you're including the python library pscopg (needed for python to
interact with Postgresql. Do you have that lib installed in your python
installation? I did'nt, and got errormessages, so I changed the version
to psycopg2 (a library I do have). You should use/have one of those
installed.
5) your button did't show up in the buttonbar, but the plugin shows up
in the pluginmanager! This is because the name you define in the
resources.qrc should match the name you use for it in your code:
/plugins/new_layer/new_layer_icon.png
in the qrc file should match the name you use in your code:
self.action = QAction(QIcon(":/plugins/new_layer/new_layer_icon.png"),
After fixing this, it's loading.
So I would say, congrat with your first plugin!
Read something about python's whitespaces here:
http://www.python.org/doc/essays/styleguide.html
here http://docs.python.org/ or http://docs.python.org/tut/tut.html
psycopg or psycopg2 can be downloaded here:
http://www.initd.org/pub/software/psycopg/
If you need an even easier plugin to start with, start with this one here:
http://blog.qgis.org/?q=node/104
Good luck
Richard Duivenvoorde
Your plugin more or less fixed, and some screendumps to prove your
plugin is loaded (0.9.1 on WinXP), and the code cleaned up a little and
'loadable' (all in the zip) here:
http://www.duif.net/qgis/new_layer.zip
Richard Duivenvoorde wrote:
>
> Hi Tara,
>
> where did you put you plugin stuff?
> which files did you put there?
> Can you reply to this mail with the exact paths you are put your files?
>
> As an example, my plugin is here (I installed qgis in C:\programs\QGIS091):
> C:\programs\QGIS091\python\plugins\imagemap_plugin
>
> Maybe you can also sent me the files? I can look into them if you want.
>
> Didn't you see an error-message dialog?
>
> Regards Richard Duivenvoorde
>
> Tara Athan wrote:
>> I have now made it through all the steps in the manual (Section 11,
>> subsection 7) for Using the Python Plugin.
>> However the NewLayer plugin does not appear in the PlugIn Manager.
>> I see a similar post on the Plugin forum (Developer>Plugins August,
>> 2007) but there were no replies.
>>
>> Version 0.9.0, 0.9.1 (I tried it in both)
>> Platform WIndows XP SP2
>>
>> Thanks, Tara
>>
>>
>
>
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user