I'm currently reading the code of virt-manager/virt-clone, but did not do much python before.
Here is the important parts of the code:
https://github.com/virt-manager/virt-manager/blob/master/virt-clone#L169
conn = cli.getConnection(options.connect)
design = Cloner(conn)
https://github.com/virt-manager/virt-manager/blob/master/virtinst/cli.py#L263
from .connection import VirtualConnection
conn = VirtualConnection(uri)
https://github.com/virt-manager/virt-manager/blob/master/virtinst/connection.py#L35
class VirtualConnection(object):
https://github.com/virt-manager/virt-manager/blob/master/virtinst/cloner.py#L591
return self.conn.lookupByName(name)
The last line looks like there is a method lookupByName called for an object of class VirtualConnection. However I cannot find such a method defined in that class and it does not have a parent class to get such a method from, either.
Can you help me spot the place where lookupByName is defined?
What might be a good way to find such an answer myself? (debugger, etc?)