Objective-C,iPhone,C#

Objective-C,iPhone,C#

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

先su到root帐户

进入/usr/ports/lang/python26

然后直接make

 

 

 

整个过程如图所示,经过漫长的编译之后...

然后make install

又是漫长的等待...

 

出现Install them as needed.
====
--------------------------------------------------------
This package was built with the experimental POSIX
semaphore support. Please ensure that the kernel on the
system where you deploy this package is either compiled
with 'option P1003_1B_SEMAPHORES', or has the sem.ko
kernel module loaded.
--------------------------------------------------------
===>   Compressing manual pages for python26-2.6.1_2
===>   Running ldconfig
/sbin/ldconfig -m /usr/local/lib
===>   Registering installation for python26-2.6.1_2
hwt#

 

恭喜,安装成功

 然后输入hwt# python

进入如下python开发环境
Python 2.5.4 (r254:67916, Apr 13 2009, 18:09:11)
[GCC 4.2.1 20070719  [FreeBSD]] on freebsd7
Type "help", "copyright", "credits" or "license" for more information.
>>>

 

输入print 'hello money'

出现

>>> print 'hello money'
hello money
>>>

恭喜,第一个python程序出来了

 

不需要第三个变量来交换两个输入值

>>> a,b=1,2
>>> a,b=b,a
>>> a,b
(2, 1)
>>>

 

posted on 2009-11-07 11:44  墨墨  阅读(3319)  评论(0编辑  收藏  举报