"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/TemplateCmdLineIface.py" between
cheetah3-3.2.1.tar.gz and cheetah3-3.2.2.tar.gz

About: Cheetah3 is a template engine and code generation tool for e.g. for Web development or Java, SQL, LaTeX, form email ... (written in Python).

TemplateCmdLineIface.py  (cheetah3-3.2.1):TemplateCmdLineIface.py  (cheetah3-3.2.2)
skipping to change at line 53 skipping to change at line 53
sys.exit(2) sys.exit(2)
for o, a in self._opts: for o, a in self._opts:
if o in ('-h', '--help'): if o in ('-h', '--help'):
print(self.usage()) print(self.usage())
sys.exit() sys.exit()
if o == '--env': if o == '--env':
self._template.searchList().insert(0, os.environ) self._template.searchList().insert(0, os.environ)
if o == '--pickle': if o == '--pickle':
if a == '-': if a == '-':
unpickled = load(sys.stdin) if hasattr(sys.stdin, 'buffer'):
stdin = sys.stdin.buffer # Read binary data from stdin
stdin = sys.stdin
unpickled = load(stdin)
self._template.searchList().insert(0, unpickled) self._template.searchList().insert(0, unpickled)
else: else:
f = open(a) f = open(a, 'rb')
unpickled = load(f) unpickled = load(f)
f.close() f.close()
self._template.searchList().insert(0, unpickled) self._template.searchList().insert(0, unpickled)
def usage(self): def usage(self):
return """Cheetah %(Version)s template module command-line interface return """Cheetah %(Version)s template module command-line interface
Usage Usage
----- -----
%(scriptName)s [OPTION] %(scriptName)s [OPTION]
 End of changes. 2 change blocks. 
2 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)