擅长:python、mysql、java
<p>不,直到python2.6才引入<a href="http://docs.python.org/library/stdtypes.html#str.format" rel="nofollow">^{<cd1>} method</a>。你知道吗</p>
<p>您应该改用旧样式<a href="http://docs.python.org/library/stdtypes.html#string-formatting" rel="nofollow">^{<cd2>} string formatting</a>:</p>
<pre><code>os.chdir('../../pulsararchive/%s' % pname)
</code></pre>