python如何引用不同模块下的相同方法(函数)名
作者:高景洋 日期:2020-02-22 15:45:26 浏览次数:2679
在实际开发过程中,会遇到,引用不同模块下相同文件名的情况,那这种情况如何解决呢?
from apps.collect.download.data_download import main as download_main
from apps.collect.parse.data_analysis import main as analysis_main
from apps.collect.process.data_dataaccess import main as dataaccess_main
通过给引用方法,添加别名的方法来解决
本文永久性链接:
<a href="http://r4.com.cn/art127.aspx">python如何引用不同模块下的相同方法(函数)名</a>
<a href="http://r4.com.cn/art127.aspx">python如何引用不同模块下的相同方法(函数)名</a>
当前header:Host: www.r4.com.cn
X-Forwarded-For: 10.3.17.242, 216.73.216.23
X-Real-Ip: 216.73.216.23
X-Domain: r4.com.cn
Connection: close
Accept: */*
User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Accept-Encoding: gzip, br, zstd, deflate
Via: 1.1 squid-proxy-5b5d847c96-ftxhk (squid/6.10)
Cache-Control: max-age=259200