I hava two different files: data_source and util. I import util at data_source like this:
from util import HttpUtil
But there is some error when I run
from util import HttpUtil
ImportError: cannot import name HttpUtil
How can I solve this?
This is the directory structure of the module: enter image description here
In util
class HttpUtil(object):
@staticmethod
def request(host, port, method):
In data_source
import json
import urllib
import time
from util import HttpUtil