from camelot.core import Table
# 如何实现讲Table中函数改写?使camelot table增加和pdflumber table.bbox相同的功能?
'''
# 想要重新定义,继承的方式,好像不行
class NewTable(Table):
def __init__(self,cols,rows):
super(Table,self).__init__(cols,rows)
def bbox():
return self.cells
'''
'''
# TypeError: 'Table' object is not callable
# 会出现不可以使用装饰器???
@Table(table[0].rows,table[0].cols)
def bbox():
return 'this is box'
'''
如何修改camelot中table属性?
最新推荐文章于 2023-10-19 21:46:19 发布