Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
str(object='') -> string

Return a nice string representation of the object.
If the argument is a string, the return value is the same object.

src/k/a/karesansui-HEAD/karesansui/lib/firewall/iptables.py   karesansui(Download)
 
import karesansui
from karesansui.lib.const import FIREWALL_XML_FILE, \
     FIREWALL_USERCHAIN, RH_USERCHAIN, KARESANSUI_GROUP
from karesansui.lib.utils import get_xml_xpath as XMLXpath, \
            for aline in res:
                aline = aline.rstrip()
                aline = aline.replace(RH_USERCHAIN,FIREWALL_USERCHAIN)
 
                m = end_regex.match(aline)
 
        try:
            self.firewall_xml['filter'][FIREWALL_USERCHAIN]
        except:
            self.firewall_xml['filter'][FIREWALL_USERCHAIN] = {}
 
        try:
            self.firewall_xml['filter'][FIREWALL_USERCHAIN]['rule']