Inside the parent class basehandler.py, there are several import statements, a constant, and a class:
import os
import sys
import cgi
import json
JINJA_ENVIRONMENT = jinja2.Environment(foobar)
class BaseHandler(webapp2.RequestHandler):
pass
Another module, main.py then imports this parent module with from basehandler import *
If we use from basehandler import BaseHandler or import basehandler so as to avoid the from foo import * statement, then the modules that the parent class imports are not received and the program throws an exception.
How do I avoid from foo import * while still correctly importing the parent module with the modules that it imports?