今天因为工作的缘故,需要用Python写一个能够完全分解文件名的小程序。

import os 

#path = os.path.abspath('.')
def split_fully(name):
parent_name,appendix = os.path.splitext(name)
if appendix == '':
return (parent_name,)
else:
return split_fully(parent_name) + (appendix, ) name = 'E-GEOD-66998.processed.1.zip'
result = split_fully(name)
print(result)

结果:  

Python tools used for file name devision的更多相关文章

  1. Seven Python Tools All Data Scientists Should Know How to Use

    Seven Python Tools All Data Scientists Should Know How to Use If you’re an aspiring data scientist, ...

  2. Python Tools for Machine Learning

    Python Tools for Machine Learning Python is one of the best programming languages out there, with an ...

  3. Python tools for Visual Studio插件介绍

          Python tools for Visual Studio是一个免费开源的VisualStudio的插件,支持 VisualStudio 2010,2012与2013.我们想要实现的是: ...

  4. plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory

    装一台新服务器环境的时候,装uwsgi报错: plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or di ...

  5. visual studio 2015使用python tools远程调试maya 2016

    步骤: 1. 去https://apps.exchange.autodesk.com/MAYA/en/Home/Index搜索Developer Kit并下载,maya 2016可以直接点击这里下载. ...

  6. python d:\test.py File "<stdin>", line 1 python d:\test.py ^ SyntaxError: invalid syntax

    pyhton出错: python d:\test.py File "<stdin>", line 1 python d:\test.py ^SyntaxError: i ...

  7. qingstor python-sdk 安装错误 src/MD2.c:31:20: fatal error: Python.h: No such file or directory

    ubuntu安装python qingstor-sdk, src/MD2.c:31:20: fatal error: Python.h: No such file or directory compi ...

  8. Ubuntu下 fatal error: Python.h: No such file or directory 解决方法

    参考: fatal error: Python.h: No such file or directory Ubuntu下 fatal error: Python.h: No such file or ...

  9. _mysql.c:29:20: error: Python.h: No such file or directory

    在Centos系统中安装 pip install MySQL-python 提示: _mysql.c:29:20: error: Python.h: No such file or directory ...

随机推荐

  1. DOM(一)

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  2. storm搭建(1)zookeeper搭建

    storm集群的安装我用了三台的虚拟机,ip分别是192.168.9.202和203和204,其中主机是202,两台分机的ip是203和204,之前两台机器的搭建已经完成,这次安装的环境是在204机器 ...

  3. Visual Studio 2013 发布正式版

    SELECT COUNT(1) 和SELECT COUNT(*)哪个性能好? Visual Studio 2013 发布正式版及使用感受 (注意:文末我添加了一个小节,用来更新最新的一些使用感受.) ...

  4. 初探中间件(middleware)

    初探中间件(middleware) 因为考虑到文章的长度, 所以 BaseHandler 的展开被推迟了. 在 BaseHandler 中隐藏着中间件的信息, 较常见的 SessionMiddlewa ...

  5. CodeForces Round

    CodeForces Round 199 Div2   完了,这次做扯了,做的时候有点发烧,居然只做出来一道题,差点被绿. My submissions     # When Who Problem ...

  6. 扩展jquery easyui datagrid编辑单元格

    扩展jquery easyui datagrid编辑单元格 1.随便聊聊 这段时间由于工作上的业务需求,对jquery easyui比较感兴趣,根据比较浅薄的js知识,对jquery easyui中的 ...

  7. SVN中Branch的创建于合并

    SVN中Branch的创建于合并 在使用源代码版本控制工具时,最佳实践是一直保持一个主干版本.但是为了应付实际开发中的各种情况,适时的开辟一些分支也是很有必要的.比如在持续开发新功能的同时,需要发布一 ...

  8. Easyui + asp.net MVC 系列教程 完成登录

    Easyui + asp.net MVC 系列教程 第09-17 节 完成登录 高清录制 前面八节 在这里 Easyui + asp.net mvc + sqlite 开发教程(录屏)适合入门 在接下 ...

  9. JavaScript的基本类型总结

    看了让你有收获的JavaScript的基本类型总结   Javascript是一种弱类型语言,没有明确的类型分类:网上分类的方式比较多,个人感觉不比去特别的追究细分是什么什么类型,若是能够明确的分出类 ...

  10. 移动收入超PC端 盛大文学战略转型初见成效

    随着智能手机和平板电脑的普及,越来越多的互联网服务也开始向移动端拓展,除了传统的互联网服务如搜索.即时通信之外,网络文学这项新兴的互联网业务也没忽视对移动端的布局. 7月9日,中国最大的网络文学出版平 ...