Commits

Shuge Lee committed 4d967a8

rm commons/

Comments (0)

Files changed (2)

sipc/commons/__init__.py

-#!/usr/bin/env python
-
-from __future__ import generators
-from __future__ import with_statement
-
-import dbutils
-import funcutils
-import ooputils
-import timeutils
-import threadutils
-import utils
-import xmlutils
-
-from dbutils import *
-from funcutils import *
-from ooputils import *
-from timeutils import *
-from threadutils import *
-from utils import *
-from xmlutils import *

sipc/commons/utils.py

-from __future__ import with_statement
-
-import gzip
-import os
-import StringIO
-import shlex
-import subprocess
-import xmlutils
-import web
-
-
-
-def discard(container, elem):
-    """ Remove element elem from the set if it is present. """
-    if isinstance(container, dict):
-        if elem in container:
-            container.pop(elem)
-
-    elif isinstance(container, (tuple, list)):
-        if elem in container:
-            container.remove(elem)
-
-    elif isinstance(container, set):
-        container.discard(elem)
-
-    else:
-        raise TypeError("only accept iterable/set type")
-    
-
-