import optparse
usage = "myprog[ -f <filename>][-s <xyz>] arg1[,arg2..]"
opter=optparse.OptionParser(usage)
opter.add_option("-f","--format",action="store_true",dest="format",help="format print")
opter.add_option("-t", "--table", action="store", type="string", dest="table",help=u"输入一个表名")
opter.add_option("-q", "--query", action="store", type="string", dest="term",help=u"查询的关键字")
opter.add_option("-o", "--output", action="store", type="string", dest="outfile",help=u"输出文件")
opt,args=opter.parse_args()

输入:-h

Options:
-h, --help show this help message and exit
-f, --format format print
-t TABLE, --table=TABLE
输入一个表名
-q TERM, --query=TERM
查询的关键字
-o OUTFILE, --output=OUTFILE
输出文件

最新文章

  1. Android项目实战(二十六):蓝牙连接硬件设备开发规范流程
  2. 十天精通CSS3学习笔记 part2
  3. DevExpress .NET界面开发示例大全
  4. Mobile Assistant
  5. [ZZ] C++ pair
  6. 编译小结(6)认识Automake
  7. InterviewProblems
  8. 调bug时候应该提高思维深度(多问二十个为什么)
  9. 手把手教你如何加入到github的开源世界! (转)
  10. 转:运行yum报错Error: Cannot retrieve metalink for reposit
  11. j2se 总结
  12. checkbox对齐-复选框图标
  13. from表单校验插件 validate 实例
  14. WPF数字滚动效果
  15. Zookeeper安装及运行
  16. 1--常用linux命令
  17. Windows XP Manifest in Delphi
  18. 修改request请求参数
  19. 《深入浅出WPF》读书笔记
  20. Informatica 常用组件Lookup之一 概述

热门文章

  1. Nginx + tomcat 实现简单集群(基于反向代理方式)
  2. php--点赞功能的实现
  3. github 获取repo 发布的版本号
  4. hdu 2739(尺取法)
  5. LeetCode OJ-- Recover Binary Search Tree ***@
  6. ASP.NET MVC 实现 AJAX 跨域请求
  7. Codeforces 371E Subway Innovation (前缀和预处理应用)
  8. iOS 给三方日历加上农历
  9. Mac测试模拟慢网速
  10. [置顶] 个人微信号发送zabbix告警信息