◐ Shell
clean mode source ↗

Message 61510 - Python tracker

Please, could you use the python profiler instead? Since most of the
time is spent in the bytecode interpreter, the results are much more
meaningful.
Something like:

#!/usr/bin/env python
import xmlrpclib
import profile

u = 'someuser'
p = 'password'
server_url = 'http://rhn.redhat.com/rpc/api'

def f():
    server = xmlrpclib.Server(server_url)
    session = server.auth.login(u,p)
    l = server.channel.listSoftwareChannels(session)
    for a in l:
        print a['channel_label']

def g():
    try:
        f()
    except:
        pass

profile.run("g()")