如何在Python脚本中调用外部命令(就像我在Unix shell或Windows命令提示符下键入它一样)?
我想在几个平台(包括Mac OS)上运行程序,所以我尽量保持它与平台无关.我自己使用Windows,我有一条线os.startfile(file).这适用于我,但不适用于其他平台(我在文档中读到,我没有自己测试过).
是否有适用于所有平台的等效产品?
顺便说一下,该文件是一个.wav文件,但我希望用户能够使用他们的标准媒体播放器,这样他们就可以暂停/回放文件.这就是我使用的原因os.startfile().我也许可以使用允许播放/暂停/倒带媒体文件的库.
I am trying to extract text from a PDF file using Python. My main goal is I am trying to create a program that reads a bank statement and extracts its text to update an excel file to easily record monthly spendings. Right now I am focusing just extracting the text from the pdf file but I don't know how to do so.
What is currently the best and easiest way to extract text from a PDF file into a …