<p>python新手。我使用了一个名为pdfminer的包,在这个包中,有一个命令<code>pdf2txt.py</code>在下面的代码中使用。我在单引号和双引号上有问题。我想在Windows中像这样使用<code>os.system()</code>:</p>
<pre><code>os.system('pdf2txt.py -o "E:\PDF\output.txt" "E:\PDF\A Functional Genetic Approach Identifies the PI3K Pathway as a Major Determinant of Trastuzumab Resistance in Breast Cancer.pdf"')
</code></pre>
<p>在Windows中,<code>"E:\PDF\A Functional Genetic Approach Identifies the PI3K Pathway as a Major Determinant of Trastuzumab Resistance in Breast Cancer.pdf"</code>必须使用双引号。在</p>
<p>现在,我使用<code>strSource = "E:\PDF\A Functional Genetic Approach Identifies the PI3K Pathway as a Major Determinant of Trastuzumab Resistance in Breast Cancer.pdf"</code>,但是我在<code>os.system()</code>中使用<code>StrSource</code>,它不能得到{<cd7>}。我认为<code>strSource</code>可能等于<code>'E:\PDF\A Functional Genetic Approach Identifies the PI3K Pathway as a Major Determinant of Trastuzumab Resistance in Breast Cancer.pdf'</code>。如何将<code>'</code>转换为<code>"</code>?在</p>