# Path: moa/sysConf.py
# USERCONFIGFILE = os.path.join(os.path.expanduser('~'),
#                               '.config', 'moa', 'config')
# SYSCONFIGFILE = os.path.join('etc', 'moa', 'config')
# def _interpret_var(v):
#     def __init__(self):
#     def getUser(self):
#     def saveUser(self, conf):
#     def getVersion(self):
# class SysConf(Yaco.Yaco):


import os
import re
import fnmatch
import moa.ui
import moa.utils
import moa.actor
import moa.template
import moa.args
from moa.sysConf import sysConf
@moa.args.command
def out(job, args):
    """
    Show the stdout of the most recently executed moa job
    """
    out = moa.actor.getLastStdout(job)
    if out == None:
        moa.ui.exitError("No stdout found")
    else:
        print out

@moa.args.needsJob
@moa.args.doNotLog
@moa.args.command
def err(job, args):
    """
    Show the stderr of the most recently executed moa job
    """
    err = moa.actor.getLastStderr(job)
    if err == None:
        moa.ui.exitError("No stderr found")
    else:
        print err

@moa.args.doNotLog
@moa.args.command
def version(job, args):
    """
    print moa version number
    """

# Path: moa/sysConf.py
# USERCONFIGFILE = os.path.join(os.path.expanduser('~'),
#                               '.config', 'moa', 'config')
# SYSCONFIGFILE = os.path.join('etc', 'moa', 'config')
# def _interpret_var(v):
#     def __init__(self):
#     def getUser(self):
#     def saveUser(self, conf):
#     def getVersion(self):
# class SysConf(Yaco.Yaco):


# Path: moa/plugin/system/info.py
import os
import re
import fnmatch
import moa.ui
import moa.utils
import moa.actor
import moa.template
import moa.args
from moa.sysConf import sysConf

@moa.args.command
def out(job, args):
    """
    Show the stdout of the most recently executed moa job
    """
    out = moa.actor.getLastStdout(job)
    if out == None:
        moa.ui.exitError("No stdout found")
    else:
        print out

@moa.args.needsJob
@moa.args.doNotLog
@moa.args.command
def err(job, args):
    """
    Show the stderr of the most recently executed moa job
    """
    err = moa.actor.getLastStderr(job)
    if err == None:
        moa.ui.exitError("No stderr found")
    else:
        print err

@moa.args.doNotLog
@moa.args.command
def version(job, args):
    """
    print moa version number
    """

    print sysConf.getVersion()