Differences between revisions 1 and 8 (spanning 7 versions)
Revision 1 as of 2005-04-09 06:08:44
Size: 677
Editor: hoxide
Comment:
Revision 8 as of 2005-06-13 04:02:31
Size: 2040
Editor: flyaflya
Comment:
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
 * 用于生成PDF文档  * 简述:用于生成PDF文档
 * 能力: 生成PDF文档, 合并PDF文档, 将HTML导入到PDF文档中.
Line 13: Line 14:
 * 更多例子: [http://phaseit.net/claird/comp.text.pdf/PDF.html]
Line 34: Line 36:
= 科学计算软件 =
== SciPy ==
=== 基于wxPython的plt绘图模块 ===
 * 依赖的包: wxPython, gui_thread, scipy
 * 测试环境: windows2000, python2.3.3, SciPy_complete-0.3.2 Numeric-23, wxPython2.5-win32-unicode-2.5.3.1
Line 35: Line 42:
 * 存在的问题, 按照说明书无法正确启动独立的wxPython线程. 解决如下:
{{{
#!python
>>> import gui_thread
>>> gui_thread.start(use_main=1)
<wxPython imported>
>>>
>>> from scipy import plt
>>> img = plt.lena()
>>> plt.image(img)
<type 'array'> ['__copy__', '__deepcopy__', 'astype', 'byteswapped', 'copy', 'iscontiguous', 'itemsize', 'resize', 'savespace', 'spacesaver', 'tolist', 'toscalar', 'tostring', 'typecode']
<scipy.plt.wxplt.plot_frame; proxy of C++ wxFrame instance at _d8c21602_p_wxFrame>
>>>
}}}

即用gui_thread.start(use_main=1)来启动独立的wxPython线程.

= 多媒体 =
== PIL ==
== PyGame ==
 * 简述:用于游戏制作
 * 能力:有完备的控制、声音、显示模块,支持bmp,png等多种图像格式,自动载入Alpha通道,能显示复杂特效。
 * 缺点:图像必须读入surface后显示,占用内存多,不适合制作大型游戏
 * 官方站点: [http://www.pygame.org/]

 

含有章节索引的中文 文章模板

::-- hoxide [DateTime(2005-04-09T06:08:44Z)] TableOfContents

文本处理

ReportLab

   1 from reportlab.pdfgen import canvas
   2 from reportlab.lib.units import inch
   3 
   4 font = "Helvetica"
   5 font_size = 26
   6 text = "Hello, world"
   7 x = 5.0 * inch
   8 y = 8.0 * inch
   9 destination_file = "/tmp/first.pdf"
  10 
  11 my_canvas = canvas.Canvas(destination_file)
  12 my_canvas.setFont(font, font_size)
  13 my_canvas.drawRightString(x, y, text)
  14 my_canvas.save()

编译工具

科学计算软件

SciPy

基于wxPython的plt绘图模块

  • 依赖的包: wxPython, gui_thread, scipy
  • 测试环境: windows2000, python2.3.3, SciPy_complete-0.3.2 Numeric-23, wxPython2.5-win32-unicode-2.5.3.1

  • 存在的问题, 按照说明书无法正确启动独立的wxPython线程. 解决如下:

   1 >>> import gui_thread
   2 >>> gui_thread.start(use_main=1)
   3 <wxPython imported>
   4 >>>
   5 >>> from scipy import plt
   6 >>> img = plt.lena()
   7 >>> plt.image(img)
   8 <type 'array'> ['__copy__', '__deepcopy__', 'astype', 'byteswapped', 'copy', 'iscontiguous', 'itemsize', 'resize', 'savespace', 'spacesaver', 'tolist', 'toscalar', 'tostring', 'typecode']
   9 <scipy.plt.wxplt.plot_frame; proxy of C++ wxFrame instance at _d8c21602_p_wxFrame>
  10 >>> 

即用gui_thread.start(use_main=1)来启动独立的wxPython线程.

多媒体

PIL

PyGame

  • 简述:用于游戏制作
  • 能力:有完备的控制、声音、显示模块,支持bmp,png等多种图像格式,自动载入Alpha通道,能显示复杂特效。
  • 缺点:图像必须读入surface后显示,占用内存多,不适合制作大型游戏
  • 官方站点: [http://www.pygame.org/]

请大家不断补充

PythonPackages (last edited 2009-12-25 07:11:12 by localhost)