Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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


лл°¡¡¡£®


Ïà¹ØÎÊ´ð£º

eric4ÔõôÔËÐÐpython³ÌÐò£¿

pythonºÍpyqtÒÔ¼°Eric4¶¼ÒѾ­ÅäÖúÃÁË£¬´ò¿ªEric4д¸öpython³ÌÐò±ÈÈç¼òµ¥µÄ
print¡°hello£¬world¡±£¬Ôõô±àÒëÔËÐÐÁË£¬Start²Ëµ¥µÄËùÓÐÃüÁ³öÏÖºÍͼÖв¶àµÄ¶Ô»°¿ò£¬Ó¦µ±ÔõôÔËÐÐÁË£¿

Çó´ó¼ÒÖ¸½Ì

ûÓÐÈËÓà ......

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

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

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

python PILÄ£¿é´ò¿ªÍ¼Æ¬ÎÊÌâ

ÇëÎÊÏ£¬ÎÒµÄÊÇpython2.5°²×°ÁËPILÄ£¿é£¬È»ºó±àд³ÌÐò´ò¿ª±¾»úÉϵÄÒ»¸öͼƬʱ£¬ÎªÊ²Ã´ÀϳöÏÖ´íÎóÄØ£¬ÀÏÊÇÕÒ²»µ½Í¼Æ¬£¬´íÎóÌáʾÈçÏ£ºFile "C:\Python25\Lib\site-packages\PIL\Image.py", line 1888, in o ......

Ë­ÍƼöÒ»±¾Ñ§Ï°PYTHONµÄÊ飬лл

Ë­ÍƼöÒ»±¾Ñ§Ï°PYTHONµÄÊ飬лл
¡¶python¼òÃ÷½Ì³Ì¡·£¬¡¶pythonºËÐıà³Ì¡·

×÷Ϊϵͳ¹ÜÀí·½Ã棬¡¶Python UNIXºÍLinuxϵͳ¹ÜÀíÖ¸ÄÏ¡·ÊDZ¾·Ç³£²»´íµÄÊé¡£
http://club.book.csdn.net/pic3/255142.jpg

ÒýÓÃ
×÷Î ......

³õѧPython£¬ÓÃEclipse+pydev£¬µ÷ÊÔʱÔõô´«Èë²ÎÊý

ÈçÌ⣬ÎÒµÄÖ÷º¯ÊýÊÇ´«Èë²ÎÊýµÄ£¬Æ½Ê±ÔËÐÐʱÊÇÓÃÃüÁîÐд«Èë²ÎÊýÔËÐУ¬ÏÖÔÚÏëµ÷ÊÔ£¬²»ÖªµÀÔõô´«½øÕâ¸öÃüÁîÐеIJÎÊý
¿´ Run ²Ëµ¥ÖÐµÄ Open run Dialog... ÀïÃæÓУ¬Ï¸ÐÄ¿´Ò»ÏÂ

ûÓÐÕâÒ»Ïî°¡

sys.argv.append(&qu ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ