Permalink
Browse files

Init.

  • Loading branch information...
danfis committed Nov 16, 2009
0 parents commit f492d19b450e6fb4717583ed6b22ec7921c4ac90
Showing with 23 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. 0 pitweb/__init__.py
  3. +21 −0 pitweb/core.py
@@ -0,0 +1,2 @@
*.pyc
*.pyo
No changes.
@@ -0,0 +1,21 @@
from subprocess import Popen, PIPE, STDOUT
GIT = '/usr/bin/git'
class Git(object):
def __init__(self, dir):
self._dir = dir
def _git(self, *args):
comm = [GIT, '--git-dir={0}'.format(self._dir)]
comm.extend(args)
pipe = Popen(comm, stdout = PIPE, stderr = STDOUT)
out = pipe.stdout.read()
return out
if __name__ == '__main__':
git = Git('../.git')
print git._git('rev-list')

0 comments on commit f492d19

Please sign in to comment.