Hi Lutfi,<br><br>you can try this punch of code for starting:<br><br>from PyQt4.QtGui import *<br>from PyQt4.QtCore import *
<br><p style="margin: 0px; text-indent: 0px;">vlayer = QgsVectorLayer(&quot;c/temp/abc.shp&quot;, &quot;hebe&quot;, &quot;ogr&quot;)</p>
<p style="margin: 0px; text-indent: 0px;">print vlayer.source()</p>
<p style="margin: 0px; text-indent: 0px;">QgsMapLayerRegistry.instance().addMapLayer(vlayer)</p>
<p style="margin: 0px; text-indent: 0px;">QMessageBox.information(iface.mainWindow(), &quot;info&quot;, &quot;file: &quot;+str(vlayer.source())+&quot; is added.&quot;)</p><p style="margin: 0px; text-indent: 0px;"><br></p>
<p style="margin: 0px; text-indent: 0px;">regards,</p><p style="margin: 0px; text-indent: 0px;">volkan<br></p><br><br><div class="gmail_quote">On Wed, Oct 21, 2009 at 11:18 AM,  <span dir="ltr">&lt;<a href="mailto:luca_manganelli@comune.trento.it">luca_manganelli@comune.trento.it</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
<a href="mailto:qgis-developer-bounces@lists.osgeo.org">qgis-developer-bounces@lists.osgeo.org</a> scritti il 21/10/2009 10.13.51<br>
<div><div></div><div class="h5"><br>
&gt; Hello,<br>
&gt;<br>
&gt; vlayer = QgsVectorLayer(&quot;C:<br>
&gt;<br>
\Users\lutfi\Documents\tezzzz\shapefiles\data\SGID93_BOUNDARIES_Municipalities.<br>
<br>
&gt; shp&quot;, &quot;hebe&quot;, &quot;ogr&quot;)<br>
&gt;<br>
&gt; I am trying to run the code above and no matter what is the file,<br>
&gt; featurecount always return zero in python console so that ny plugin<br>
&gt; does not work. What may be the problem?<br>
<br>
</div></div>see the slash &quot;\&quot;, it does an escape.<br>
<br>
Try it with double shlashes (&quot;\\&quot;) or inverted slash (&quot;/&quot;).<br>
<br>
It&#39;s a common error (I&#39;ve made many mistakes with it :-) )<br>
<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Volkan Osman Kepoglu<br>PhD Candidate<br>GGIT Department in METU,<br>http:/<a href="http://ggit.metu.edu.tr">ggit.metu.edu.tr</a><br>