#提取文件中的方法名称

# -*- coding:utf-8 -*-

def Query_Method(filepath):

    file = open(filepath,'r',encoding= 'UTF-8').readlines()
    print ('\n\n')
    str = ""
    for i in file:
        if i.startswith('def') or i.startswith('    def'):
            str += i[8:-4]
            # print(str)
            str += ","
    # print(str)
    return str

if __name__ == '__main__':
    Query_Method("..\\data\\test_InitializationData.py")

最新文章

  1. Android开发aidl使用中linkToDeath和unlinkToDeath的使用
  2. etcd:用于服务发现的键值存储系统
  3. Hadoop之HDFS文件读写过程
  4. [Linux]系统调用理解(2)
  5. .NET 动态脚本语言Script.NET 入门指南 Quick Start
  6. c++map的用法 分类: POJ 2015-06-19 18:36 11人阅读 评论(0) 收藏
  7. liunx之tar 命令
  8. Strust2 <c:forEach> 循环控制标签
  9. jquery next nextAll nextUntil siblings的区别
  10. python学习笔记之二:使用字符串
  11. lua.c:80:31: fatal error: readline/readline.h: No such file or directory
  12. rails自动生成大量记录的方法
  13. c# 通过MailHelper发送QQ邮件
  14. java反射使用和源码解析
  15. SQL 语句中 where 条件后 写上1=1 的意思
  16. pyqt5-QWidget-窗口状态(最大化最小化等)
  17. HDU 3605 Escape (网络流,最大流,位运算压缩)
  18. aop(Aspect Oriented Programming)面向切面编程
  19. Egret的屏幕适配模式图示
  20. centos crontab详解

热门文章

  1. 中国各省市县级 JSON 文件
  2. centos系统下安装python3以及pip3
  3. P5238 整数校验器
  4. C++ 11 snippets , 1
  5. 【转】python f-string
  6. boost--asio--读写大总结
  7. 游记-NOIP2018
  8. 【转】Java并发编程:阻塞队列
  9. (常用)loogging模块及(项目字典)
  10. Jenkins pipeline概念理解