コード例 #1
0
ファイル: iowl.py プロジェクト: BackupTheBerlios/iowl
def main():
    try:
        opts, args = getopt.getopt(sys.argv[1:], "hc:", ["help", "configfile="])
    except getopt.GetoptError:
        # print help information and exit:
        usage()
        sys.exit(1)

    configfile = "iowl.cfg"
    output = None
    for o, a in opts:
        if o in ("-h", "--help"):
            usage()
            sys.exit()
        if o in ("-c", "--configfile"):
            configfile = a

    # create pManager as attribute of Module pManager
    # Really strange, but works and enables everyone access to pManager through importing
    # modul pManager
    pManager.manager = pManager.cManager(configfile)

    # start, depending on os
    if sys.platform[:3] == 'win':
        # windows...
        winstart()
    else:
        # start console-based
        unixstart()
コード例 #2
0
    u3 = urlparse.urlparse('http://drei')
    u4 = urlparse.urlparse('http://vier')
    u5 = urlparse.urlparse('http://fuenf')

    i1 = cItemset.cItemset()
    i1.SetUrls([u1,u2,u3])
    i2 = cItemset.cItemset()
    i2.SetUrls([u1,u2,u4])
    i3 = cItemset.cItemset()
    i3.SetUrls([u1,u3,u4])
    i4 = cItemset.cItemset()
    i4.SetUrls([u1,u3,u5])
    i5 = cItemset.cItemset()
    i5.SetUrls([u2,u3,u4])

    iss.AddItemset(i1)
    iss.AddItemset(i2)
    iss.AddItemset(i3)
    iss.AddItemset(i4)
    iss.AddItemset(i5)

    a.Join(iss).Print()


import pManager

if __name__ == '__main__':
    pManager.manager = pManager.cManager('')
    test()