![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
Dr. Hely
向往喧嚣的落寞行者
展开
-
Python实现更改大量文件名
Python实现更改大量文件夹名称想要实现文件夹名字从1-n,可以利用下面的代码:(可以更改后缀)import ospath='E:\\aLearn\\daiduan'i=1for file in os.listdir(path): if os.path.isfile(os.path.join(path,file))==True: new_name=file.replace(file,"%d.jpg"%i) os.rename(os.path.join(原创 2021-05-24 20:13:38 · 103 阅读 · 0 评论 -
ROS error: ‘nullptr’ was not declared in this scope
ROS中,编译cv_bridge时,error: ‘nullptr’ was not declared in this scope在cv_birdge 的cmakelists.txt中添加:include(CheckCXXCompilerFlag)CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)if(CO原创 2021-04-09 16:27:57 · 542 阅读 · 0 评论 -
Ubuntu转换python版本(python2与python3转换)
Ubuntu转换版本:(以python3转向python2为例)python --version / python -V #查看默认指向的python安装版本python2 --version / python2 -V #查看python2安装版本python3 --version / python3 -V #查看python3安装版本echo alias python=python2 >> ~/.bashrc #从python3转向python2source ~/.原创 2021-02-22 19:56:28 · 170 阅读 · 0 评论