ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Python Path to Clipboard

by Mimino666 ALL

Copy the Python import path of the working file to clipboard. Plugin to Sublime Text 2.

Details

Installs

  • Total 1K
  • Win 668
  • Mac 195
  • Linux 214
Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12
Windows 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Python Path To Clipboard

Simple plugin to Sublime Text 2 editor to copy the Python import path of the working file to clipboard.

Install

The easiest way to install this is with Package Control.

Usage

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.

Example

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