易截截图软件、单文件、免安装、纯绿色、仅160KB

转段Python代码

#==================================================
import wx
import wx.media

class MyFrame(wx.Frame):
def __init__(self,parent,title):
wx.Frame.__init__(self,parent,-1,title,pos=(150,150),size&;nbsp;=(640, 480),style=wx.MAXIMIZE_BOX|wx.SYSTEM_MENU|wx.CAPTION|wx.CLOSE_BOX|wx.CLIP_CHILDREN)
self.Bind(wx.EVT_CLOSE,self.OnCloseWindow)
panel = wx.Panel(self,size=(350,200))
video = wx.media.MediaCtrl(panel,-1,fileName ="V003.mpg",pos=wx.Point(100,50),size=wx.Size(320,240))

video.ShowPlayerControls(flags = wx.media.MEDIACTRLPLAYERCONTROLS_STEP) ;; ;
video.Play()

def OnCloseWindow(self,event):
self.Destroy()
class MyApp(wx.App):
def OnInit(self):
frame = MyFrame(None,'Form1')
frame.Show(True)
return True
app=MyApp(redirect=True)
app.MainLoop()
from:http://bytes.com/topic/python/answers/697643-using-wxmediactrl-wxpython


相关文档:

BeautifulSoup Python抓网页小例子

# -*- coding: utf-8 -*-
import urllib2
from BeautifulSoup import BeautifulSoup, Tag
import re
page = urllib2.urlopen("http://bj.ganji.com/piao/zz_%E5%8C%97%E4%BA%AC-%E5%8D%97%E6%98%8C/20100210/")
soup = BeautifulSoup(page)
#ss = soup.findAll('a', href=re.compile(r"^/piao/100.&qu ......

Python学习笔记 文件读写

Python中文件操作可以通过open函数,这的确很像C语言中的fopen。通过open函数获取一个file object,然后调用read(),write()等方法对文件进行读写操作。
1.open
使用open打开文件后一定要记得调用文件对象的close()方法。比如可以用try/finally语句来确保最后能关闭文件。
file_object = open('thefile.txt') ......

一篇不错的Python入门教程

原文
 http://www.hetland.org/python/instant-hacking.php
Instant Hacking[译
文]
译者: 肯定来过                                ......

Python文件的读写

相比java而言,Python用几行代码就可以代替java十来行的代码,真的非常不错
'''
Created on 2009-9-2
@author: jiangqh
'''
# file create and write
context = '''hello world
hello china '''
f = file("hello.txt",'w')
f.write(context)
f.close()
文件创建
#use readline() read file
f = o ......

呆呆的Python 笔记


一些综合的信息
Python
里,缩进很重要。没有尖括号不要紧,

Python
根据缩进来分割语句块。
参数不需要定义,可以直接使用。
Help(var)
查看
var
的帮助。
Var
可以为任何东西,函数,模块,类。
Python
中的字符串是不可变的。
Pass 
表示空语句块。
# 注释
 
String
r‘I&rsquo ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号