far*_*raz 4 python module decimal pypdf
这是我正在使用的代码
import os
import decimal
from pyPdf import PdfFileReader
path = r"E:\python\Real Python\Real Python\Course materials\Chapter 8\Practice files"
inputFileName = os.path.join(path,"Pride and Prejudice.pdf")
inputFile = PdfFileReader(file(inputFileName,"rb"))
print "Number of pages:", inputFile.getNumPages()
print "Title:", inputFile.getDocumentInfo().title
Run Code Online (Sandbox Code Playgroud)
现在,当我运行此代码时,我收到一个错误:模块'对象'没有属性'Number'
当我运行上面的代码时,我获取了整个输出的屏幕截图,包含错误和所有内容.所以,请看看,让我知道什么是错的?

Ery*_*Sun 12
这是一个打印输出的所有数字,最多50个,不能被3整除.它可能在一个numbers模块上sys.path,它影响标准库numbers.看看它在哪里:
import numbers
print numbers.__file__
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1479 次 |
| 最近记录: |