2008年12月17日

摘要: import os 删除文件: os.remove() 删除空目录: os.rmdir() 递归删除空目录: os.removedirs() 递归删除目录和文件(类似DOS命令DeleteTree): 方法1:自力更生,艰苦创业 # Delete everything reachable from the directory named in 'top',# assuming there... 阅读全文

posted @ 2008-12-17 13:15 古代 阅读(42819) 评论(1) 推荐(0) 编辑

摘要: 体验wxpython IN action的时候ImportError: No module named images替换为import wx.py.images as images将 images.getNewBitmap替换为 images.getPyBitmap() 阅读全文

posted @ 2008-12-17 13:14 古代 阅读(2909) 评论(1) 推荐(1) 编辑

摘要: Linux import socket import fcntl import struct def get_ip_address(ifname): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) return socket.inet_ntoa(fcntl.ioctl( s.fileno(), ... 阅读全文

posted @ 2008-12-17 13:13 古代 阅读(2863) 评论(1) 推荐(0) 编辑