python Êý¾Ý¿â
def Start(self):
if (self.conn == None) or (self.conn.State == 1):
self.conn = win32com.client.Dispatch(r'ADODB.Connection')
self.conn.Open(self.DSN) #JD:here will occupy 2MB mem
if (self.rst == None) or (self.rst.State == 1):
self.rst = win32com.client.Dispatch(r'ADODB.Recordset')
self.rst.Open('[' + self.strTableName + ']', self.conn, 1, 3) #JD:here will occupy <1MB mem
Ïà¹ØÎĵµ£º
ÓÃPythonµ¼³öQQ¿Õ¼äµÄÈÕÖ¾µ½WordPress
ÎÄÕÂÀ´Ô´£ºhttp://www.keakon.cn/bbs/thread-964-1-1.html·½·¨ºÜ¼òµ¥£¬ÕÒ³öÈÕÖ¾µÄµØÖ·£¬ÔÙ±éÀúÁгöÈÕÖ¾µÄÄÚÈÝ¡£
ÒòΪµ¥´¿µ¼³öûÓ㬻¹µÃת»»³ÉÆäËû¸ñʽ£¬ËùÒÔÎÒ±£´æµ½Ò»¸öÁбíÀÿƪÈÕÖ¾¶¼¶ÔÓ¦ÆäÖеÄÒ»¸ö×ÖµäÔªËØ£¬×ÖµäµÄÊôÐÔ¶¼ÓÃunicode±àÂë¡£
È»ºódump³öÀ´£¬¿ÉÒÔ·½±ãÒÔºóÓÃPyth ......
×ÛºÏÍøÉϲ鵽µÄÄÚÈÝ£¬Ð´µÄPython·¢ËÍÓʼþµÄÀà¡£¸½¼þ²¿·Ö»¹Ã»Ð´ºÃ£¬Ö÷ÒªÊǸ½¼þµÄÎļþÃû²¿·Ö»¹²»¶Ô¡£
#!/usr/bin/env python
# coding:utf-8
import email
import smtplib
class Mailer:
def __init__(self, smtp_host, smtp_user, smtp_passwd, smtp_port = 25) :
self.smtp_host = smtp_host
s ......
½ñÌì¿´¿´ÈçºÎÓÃpythonʵÏÖ×¥°ü¡£
ÒÔÇ°ÎÒÃÇÔøÓùýwinpcapʵÏÖ×¥°ü£¬Æäʵ½ñÌìÎÒÃÇ»¹ÊÇÓÃËü£¬Ö»²»¹ýÊÇËüÔÚpythonϵÄÄ£¿é£¬ÔÚÓÃ֮ǰÎÒÃDZØÐëÏÈÏÂÔØÁ½¸ö¿â£¬pcap¿âºÍdpkt¿â£¬Õâ¸ö¿ÉÒÔÔÚGoogle codeÀïºÜÈÝÒ×ÕÒµ½£¬ÐèҪעÒâµÄÊÇpcapÖ»Ö§³Öµ½python2.5 £¬ËùÒÔÎÒÃÇÒªÓÃ2.5À´±àд¡£
°²×°ÍêÁ ......
#!/usr/bin/env python2
import pcap
import sys
import string
import time
import socket
import struct
protocols={socket.IPPROTO_TCP:'tcp',
socket.IPPROTO_UDP:'udp',
socket ......
Script Name: Spider_Create
#Script Label: Create Spider Diagrams
#
#Description: Custom python script developed to create spider diagrams from points contained
#in one or two feature classes. If using two fea ......