Python之变量和打印
#coding:utf-8
name = 'Zed A. Shaw'
age = 8.123 # not a lie
height = 74 # inches
weight = 180 # lbs
eyes = 'Blue'
teeth = 'White'
hair = 'Brown'
print "His name is %s" %name
#coding:utf-8
name = 'Zed A. Shaw'
age = 8.123 # not a lie
height = 74 # inches
weight = 180 # lbs
eyes = 'Blue'
teeth = 'White'
hair = 'Brown'
print "His name is %s" %name
# -*- coding: utf-8 -*-
#!/usr/bin/python
import os
import re
mykvm=os.popen('virsh list').readlines()
for line in kymvm:
kvmid=re.search( r'kvm.[0-9]\d*', line)
if kvmid:
print kvmid.group()
首先安装 epel扩展源:
yum -y install epel-release
然后安装pip:
yum -y install python-pip