pychecker and "import my.special.module as mymod"

N

News123

Hi,

I'm not really used to structuring modules withn directories, but I
started playing


#####################################
# the commands to reproduce my setup:
#####################################
mkdir -p my/special
touch my/__init__.py my/special/__init__.py
echo 'print "myspecialmod"' > my/special/module.py
echo "import my.special.module as mymod" > tst.py

so I have now following files:
-rw-r--r-- 1 0 2010-02-04 01:05 ./my/__init__.py
-rw-r--r-- 1 131 2010-02-04 01:07 ./my/__init__.pyc
-rw-r--r-- 1 0 2010-02-04 01:05 ./my/special/__init__.py
-rw-r--r-- 1 139 2010-02-04 01:07 ./my/special/__init__.pyc
-rw-r--r-- 1 21 2010-02-04 01:06 ./my/special/module.py
-rw-r--r-- 1 159 2010-02-04 01:07 ./my/special/module.pyc
-rw-r--r-- 1 34 2010-02-04 01:07 ./tst.py

the program tst.py runs as expected:
$ python tst.py
myspecialmod



However pychecker gives me two warnings:
$ pychecker tst.py
Processing module tst (tst.py)...
myspecialmod

Warnings...

tst.py:1: Imported module (my.special.module) not used
tst.py:1: No module attribute (special) found

I understand the first one and this one will not appear in my real code.
However I don't really understand the second one.

So my questions are:
- Is this a real warning or is this 'just' a pychecker problem?
- Can I write my code such, that the warning will not appear?
- Is there a pychecker switch, which would get rid of this warning?


thanks a lot in advance for your answers / suggestions



N
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top