general update

This commit is contained in:
Kenneth Reitz
2010-07-16 17:23:10 -04:00
parent 2d7fc6d108
commit 1731782113
6 changed files with 64 additions and 6 deletions
+17
View File
@@ -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>
+10
View File
@@ -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>
@@ -0,0 +1,3 @@
#Tue Jul 13 15:44:11 EDT 2010
eclipse.preferences.version=1
encoding//tabbed/cli.py=utf-8
Vendored
+27
View File
@@ -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()
+1
View File
@@ -10,4 +10,5 @@ import tabbed.cli
if __name__ == '__main__':
tabbed.cli.start()
+6 -6
View File
@@ -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