<pre name="code" class="sql">[hadoop@MasterHadoop50 ~]$ hadoop namenode -format DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. Error: Could not find or load main class &
使用os.path.exists()方法可以直接判断文件是否存在.代码如下:>>> import os>>> os.path.exists(r'C:\1.TXT')False>>> os.path.exists(path)Return True if path refers to an existing path. Returns False for broken symbolic links. On some platforms, this func