I am attempting to import functions from couple of files called
mysql_calls.py
system_calls.py
If I import with
from mysql_calls import *
pylint complains about wildcard import and if I just do
import mysql_calls
pylint
complains about undefined vars when I use functions from imported modules.
alert_feeder.py:215:17: E0602: Undefined variable 'mysql_query' (undefined-variable)
What is the right way to do this? I am also not (yet?) using every functions from imported modules, and pylint
also complains about that.
When you run import mysql_calls
, its function mysql_query
is accessible as mysql_calls.mysql_query
.
More details: Modules - Python 3 documentation