Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
source /opt/bbsage/current/libbsfl.sh
function folder_empty() { #@ Returns 0 if folder is empty and 1 if it is not.
if [[ ! "$(ls -A $1)" ]]; then
return 0
else
return 1
@cuddihyd
cuddihyd / xmlok_helloworld.py
Created July 7, 2012 04:01 — forked from anonymous/xmlok_helloworld.py
xml-object-kit-helloworld
from mint.xml.XmlObjectKit import make_xml_backed_class
Entity = make_xml_backed_class('entity',['name','description'],['id'])
e1 = Entity()
e1.name = "First Entity"
e1.description = "My First Entity."
e1.id = 123
xml_str = e1.to_xml()
print xml_str