import os # 查找当前目录下所有包含关键字的文件 def findFile(path, filekw): return[os.path.join(path,x) for x in os.listdir(path) if os.path.isfile(x) and os.path.split(x)[1].find(filekw)>-1] # 获取指定目录下的次级目录 def findDir(path1): return[os.path.join(path1,x) for x in os.
Xshell配置ssh登陆远程服务器,找不到 root/.ssh目录,报错信息如下: root@ubuntu:/home/xinxin# cd /root/.ssh/bash: cd: /root/.ssh/: No such file or directory 谷歌(参考原文:http://www.cnblogs.com/zwgblog/p/5838314.html),解决办法: 没有用root用户登录过,执行下ssh操作,就能自动生成, ssh localhost yes 输入passwor
先看两篇博文,作为基础知识.如果对C/C++编译链接过程都了解的话,可以跳过不看. http://www.firedragonpzy.com.cn/index.php/archives/2556 http://www.cppblog.com/shifan3/archive/2007/01/05/17325.html 一. 编译不同目录下的多个文件 各个文件的布局如下: head.h文件的代码: #ifndef HEAD_H #define HEAD_H int add(int a, int
#自定义函数: import ospath="D:\\Temp_del\\a"def gci (path): """this is a statement""" parents = os.listdir(path) for parent in parents: child = os.path.join(path,parent) #print(child) if os.path.isdir(child): gci(child)