V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
wanxi3
V2EX  ›  Python

怎么 pycharm 里调试 jython 程序

  •  
  •   wanxi3 · 2017-04-01 14:11:03 +08:00 · 2450 次点击
    这是一个创建于 2596 天前的主题,其中的信息可能已经有所发展或是发生改变。
    由于使用 ngrinder ,写脚本用的 jython 。用过 ngrinder 的都知道,在 web 上调试真的恶心。
    5 条回复    2017-04-01 17:23:49 +08:00
    kaneg
        1
    kaneg  
       2017-04-01 14:19:43 +08:00 via iPhone
    跟 python 一样的呀,你碰到什么问题?
    wanxi3
        2
    wanxi3  
    OP
       2017-04-01 14:23:13 +08:00
    @kaneg 脚本里需要引入 from net.grinder.script.Grinder import grinder,这个应该是 java 的包吧
    kaneg
        3
    kaneg  
       2017-04-01 14:32:54 +08:00 via iPhone
    @wanxi3 把包含该类的 jar 放在 jython 的 classpath 里,然后就跟 python 一样 debug
    wanxi3
        4
    wanxi3  
    OP
       2017-04-01 14:45:50 +08:00
    @kaneg 弱弱的问一下,把 jar 包放到 /usr/local/Cellar/jython/2.7.0/libexec/javalib 这个目录下可以吗
    kaneg
        5
    kaneg  
       2017-04-01 17:23:49 +08:00 via iPhone
    @wanxi3 看这个目录名应该可以的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3197 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 12:23 · PVG 20:23 · LAX 05:23 · JFK 08:23
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.