Example #1
0
def main():

    f = parser()
    f.add_option('-g',
                 '--groups',
                 help='group specifiers',
                 dest='groups',
                 default='#')
    f.add_option('-n', '--name', help='name', dest='name')

    options, args = f.parse_args()

    groups = options.groups.split(',')
    #topics = [ 'DS.' + g for g in groups ]
    topics = groups

    print topics

    s = Service(topics,
                options.name,
                host=hostname,
                port=port,
                user=user,
                password=password)
    try:
        s.run()
    except KeyboardInterrupt:
        s.close()
Example #2
0
def main():

    f = parser()
    f.add_option( '-g', '--groups', help = 'group specifiers', dest = 'groups', default = '#' )

    options, args = f.parse_args()

    groups = options.groups.split( ',' )
    #topics = [ 'SS.' + g for g in groups ]
    #print topics

    s = Service( groups, host=hostname, port=port, user=user, password=password )
    try:
        s.run()
    except KeyboardInterrupt:
        s.close()
Example #3
0
def main():

    f = parser()
    f.add_option( '-g', '--groups', help = 'group specifiers', dest = 'groups', default = '#' )

    options, args = f.parse_args()

    groups = options.groups.split( ',' )
    topics = [ 'SS.' + g for g in groups ]
    print topics

    s = Service( topics, duration = 10 )
    try:
        s.run()
    except KeyboardInterrupt:
        s.close()