擅长:python、mysql、java
<p><a href="https://docs.python.org/2/library/os.path.html#os.path.isfile" rel="nofollow noreferrer">isfile</a>可能就是你要找的。在</p>
<pre><code>from os.path import isfile
from sys import argv
if len(argv) > 1:
print "is file", isfile(argv[1])
</code></pre>