python ²Ù×÷postgresqlµÄpgdb¿âµÄÎÊÌâ
ÈçºÎ»ñȡвåÈë¼Ç¼µÄij¸ö×ֶΡ£ÒÔusers±íΪÀý£¬±íÖÐÓÐ×Ö¶Îid£¨×ÔÔö£©£¬ÔÚ²åÈëÍê±ÏÖ®ºóÈçºÎ»ñÈ¡¸ÃÌõ¼Ç¼µÄid£¿
ÁíÄÄλÈÊÐÖÄܸøÎÒµãpgdbµÄ×ÊÁÏ£¬¿´ÁËÏÂÓ¢ÎĵÄ×ÊÁÏ£¬¸Ð¾õ²»ÊǺܺÃÀí½â....
ÒªÊÇÄÜ°ïÎÒÕâ¸öÎÊÌâ¸ã¶¨£¬ÎÒ°Ñ·ÖÈ«É¢³öÈ¥£¬Ï±¸¾Ò²²»È¢ÁË¡£
ÎÒÊÇÀ´¶¥ÌùµÄ¡£¡£¡£
¶¥Æð
Ïà¹ØÎÊ´ð£º
ʹÓÃÔ´Îļþ
#!/usr/bin/python
# Filename : helloworld.py
print 'Hello World'
ÎÒÔõôҲ¿´²»¶®£¡Ö»ÊÇ×îºóÒ»ÐÐÎÒÖªµÀ~~Ç°ÃæÁ½ÐÐÊÇʲôÒâ˼ÄØ£¿
½Ì³ÌÉÏ˵Èç¹ûÄãʹÓÃIDLE£¬ÇëʹÓò˵ ......
Ïñ C µÄ scanf() ÄÇÑù
±ÈÈç¶ÁÈë 1 2 3 a b c
ÿ´Î¶ÁÈëÒ»¸ö
ÏÂÃæÕâ¸öÓ¦¸ÃÊÇÄãÏëÒªµÄ°É£º
Python code:
>>> k = raw_input()
0 0123 ds dsl sd
>>> k
'0 0123 ds dsl sd'
>>> ......
s='aaa111aaa,bbb222,333ccc,444ddd444,555eee666,fff777ggg'
ÓÃÕýÔò±í´ïʽȡ³ö Ç°ºó×ÖĸÏàͬµÄÊý¾Ý ½á¹ûÈçÏÂ:
111 ddd
лл~
Python code:
import re
s='aaa111aaa,bbb222,333ccc,444ddd444,555eee666,ff ......
ÓźñµÄ¸å³ê£¬³ÏÕÐPython¼¼ÊõÈËÔ±²ÎÓë¸÷ÖÖ¼¼ÊõÊé¼®³ö°æ¡£
ͨ¹ý¸ÃÊé¼®£¬×÷Õß¿ÉÒԵõ½Èçϱ¨³ê£º
1¡¢·áºñµÄ¸å³ê¡£
2¡¢Êé¼®Öø×÷µÄÊðÃûȨ¡£
3¡¢¶Ô×÷ÕߺÍÊé½øÐÐÐû´«£¬Ìá¸ß×÷ÕßÔÚ¼¼ÊõȦ×ÓÀ ......
·¢ÏÖpython2.6
import httplib
conn=httplib.HTTPSConnection('x.x.x.x')
conn.request('','')
rd=conn.getresponse()
conn.close()
ÕâÑù½áÊøºó»á±ä³ÉCLOSE_WAIT״̬£¬ÎÒ ......