´ó¼ÒºÃ£¬ÎÒÊÇÒ»¸öÐÂÊÖ£¬¸Õ¿ªÊ¼Ñ§python£¬µ«ÊǸտªÊ¼µÄhelloworld¶¼Ã»·¨´òÓ¡£¬ÈÃÎÒºÜÎÞÄΡ£
ÎÒµÄpython°²×°Â·¾¶Îªf:\python31¡£ÔÚpathÖÐÒ²ÉèÖöÔÁË£¬ÔÚwindowsÏÂÔËÐÐÊÇÕâÑùÏÔʾµÄ£¬Ï£Íû¸÷λǰ±²Ö¸µãһϡ£Ð»Ð»
Python 3.1 (r31:73574, Jun 26 2009, 20:21:35) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright ......
double** Create_Double_Memory(int ySize, int xSize)
{
if (ySize <= 0 || xSize <= 0)
return NULL;
double** p = new double*[ySize];
for (int i = 0; i < ySize; i++)
p[i] = new double[xSize];
return p;
}
BOOST_PYTHON_MODULE(L1_L0_Drive) ......
void xxx(int& x)
{
x = 100;
}
def("xxx", xxx);
import y
a = 0
y.xxx(a)
±¨´íÁË£º
ArgumentError: Python argument types in
L0_L1.xxx(int)
did not match C++ signature:
xxx(int {lvalue})
ÇëÎÊÏñÕâÖÖ´ ......
¸÷λºÃ£¬Ð¡µÜÎÒÓöµ½Ò»¸öÎÊÌ⣬ÎÒÊÔ×ÅÓÃPython´ÓÎÒµÄLinuxÉÏÈ¥Á¬½Óһ̨Զ³ÌµÄOracleÊý¾Ý¿â·þÎñÆ÷£¬È»ºóÔÚÍøÉÏÕÒÁËÒ»¸ö½Ð×öcx_OracleµÄÒ»¸ölib£¬¿ÉÔÚÎÒÖ´ÐÐsetup³ÌÐòµÄʱºò±¨ÁËÒ»¸ö´í£º
Traceback (most recent call last):
File "setup.py", line 123, in ?
raise DistutilsSet ......
Python¡¢LuaµÈ½Å±¾ÓïÑÔÖÐÒ»Çж¼ÊǶÔÏ󣬶ÔÏóÓÃÖ¸Õë±êʶ£¬µ«ÕâЩÓïÑÔÖÐÊÇÈçºÎÅжÏÖ¸ÕëÓÐЧµÄÄØ£¿
ÀýÈ磬һ¸öº¯ÊýÖÐij¸ö²ÎÊýÊÇÖ¸Õ루ָÏòÒ»¸ö¶ÔÏ󣩣¬ÔÚº¯ÊýµÄÄÚ²¿ÊµÏÖÖУ¬Èç¹ûÖ±½Ó¶ÔÖ¸Õë²Ù×÷£¬¿ÉÄܳöÏÖµÄÎÊÌâÊÇ£º
1£©Ö¸ÕëÓÐЧ£¬Ôò²Ù×÷³É¹¦¡£
  ......
ϱßÊÇÎÒдµÄÒ»¶Î´úÂ룬Ëæ»úÉú³É100ÍòÌõ4ÁÐÊý¾Ý£¬²¢·Åµ½dictÀï±ß£¬È»ºó°ÑÄÚÈÝдµ½txtÎļþÖÐ
Python code:
#!/usr/bin/python2.5
import random
import time
time.sleep(5)
shapes = {}
print "--------------START---------------------------"
for i in range(1000000):
shape_id = str(ran ......