Differences between revisions 1 and 2
Revision 1 as of 2006-03-28 14:41:30
Size: 542
Editor: qingfeng
Comment: CherryPy在MacOS下的安装
Revision 2 as of 2009-12-25 07:18:28
Size: 542
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

终于在我的ibook上运行cherrypy了,确切的说是搞定了mac下的python2.4,从python.org下载MacPython2.4,安装后,python2.4被安装到/Library/Frameworks/Python.framework/Versions/2.4/,然后ln -s替换/usr/bin下的python即可。顺便附一段cherrypy的HelloWorld

   1 import cherrypy
   2  
   3 class Root:
   4     @cherrypy.expose
   5     def index(self):
   6         return "Hello World!"
   7     #index.exposed = True
   8  
   9 cherrypy.root = Root()
  10 #cherrypy.config.update(file = 'my.conf')
  11 cherrypy.server.start()

CherryPyOnMacOSInstall (last edited 2009-12-25 07:18:28 by localhost)