Did I find the right examples for you? yes no

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
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/m/y/mykvm-0.3.8/mykvm/command.py   mykvm(Download)
from mykvm import BASE_IMAGES_PATH
from mykvm import IMAGES_PATH
from mykvm import MYKVM_CONFIG_PATH
 
from mykvm.util import bcolors
        cmd.append("-f")
        cmd.append("qcow2")
        cmd.append(IMAGES_PATH + '/' + self.vm.get_name() + ".qcow2")
 
        #print " ".join(cmd)
        cmd.append("rm")
        cmd.append("-f")
        cmd.append(IMAGES_PATH + '/' + self.vm.get_name() + ".qcow2")
 
        subprocess.call(cmd)
        cmd.append(self.vm.get_ram())
        cmd.append("--disk")
        cmd.append(IMAGES_PATH + '/' + self.vm.get_name() + ".qcow2,format=qcow2")
        for netdev in self.vm.get_netdevs():
            cmd.append("--network")

src/m/y/mykvm-0.3.8/mykvm/main.py   mykvm(Download)
from mykvm import VERSION
from mykvm import BASE_IMAGES_PATH
from mykvm import IMAGES_PATH
 
from mykvm.model import NetDev
        os.makedirs(BASE_IMAGES_PATH)
 
    if not os.path.exists(IMAGES_PATH):
        os.makedirs(IMAGES_PATH)
 
        if command == 'up':
            print bcolors.OKGREEN + 'start ' + vm.get_name() + bcolors.ENDC
            image = IMAGES_PATH + '/' + vm.get_name() + ".qcow2"
            if os.path.isfile(image):
                print "image file aleady exists : %s" % image