Skip to content

Commit

Permalink
Set up the Git submodule automatically on first invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
witsch committed Sep 25, 2011
1 parent 0557d0f commit 8be2ca7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Tidy.py
@@ -1,12 +1,18 @@
from sublime_plugin import TextCommand
from sublime import Region
from os.path import abspath, expanduser, exists
from subprocess import call
from os.path import abspath, expanduser, exists, join
from StringIO import StringIO
from sys import path


# tweak path to allow importing PythonTidy from the git submodule
# load the git submodule
extra = abspath('PythonTidy')
if not exists(join(extra, '.git')):
call(['git', 'submodule', 'init'])
call(['git', 'submodule', 'update'])

# tweak path to allow importing PythonTidy from the git submodule
path.insert(0, extra)
import PythonTidy
import PythonTidyWrapper
Expand Down

0 comments on commit 8be2ca7

Please sign in to comment.