"Show usages" in Python


I’m trying to figure out how to get “Show usages” working with Python code.

In case it’s relevant, I’m using Django in a virtualenv. I have a project full of old code which I want to clean up by throwing away the code that is no longer in use. The problem is that many (or even most) of these functions, variables and classes are so generally named that this cannot reasonably be achieved by simply looking by string. So I need a tool that actually understands the code itself well enough to look up usages and references of selected functions, variables and classes. I’m under the impression that Atom can do this, but I cannot figure out how.

When I select a function, right-click it and select “Show Usages”, nothing happens aside from the right-button mouse menu going away. I receive no information on what else to do. I’ve searched this online but can’t even figure out if it’s supposed to work with Python or not. I have a package called “python-tools” installed, but that’s about all I know.

Is there anything I can do to either find any hints about what I’m missing, or can someone tell me if this is perhaps unsupported functionality as of yet? I feel that the menu entry should be disabled if it’s not available. Otherwise, obviously, it should work or let the user know what’s wrong when it doesn’t. :slight_smile:

Any help greatly appreciated. Thanks in advance!


A quick look at the python-tools issues and it seems like Show Usages has some problems. There’s an open issue for jedi (the external application that makes Show Usages work) about it. So the problem isn’t with Atom or python-tools.


Okay, thanks! I’ll just wait until it gets fixed, then. :slight_smile: