【发布时间】:2015-05-26 15:46:26
【问题描述】:
我正在尝试在另一个 python 脚本ProcesosContinuos.py 中使用某个 python news_Lucene.py 脚本的所有功能。我在ProcesosContinuous.py 中导入了news_Lucene.py 的以下结构。
news_Lucene() 的代码:
class news_Lucene():
@staticmethod
def indexing():
#some code
@staticmethod
def get_set_terms(reader):
#some code
@staticmethod
def get_TFIDF():
#some code
@staticmethod
def get_author_TFIDF():
#some code
#SOME CODE OUTSIDE STATIC METHODS
在ProcesosContinuous.py 我正在尝试以下操作:
from engines.extras.download_datos_desambiguar import news_Lucene
news_Lucene().indexing()
我也试过了
indexing()
但它仍然不起作用。它说AttributeError:'module' object has no attribute indexing。我做错了什么?
【问题讨论】:
标签: python function import lucene attributeerror