Created
July 14, 2011 19:19
-
-
Save joshourisman/1083208 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sublime | |
import sublime_plugin | |
class Pep8CheckCommand(sublime_plugin.EventListener): | |
def on_post_save(self, view): | |
if view.file_name().endswith('.py'): | |
folder_name, file_name = os.path.split(view.file_name()) | |
view.window().run_command('exec', {'cmd': ['flake8', | |
file_name], 'working_dir': folder_name}) | |
sublime.status_message("pep8 " + file_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment