Reputation: 1560
If I import a module in IDLE using:
import <module_name>
print <module_name>.__file__
how can I open it without going through the Menu->File->Open multiple-step procedure?
It would be nice to open it via a command that takes the path and outputs a separate editor like IDLE.
Upvotes: 1
Views: 2620
Reputation: 13910
ALT-M
and write the name of the module in the popup boxCTRL-O
to open a fileUpvotes: 2
Reputation: 19165
I don't think IDLE will do it for you, but if you use Wing, you can mouse over the name of the module, and do a <Ctrl>-<Left Click>, or open the right click context menu on the module name, and select "Goto definition." Simple. You don't even have to know the module's file location; you just have to have it on your PYTHONPATH.
Limitation: It doesn't work if you add it to your PYTHONPATH using sys.path.append(). It has to be on the path that exists when the file is opened, though you can configure that on a per-project or per-file basis within Wing.
Upvotes: 0