Skip to content

Commit

Permalink
core structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Reitz committed Aug 27, 2011
1 parent a9682e7 commit 0b8b22a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions envoy/__init__.py
@@ -0,0 +1 @@
from core import *
43 changes: 43 additions & 0 deletions envoy/core.py
@@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-

"""
envoy.core
~~~~~~~~~~
This module provides
"""

import subprocess
import shlex


class Response(object):
"""A command's response"""

def __init__(self):
super(Response, self).__init__()
self.command = None

def __repr__(self):
return '<Respones [{0}]>'.format(self.command)

@property
def status_code(self):
return 0

@property
def std_out(self):
return ''

@property
def std_err(self):
return ''


def run(command, data=None, timeout=None):
"""Executes a given commmand and returns Response.
Blocks until process is complete, or timeout is reached.
"""

return Response()

0 comments on commit 0b8b22a

Please sign in to comment.