Simple plugin to Sublime Text 2 editor to copy the Python import path of the working file to clipboard.
The easiest way to install this is with Package Control.
To copy the Python import path of the working file press Ctrl+Shift+C or select an option from the context menu
(right-click
somewhere in the text area of the working file).
Note: to specify which files should be considered as "Python files" you can edit "python_extensions" variable in the settings.
Suppose the following directory tree of your Python project:
x.py
A/
__init__.py
y.py
B/
__init__.py
z.py
Depending on the current working file, the following paths will be stored in clipboard:
(current working file) -> (path copied to clipboard)
x.py -> x
y.py -> A.y
z.py -> A.B.z
A/__init__.py -> A
A/B/__init__.py -> A.B