由买买提看人间百态
登录
首页
论坛
未名存档
话题女王
小圈子
马甲追踪
版面排名
流量曲线
水枪排名
发帖量曲线
发帖版面饼图
发帖时间柱图
关于本站
帮助
boards
本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字
访问原贴
Programming版
- 如果python command line positional arguments 里有些是运算,那这种argument 该怎么处理?
相关主题
●
python gc question
●
how to proof (转载)
●
About command line in C++
●
How to concatenate two .tar.gz files
●
[合集] 问个MatLab小问题 (转载)
●
大牛 in Perl and SED?
●
c++设计一问:如何动态地调用不同的算法的dll ?
●
[合集] 如何能让这个程序快一点呢?太慢了
●
[合集] 我也花了一小时读了一下python
●
gvim diff question
●
python: how to use an array as an argument
●
how to assign new value to loop variables?
●
请教python里面function的arguments的格式问题
●
A problem on string parsing (using either grep or perl)
●
python 问题,急,在线等。
●
请问call by name是不是C编译器都没实现
相关话题的讨论汇总
话题: arguments
话题: 运算
话题: python
话题: positional
话题: argument
进入Programming版参与讨论
1
(共1页)
a*****e
发帖数: 216
1
这两天在研究python command arguments, 有一个python command line script 要执
行多种运算,如 script1.py file1 union file2, script1.py size file3
这里union 是运算,合并两个文件,size 是求file3 的行数.
一个script1.py 可以完成这些运算,而且运算有许多,10来个.
这里的arguments 是positional arguments 吧?但是union, size 又是不一般的
arguments. 那么这种arguments 可以当optional argument 来处理吗?像这个文章里
的"--sum".
http://python.usyiyi.cn/python_278/library/argparse.html
这里还有一个文章:
https://docs.python.org.tw/3/howto/argparse.html
如果union , size 不能当optional argument 来处理,又要怎样处理呢?
这里有关于python optional arguments 的文章:
https://docs.python.org/2/library/getopt.html
多谢.
1
(共1页)
进入Programming版参与讨论
相关主题
●
请问call by name是不是C编译器都没实现
●
[合集] 我也花了一小时读了一下python
●
How to fix this? /bin/ls: Argument list too long
●
python: how to use an array as an argument
●
matlab: how to set defaul value for function arguments
●
请教python里面function的arguments的格式问题
●
static如何作为函数?
●
python 问题,急,在线等。
●
python gc question
●
how to proof (转载)
●
About command line in C++
●
How to concatenate two .tar.gz files
●
[合集] 问个MatLab小问题 (转载)
●
大牛 in Perl and SED?
●
c++设计一问:如何动态地调用不同的算法的dll ?
●
[合集] 如何能让这个程序快一点呢?太慢了
相关话题的讨论汇总
话题: arguments
话题: 运算
话题: python
话题: positional
话题: argument
未名新帖统计
// 7月16日
#
版面
帖数(主题数)
-
全站
4871 (796)
1
Military
3777 (569)
2
Stock
341 (51)
3
Joke
117 (17)
4
History
116 (3)
5
Automobile
100 (9)
6
USANews
55 (9)
7
Midlife
45 (1)
8
Headline
41 (41)
9
Dreamer
33 (13)
10
FleaMarket
32 (20)
11
Living
30 (7)
* 这里只显示发帖超过25的版面,努力灌水吧:-)
历史上的今天
faintcat妹妹看进来~~
发表于12年前.
NSC, PD 1/7/2007, EB2, ...
发表于11年前.
[FBA求购]MJVE2 758 MJVM2 ...
发表于6年前.
老生常谈,归与不归
发表于10年前.
【申请】Seattle西雅图 版版主——申请人...
发表于9年前.
宝宝出生,头骨骨折,求祝福
发表于9年前.
求推荐舒缓优美的古典音乐
发表于11年前.
百分之一的北京人上北大 中国网友愤怒(转载)
发表于10年前.
新人带狗狗Bailey来报道
发表于12年前.
全世界最有价值的运动队
发表于10年前.
请问大切诺基的质量如何
发表于6年前.
TNND,军版全是BKC
发表于15年前.
Inception
发表于12年前.
微软的有些家属可真恶心,为了卖保险脸都不要了
发表于10年前.
每周坐高铁的苦逼来说说感受吧!!
发表于9年前.