[Qgis-user] custo module in python console

Alessandro Pasotti apasotti at gmail.com
Thu Oct 8 00:44:49 PDT 2015


Hi,

are you sure that you aren't importing the standard python test module?

<module 'test' from '/usr/lib/python2.7/test/__init__.pyc'>



Try renaming from test.py to mytest.py




2015-10-07 11:47 GMT+02:00 Luca Lanteri <lklanteri at gmail.com>:

> Hi,
>
> I try to load a custom module in qgis python console but without success.
> I don't understand what I miss.
>
> I put my python module into project folder (file is named test.py)
>
> the module contain a function like this;
> def pr():
>     print("hello")
>
> when from Python console I've imported the module with "import test" I
> didn' have any error and qgis find the module but I can't access to my
> custom functions.
>
> any hints ?
> Thank in advance
>
> Luca
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>



-- 
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20151008/cf9bde4c/attachment.html>


More information about the Qgis-user mailing list