1
+ < ?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns ="http://www.w3.org/1999/xhtml "> < head > < meta http-equiv ="Content-Type " content ="text/html; charset=UTF-8 " /> < title > 28.2. 表情符号 emoji</ title > < link rel ="stylesheet " type ="text/css " href ="../docbook.css " /> < meta name ="generator " content ="DocBook XSL Stylesheets Vsnapshot " /> < meta name ="keywords " content ="php,pear,pecl,phar, python, , " /> < link rel ="home " href ="../index.html " title ="Netkiller Python 手札 " /> < link rel ="up " href ="index.html " title ="第 28 章 3rdparty toolkit " /> < link rel ="prev " href ="index.html " title ="第 28 章 3rdparty toolkit " /> < link rel ="next " href ="graphics/index.html " title ="第 29 章 图形开发 " /> </ head > < body > < a xmlns ="" href ="//www.netkiller.cn/ "> Home</ a > | < a xmlns ="" href ="//netkiller.github.io/ "> 简体中文</ a > | < a xmlns ="" href ="http://netkiller.sourceforge.net/ "> 繁体中文</ a > | < a xmlns ="" href ="/journal/index.html "> 杂文</ a >
3
+ | < a xmlns ="" href ="https://github.com/netkiller "> Github</ a > | < a xmlns ="" href ="https://zhuanlan.zhihu.com/netkiller "> 知乎专栏</ a > | < a xmlns ="" href ="https://www.facebook.com/bg7nyt "> Facebook</ a > | < a xmlns ="" href ="http://cn.linkedin.com/in/netkiller/ "> Linkedin</ a > | < a xmlns ="" href ="https://www.youtube.com/user/bg7nyt/videos "> Youtube</ a > | < a xmlns ="" href ="//www.netkiller.cn/home/donations.html "> 打赏(Donations)</ a > | < a xmlns ="" href ="//www.netkiller.cn/home/about.html "> About</ a > < div class ="navheader "> < table width ="100% " summary ="Navigation header "> < tr > < th colspan ="3 " align ="center "> 28.2. 表情符号 emoji</ th > </ tr > < tr > < td width ="20% " align ="left "> < a accesskey ="p " href ="index.html "> 上一页</ a > </ td > < th width ="60% " align ="center "> 第 28 章 3rdparty toolkit</ th > < td width ="20% " align ="right "> < a accesskey ="n " href ="graphics/index.html "> 下一页</ a > </ td > </ tr > </ table > < hr /> </ div > < table xmlns =""> < tr > < td > < iframe src ="//ghbtns.com/github-btn.html?user=netkiller&repo=netkiller.github.io&type=watch&count=true&size=large " height ="30 " width ="170 " frameborder ="0 " scrolling ="0 " style ="width:170px; height: 30px; " allowTransparency ="true "> </ iframe > </ td > < td > < iframe src ="//ghbtns.com/github-btn.html?user=netkiller&repo=netkiller.github.io&type=fork&count=true&size=large " height ="30 " width ="170 " frameborder ="0 " scrolling ="0 " style ="width:170px; height: 30px; " allowTransparency ="true "> </ iframe > </ td > < td > < iframe src ="//ghbtns.com/github-btn.html?user=netkiller&type=follow&count=true&size=large " height ="30 " width ="240 " frameborder ="0 " scrolling ="0 " style ="width:240px; height: 30px; " allowTransparency ="true "> </ iframe > </ td > < td > </ td > < td > < a href ="https://zhuanlan.zhihu.com/netkiller "> < img src ="/images/logo/zhihu-card-default.svg " height ="25 " /> </ a > </ td > < td valign ="middle "> < a href ="https://zhuanlan.zhihu.com/netkiller "> 知乎专栏</ a > </ td > < td > </ td > < td > </ td > < td > </ td > < td > </ td > </ tr > </ table > < div class ="section "> < div class ="titlepage "> < div > < div > < h2 class ="title " style ="clear: both "> < a id ="id4451 "> </ a > 28.2. 表情符号 emoji</ h2 > </ div > </ div > </ div >
4
+
5
+ < pre class ="screen ">
6
+
7
+ import emoji
8
+ result = emoji.emojize('Python is :thumbs_up:')
9
+ print(result)
10
+ # 'Python is &#x27;
11
+ <br/># You can also reverse this:
12
+ result = emoji.demojize('Python is ')
13
+ print(result)<br/># 'Python is :thumbs_up:&#x27;
14
+
15
+ </ pre >
16
+ </ div > < script xmlns ="" type ="text/javascript " id ="clustrmaps " src ="//cdn.clustrmaps.com/map_v2.js?u=r5HG&d=9mi5r_kkDC8uxG8HuY3p4-2qgeeVypAK9vMD-2P6BYM "> </ script > < div class ="navfooter "> < hr /> < table width ="100% " summary ="Navigation footer "> < tr > < td width ="40% " align ="left "> < a accesskey ="p " href ="index.html "> 上一页</ a > </ td > < td width ="20% " align ="center "> < a accesskey ="u " href ="index.html "> 上一级</ a > </ td > < td width ="40% " align ="right "> < a accesskey ="n " href ="graphics/index.html "> 下一页</ a > </ td > </ tr > < tr > < td width ="40% " align ="left " valign ="top "> 第 28 章 3rdparty toolkit </ td > < td width ="20% " align ="center "> < a accesskey ="h " href ="../index.html "> 起始页</ a > </ td > < td width ="40% " align ="right " valign ="top "> 第 29 章 图形开发</ td > </ tr > </ table > </ div > < script xmlns ="">
17
+ ( function ( i , s , o , g , r , a , m ) { i [ 'GoogleAnalyticsObject' ] = r ; i [ r ] = i [ r ] || function ( ) {
18
+ ( i [ r ] . q = i [ r ] . q || [ ] ) . push ( arguments ) } , i [ r ] . l = 1 * new Date ( ) ; a = s . createElement ( o ) ,
19
+ m = s . getElementsByTagName ( o ) [ 0 ] ; a . async = 1 ; a . src = g ; m . parentNode . insertBefore ( a , m )
20
+ } ) ( window , document , 'script' , '//www.google-analytics.com/analytics.js' , 'ga' ) ;
21
+
22
+ ga ( 'create' , 'UA-11694057-1' , 'auto' ) ;
23
+ ga ( 'send' , 'pageview' ) ;
24
+
25
+ </ script > < script xmlns ="" async ="async ">
26
+ var _hmt = _hmt || [ ] ;
27
+ ( function ( ) {
28
+ var hm = document . createElement ( "script" ) ;
29
+ hm . src = "https://hm.baidu.com/hm.js?93967759a51cda79e49bf4e34d0b0f2c" ;
30
+ var s = document . getElementsByTagName ( "script" ) [ 0 ] ;
31
+ s . parentNode . insertBefore ( hm , s ) ;
32
+ } ) ( ) ;
33
+ </ script > < script xmlns ="" async ="async ">
34
+ ( function ( ) {
35
+ var bp = document . createElement ( 'script' ) ;
36
+ var curProtocol = window . location . protocol . split ( ':' ) [ 0 ] ;
37
+ if ( curProtocol === 'https' ) {
38
+ bp . src = 'https://zz.bdstatic.com/linksubmit/push.js' ;
39
+ }
40
+ else {
41
+ bp . src = 'http://push.zhanzhang.baidu.com/push.js' ;
42
+ }
43
+ var s = document . getElementsByTagName ( "script" ) [ 0 ] ;
44
+ s . parentNode . insertBefore ( bp , s ) ;
45
+ } ) ( ) ;
46
+ </ script > </ body > </ html >
0 commit comments