Baker 12

Baker 12
  • Downloads: 166
  • Requirements:
  • Size:
  • Licence:
  • Version: 1.2
  • Added At: 2012-11-07
  • Publisher Site:



Baker 12

Share

Baker is a Python module that lets you easily add a command line interface to your Python functions using a simple decorator, to create scripts with "sub-commands", similar to Django's manage.py, svn, hg, etc.:#!pythonimport baker# An imaginary script full of useful Python [email protected] set(name, value=None, overwrite=False): """Sets the value of a key in the database. If you don't specify a value, the named key is deleted. Overwriting a value may not be visible to all clients until the next full sync. """ db = get_database() if overwrite or name not in db: if value is None: db.delete(name) print "Deleted %s" % name else: db.set(name, value) print "Set %s to %s" % (name, value) else: print "Key exists!"@baker.commanddef get(name): "Prints the value of a
Baker is a Python module that lets you easily add a command line interface to your Python functions using a simple decorator, to create scripts with "sub-commands", similar to Django's manage.py, svn, hg, etc.:#!pythonimport baker# An imaginary script full of useful Python [email protected] set(name, value=None, overwrite=False): """Sets the value of a key in the database. If you don't specify a value, the named key is deleted. Overwriting a value may not be visible to all clients until the next full sync. """ db = get_database() if overwrite or name not in db: if value is None: db.delete(name) print "Deleted %s" % name else: db.set(name, value) print "Set %s to %s" % (name, value) else: print "Key exists!"@baker.commanddef get(name): "Prints the value of a �. you can free download Baker 12 now.
Soft85 only provide legal software, please help us keeping pur site legal, if you think this page is violating copyrights please let us know by clicking here Here






comments powered by Disqus

Download Baker 12 _FREE_