wenstionly / ulipad

Automatically exported from code.google.com/p/ulipad
0 stars 0 forks source link

ubuntu 下用 ulipad 运行的时候 parser.parse_args() 返回的参数问题 #299

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. 代码:
def main():
    from optparse import OptionParser

    parser = OptionParser()
    options, args = parser.parse_args()

    print repr(args)

2. 在 ubuntu 下运行打印出的是
['']
3. 如果直接在命令行下运行打印出的就是
[]

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by zhangchu...@gmail.com on 6 Aug 2012 at 2:28

GoogleCodeExporter commented 9 years ago
这个是有什么问题吗?不太明白。

Original comment by limo...@gmail.com on 6 Aug 2012 at 11:38

GoogleCodeExporter commented 9 years ago
应该要跟命令行一样是没有参数才对,传了一个空串的参数,象
运行一些脚本的时候就会有问题,例如我写的一个脚本,没参数
的行为跟有参数的行为相差比较大

Original comment by zhangchu...@gmail.com on 7 Aug 2012 at 12:48