Hi pants people. I’m just curious at a high level,...
# general
c
Hi pants people. I’m just curious at a high level, is it possible at all to get the IDE features working for python? e.g. symbol recognition, goto declaration (command-b in pycharm), and attaching a debugger? I’m nearly certain the answer is no, considering the notes on the site, but it’s worth asking! Thanks.
e
I'm pretty sure there is nothing fundamental blocking this support, just a lack of time / prioritization. You can work around by creating a virtualenv and populating it with
pip install -U -r <(./pants dependencies --external-only 3rdparty/python::)
. I use this workaround encoded in a script that also runs pants export and then point to this script when setting up my project using the idea plugin:
Copy code
#!/usr/bin/env bash
set -euo pipefail

cd "$(git rev-parse --show-toplevel)"

# Update the python2 venv if needed for use as a Python SDK in IDEA.
./python --version >&2

# Update java dependencies.
exec ./pants --no-enable-pantsd export src/java::
In that example
./python
is a script that handles the venv creation / updating using the technique shown above.
h
@average-lawyer-7503 John are you still working on this? Or were you working on something else?
a
Kind of? Pycharm’s on my Someday projects. IntelliJ works w/symbol recognition, jump-to… debugger is still ipdb for me but I am unsure if that’s a foursquare limitation or a pants plugin limitation… playing around with it myself
c
@enough-analyst-54434 Awesome, that’s about all I needed! I will play with that today.
@average-lawyer-7503 I mostly meant intellij above 🙂 I am still curious how a debugger actually attaches.