Script shows:
[[email protected] tmp]# cat test.py #!/usr/bin/env pythondef func (): x = 1 Global xfunc () print X
Syntax warning
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/86/8B/wKioL1fDqR3SJ20hAAAY4csR6cg140.png-wh_500x0-wm_3 -wmp_4-s_3150784193.png "title=" 3.png "alt=" Wkiol1fdqr3sj20haaay4csr6cg140.png-wh_50 "/>
modifying scripts
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/86/8C/wKiom1fDqhOg9LrpAAAi1QoX5AY169.png-wh_500x0-wm_3 -wmp_4-s_3350760330.png "title=" 3.png "alt=" Wkiom1fdqhog9lrpaaai1qox5ay169.png-wh_50 "/>
Execute script
[[email protected] tmp]# python test.py 1
See the script above does not appear syntax warning again
This article is from the "Wsyht90 blog" blog, make sure to keep this source http://wsyht90.blog.51cto.com/9014030/1843795
Questions about Python functions defining global variables to perform pop-up syntaxwarning