藉由官方版的binary升級的,
可以參考blog內,的google-chrome-bin官方版,
可以把
ebuild 加到 /urs/local/portage/www-client 下面
在/etc/make.conf
加入
PORTDIR_OVERLAY="/usr/local/portage/layman/gentoo-taiwan /usr/local/portage"
這樣以後eix-sync就不會蓋掉ebuild了。
$ curl -O https://raw.github.com/pypa/virtualenv/master/virtualenv.py
$ python virtualenv.py my_new_env
$ source my_new_env/bin/activate
(my_new_env)$ pip install ...
import urllib2
import sys
response=urllib2.urlopen('https://lh6.googleusercontent.com/-NfkO4cwbvyg/ToMlZ0Wn0xI/AAAAAAAAOE0/4HkR3tZ_doI/s640/IMG_6555.jpg')
img=response.read()
fh=open('zz.jpg','w')
fh.write(img)
fh.close()
#include <stdio.h>
int main()
{
printf("goodbye, dad\n");
return 0;
}
#-*- coding: utf-8 -*-
import pprint
pp=pprint.PrettyPrinter(indent=4)
wordlist=['中文','輸入']
strz='這是中文輸入法'
pp.pprint(wordlist)
print wordlist
print repr(wordlist)
print ''.join(wordlist)
for i in wordlist:
if i in strz:
print 'Go'
peicheng@PCsNB ~/project/python/gaisrec $ python test.py
['\xe4\xb8\xad\xe6\x96\x87', '\xe8\xbc\xb8\xe5\x85\xa5']
['\xe4\xb8\xad\xe6\x96\x87', '\xe8\xbc\xb8\xe5\x85\xa5']
['\xe4\xb8\xad\xe6\x96\x87', '\xe8\xbc\xb8\xe5\x85\xa5']
中文輸入
Go
Go
python self
Python为什么要self - 征服Python
http://sjolzy.cn/Why-should-self-Python.html
定義類別
http://caterpillar.onlyfun.net/Gossip/Python/Class.html
OGC Gains Comfort: Python 的 self
http://ogc-daily.blogspot.com/2008/10/python-self.html
Note for C++/Java/C# Programmers
The self in Python is equivalent to the self pointer in C++ and the this reference in Java and C#.
peicheng@PCsNB ~/project/python/chinese $ cat readr3.py
#coding=utf-8
f=open('rec2','r')
lines=f.readlines()
print type(lines)
for line in lines:
print line,
print type(line)
print line,
line=line.decode('utf-8').rstrip()
print len(line)
print type(line)
peicheng@PCsNB ~/project/python/chinese $ python readr3.py
<type 'list'>
test1
test2
<type 'str'>
test2
5
<type 'unicode'>