Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : Python

pythonÔõôprint 'hello world'

´ó¼ÒºÃ£¬ÎÒÊÇÒ»¸öÐÂÊÖ£¬¸Õ¿ªÊ¼Ñ§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 ......

boost pythonÈçºÎ·â×°·µ»ØÖ¸ÕëµÄº¯Êý

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) ......

boost python´«µÝÒýÓã¿

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 Á¬½Ó Oracle Êý¾Ý¿â

¸÷λºÃ£¬Ð¡µÜÎÒÓöµ½Ò»¸öÎÊÌ⣬ÎÒÊÔ×ÅÓÃPython´ÓÎÒµÄLinuxÉÏÈ¥Á¬½Óһ̨Զ³ÌµÄOracleÊý¾Ý¿â·þÎñÆ÷£¬È»ºóÔÚÍøÉÏÕÒÁËÒ»¸ö½Ð×öcx_OracleµÄÒ»¸ölib£¬¿ÉÔÚÎÒÖ´ÐÐsetup³ÌÐòµÄʱºò±¨ÁËÒ»¸ö´í£º

Traceback (most recent call last):
  File "setup.py", line 123, in ?
    raise DistutilsSet ......

Python¡¢LuaµÈÓïÑÔÖÐÊÇÈçºÎÅжÏÖ¸ÕëÊÇ·ñÓÐЧµÄ£¿

    Python¡¢LuaµÈ½Å±¾ÓïÑÔÖÐÒ»Çж¼ÊǶÔÏ󣬶ÔÏóÓÃÖ¸Õë±êʶ£¬µ«ÕâЩÓïÑÔÖÐÊÇÈçºÎÅжÏÖ¸ÕëÓÐЧµÄÄØ£¿
    ÀýÈ磬һ¸öº¯ÊýÖÐij¸ö²ÎÊýÊÇÖ¸Õ루ָÏòÒ»¸ö¶ÔÏ󣩣¬ÔÚº¯ÊýµÄÄÚ²¿ÊµÏÖÖУ¬Èç¹ûÖ±½Ó¶ÔÖ¸Õë²Ù×÷£¬¿ÉÄܳöÏÖµÄÎÊÌâÊÇ£º
      1£©Ö¸ÕëÓÐЧ£¬Ôò²Ù×÷³É¹¦¡£
      ......

python dict µÄÄÚ´æ¿ØÖÆ

ϱßÊÇÎÒдµÄÒ»¶Î´úÂ룬Ëæ»úÉú³É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 ......
×ܼǼÊý:175; ×ÜÒ³Êý:30; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [14] [15] [16] [17] 18 [19] [20] [21] [22] [23]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ