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

Python Output Format

by Tenzer ALL

Sublime Text plugin to format printed objects from Python code

Details

Installs

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

Readme

Source
raw.​githubusercontent.​com

Python Output Format

A simple plugin for Sublime Text inspired by Pretty JSON for formatting printed output from Python programs into a more easily readable format.

The plugin simply adds one action, cleverly named “Python Output Format”, which either takes the text you have selected, or, if nothing is selected, the entire active document, and attempts to format it in a way that is more easy to read.

It will for instance turn this blob:

{'details': 'https://github.com/Tenzer/PythonOutputFormat', 'releases': [{'sublime_text': '*', 'tags': True}], 'name': 'Python Output Format'}

into this:

{
    'details': 'https://github.com/Tenzer/PythonOutputFormat',
    'releases': [
        {
            'sublime_text': '*',
            'tags': True 
        }
    ],
    'name': 'Python Output Format'
}

Installation

The package is available via Package Control under the name “Python Output Format”.

Keyboard Shortcut

If you prefer to have a keyboard shortcut to trigger the “Python Output Format” action with, you can add it by opening your user keybindings in Sublime Text and add an entry like the following to the array:

{ "keys": ["super+ctrl+y"], "command": "python_output_format" }

You can of course specify the keyboard combination you prefer. Save the file and it will take effect immediately.