diff options
| -rw-r--r-- | .project | 17 | ||||
| -rw-r--r-- | .pydevproject | 10 | ||||
| -rw-r--r-- | .settings/org.eclipse.core.resources.prefs | 3 | ||||
| -rw-r--r-- | fabfile.py | 27 | ||||
| -rwxr-xr-x | tabbed.py | 1 | ||||
| -rw-r--r-- | tabbed/cli.py | 12 |
6 files changed, 64 insertions, 6 deletions
diff --git a/.project b/.project new file mode 100644 index 0000000..ec9c0a7 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>tabbed</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.python.pydev.PyDevBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.python.pydev.pythonNature</nature> + </natures> +</projectDescription> diff --git a/.pydevproject b/.pydevproject new file mode 100644 index 0000000..1995a6d --- /dev/null +++ b/.pydevproject @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?eclipse-pydev version="1.0"?> + +<pydev_project> +<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property> +<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property> +<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH"> +<path>/tabbed/tabbed</path> +</pydev_pathproperty> +</pydev_project> diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..9e217cb --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +#Tue Jul 13 15:44:11 EDT 2010 +eclipse.preferences.version=1 +encoding//tabbed/cli.py=utf-8 diff --git a/fabfile.py b/fabfile.py new file mode 100644 index 0000000..d29811e --- /dev/null +++ b/fabfile.py @@ -0,0 +1,27 @@ +from fabric.api import * + + +def scrub(): + """ Death to the bytecode! """ + local("rm -fr dist build") + local("find . -name \"*.pyc\" -exec rm '{}' ';'") + +def test(): + """ Test parsing! """ + local("rm output/*") + local("./strata.py --nsanity_files 'strata/tests/samples/nsanity' -d") + +def build(): + """ Build application""" + pass + +def init(): + """ Initialize Environment """ + # TODO: Possibly add Virtual Environment? + local("sudo pip install -r REQUIREMENTS") + +if __name__ == '__main__': + # TODO: Remove (for testing purposes) + # TODO: [Possibly] add doctests + test() +
\ No newline at end of file @@ -10,4 +10,5 @@ import tabbed.cli if __name__ == '__main__': + tabbed.cli.start()
\ No newline at end of file diff --git a/tabbed/cli.py b/tabbed/cli.py index 47c6df7..77b354d 100644 --- a/tabbed/cli.py +++ b/tabbed/cli.py @@ -32,7 +32,7 @@ def start(in_file=None, out_file=None, **opts): if opts.version: print('Tabbed, Ver. %s' % tabbed.core.__version__) - exit(0) + sys.sys.exit(0) stdin = piped() @@ -45,7 +45,7 @@ def start(in_file=None, out_file=None, **opts): in_file = io.open(in_file, 'r') except Exception, e: print(' %s cannot be read.' % in_file) - exit(65) + sys.exit(65) file_ext = in_file.name.split('.')[-1] @@ -53,10 +53,10 @@ def start(in_file=None, out_file=None, **opts): setattr(opts, file_ext, True) else: print('Import format not supported.') - exit(65) + sys.exit(65) else: print('Please provide input.') - exit(65) + sys.exit(65) @@ -65,12 +65,12 @@ def start(in_file=None, out_file=None, **opts): # Multiple output formats given if _formats_sum > 1: print('Please specify a single output format.') - exit(64) + sys.exit(64) # No output formats given elif _formats_sum < 1: print('Please specify an output format.') - exit(64) + sys.exit(64) # fetch options.formats list |
