Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

python ÖеÄpackage ºÍmodule Ôõô×éÖ¯°¡£®

python ÖеÄpackage ºÍmodule Ôõô×éÖ¯°¡£®
/src
  lsx
      __init__.py
      user.py
  hello.py
===================================
-----------hello.py-------------
from lsx import user
if __name__ == '__main__':
    u=user('dhz')
-----------------

Õâ¸ö˵ÊDz»¶Ô£¬¸ÄÔõô×éÖ¯ÄØ£¿»¹ÊÇÒªÉèÖÃʲô»·¾³±äÁ¿£®
Traceback (most recent call last):
  File "F:\App\javaSpace\PyHello\src\hello.py", line 8, in <module>
    u=user('dhz')
TypeError: 'module' object is not callable


лл°¡¡¡£®


Ïà¹ØÎÊ´ð£º

ÓÃPythonʵÏÖÒ»¸ö¼òµ¥µÄͨѶ¼

¸÷λ¸ßÊÖ£¬ÄÄλÄÜд¸ö¼òµ¥µÄͨѶ¼£¬Ö»±£´æÐÕÃûºÍÊÖ»úºÅ£¬Äܱ£´æµ½Ó²Å̲¢¿É¶Á»Ø£¬ÓÐÌí¼Ó£¬É¾³ý£¬Ð޸ģ¬²éѯ¹¦ÄÜ£¬ÃüÁîÐÐʽµÄ¾ÍÐÐ
ÕâÖÖ»îÄãµÃ×Ô¼º¸É£¬ÓÐÎÊÌâ¿ÉÒÔÎÊ£¬µ«²»»áÓÐÈË°ïÄã×öµÄ¡£

¸øÄãÔ´Âë
http://dow ......

ShareDevelop3.0½¨Á¢PythonÏîÄ¿ÔËÐÐʱ±¨´í

֮ǰÎҵĵçÄÔÉÏ°²×°ÁËIronPython2.0,ºó°²×°ShareDevelop3.0,²ÉÓÃĬÈÏÉèÖÃ
ÎÒÔÚShareDevelopÖн¨Á¢ÁËÒ»¸öĬÈϵÄPythonµÄ¿ØÖÆ̨»ò´°ÌåÏîÄ¿,ÔËÐÐʱ±¨´íÈçÏÂ:

µ÷ÊÔÆ÷Å׳öÒì³£System.IO.FileNotFoundException: ......

[ÌáÎÊ]Python ÈçºÎºöÂÔ whitespace ¶ÁÈë

Ïñ C µÄ scanf() ÄÇÑù
±ÈÈç¶ÁÈë 1 2 3 a b c
ÿ´Î¶ÁÈëÒ»¸ö
ÏÂÃæÕâ¸öÓ¦¸ÃÊÇÄãÏëÒªµÄ°É£º
Python code:

>>> k = raw_input()
0 0123 ds dsl sd
>>> k
'0 0123 ds dsl sd'
>>> ......

³ÏÕÐPython³ÌÐòÔ±²ÎÓë¼ÆËã»úÊé¼®³ö°æ

ÓźñµÄ¸å³ê£¬³ÏÕÐPython¼¼ÊõÈËÔ±²ÎÓë¸÷ÖÖ¼¼ÊõÊé¼®³ö°æ¡£ 
ͨ¹ý¸ÃÊé¼®£¬×÷Õß¿ÉÒԵõ½Èçϱ¨³ê£º 
1¡¢·áºñµÄ¸å³ê¡£ 
2¡¢Êé¼®Öø×÷µÄÊðÃûȨ¡£ 
3¡¢¶Ô×÷ÕߺÍÊé½øÐÐÐû´«£¬Ìá¸ß×÷ÕßÔÚ¼¼ÊõȦ×ÓÀ ......

python Ô´ÂëÏÂÔØ

Ä¿Ç°pythonµÄ¹ÙÍøÉϺÃÏñÏÂÔز»Á˶«Î÷£¬ËùÒÔÅܵ½ÕâÉÏÃæÀ´ÎÊÎÊ£¬ÓÐûÓÐÈËÁôÓÐÏàÓ¦µÄ¼Òµ±£¬ÄÜ·ñ¸øСµÜ¹²ÏíÒ»·Ý,ʲôƽ̨ϵĶ¼¿ÉÒÔ£¬Ð»Ð»£¡
Ôõô¿ÉÄÜϲ»ÁË£¿

ÏÂÔØÒ³ÃæòËƱ»Ç½ÁË£¬ÉÏ´úÀí¾ÍÐÐ...

ÇëÎʶþÂ¥ÄÜ·ñ½² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ