python学习笔记:利用asyncore的端口映射(端口转发)
摘要:import asyncoreimport socketimport sysclass Receiver(asyncore.dispatcher_with_send): def __init__(self,sock,remote_ip,remote_port): asyncore.dispatcher_with_send.__init__(self,sock=sock) self.buffer="" self.max_buffer_size=1024000 self.remote_ip=remote_ip se...
阅读全文
posted @
2013-05-23 11:13
回头多少个秋
阅读(4887)
推荐(1)
python学习笔记:sqlite3查询
摘要:import sqlite3if __name__ =='__main__': db_file='d:\\data.db' conn=sqlite3.connect(db_file) cur=conn.cursor() cur.execute('SELECT * FROM table1') records=cur.fetchall() for x in records: print x[0]+' '+x[1] #有多少列就打印多少个 conn.close()
阅读全文
posted @
2013-05-21 17:06
回头多少个秋
阅读(335)
推荐(0)
python学习笔记:遍历目录
摘要:import osimport os.pathif __name__ =='__main__': root_dir='g:\\download' for root, dirs, files in os.walk(root_dir): for dir in dirs: print 'root=%s dir=%s' % (root,dir) #print 'root='+root+' dir='+dir for file in files: print 'roo...
阅读全文
posted @
2013-05-21 17:01
回头多少个秋
阅读(151)
推荐(0)
VMware Workstation 9: This virtual machine's policies are too old to be run by this version of VMware
摘要:问题症状:This virtual machine's policies are too old to be run by this version of VMware. Contact your system administrator.解决方法:删除.vmx文件中如下三行policy.vm.mvmtid = "52 d6 6f f9 f3 36 0f 9f-31 da 9f f5 90 7b ce 76"policy.vm.managedVMTemplate = "TRUE"policy.vm.managedVM = "FALSE&
阅读全文
posted @
2013-05-02 15:34
回头多少个秋
阅读(746)
推荐(0)