为什么nailgun缓存命令行参数?

| 通过nailgun运行Jython程序时,jython程序始终与 第一次运行时的命令行参数。 首先,我启动钉枪:
arthur@a:~/nailgun$ java -jar nailgun.jar 
NGServer started on all interfaces, port 2113.
然后当我运行一个简单的jython脚本时:
import sys

print sys.argv
然后将jython添加到nailguns classpath
./ng ng-cp /usr/share/java/jython.jar 
然后运行带有单词“ first”作为脚本的脚本:
arthur@a:~/nailgun$ ./ng org.python.util.jython tmp.jy first
*sys-package-mgr*: can\'t create package cache dir, \'/usr/share/java/jython.jar/cachedir/packages\'
[\'tmp.jy\', \'first\']
以单词“ second”作为参数再次运行它,并显示“ first”
arthur@a:~/nailgun$ ./ng org.python.util.jython tmp.jy second
[\'tmp.jy\', \'first\']
并始终从此开始打印\“ first \”:
arthur@a:~/nailgun$ ./ng org.python.util.jython tmp.jy third
[\'tmp.jy\', \'first\']
    
已邀请:
        钉枪作者在这里。 Nailgun并非根据设计缓存命令行参数,但是单例和其他静态变量将在两次调用之间保留下来。 我不是python专家,但是对我来说\\ sys.argv \的用法肯定看起来像是单身。我建议研究jython的命令行参数处理,以了解为什么它没有得到更新。 如果执行此操作,请张贴您发现的内容……这可能是钉枪中的东西,但这不是我几年使用过的东西。     

要回复问题请先登录注册