2007年04月15日 星期日 13:04
¿´²»³öΪʲôѽ£¬°ïһϡ£ÃÆѽ #!/usr/bin/python # -*- coding: utf-8 -*- import socket mySocket = socket.socket() mySocket.bind(('192.168.1.72',4444)) mySocket.listen() #Ö÷º¯ÊýµÄ¿ªÊ¼£º if __name__ == '__main__': while 1: mySocketChild,addr = mySocket.accept() print addr mySocketChild.close() ³ö´íÐÅÏ¢£º Traceback (most recent call last): File "socket.py", line 3, in ? import socket File "/home/jessinio/files/socket.py", line 5, in ? mySocket = socket.socket() TypeError: 'module' object is not callable -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070415/8fee93c3/attachment.html
2007年04月15日 星期日 13:05
whileÓï¾äÏÂÃæÊÇ´øËõ½øµÄ£¬gmailÕâ¸öûÓÐÏÔʾ¡£ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070415/a50be13b/attachment.html
2007年04月15日 星期日 13:34
µ±Ç°Ä¿Â¼ÏµÄÎļþºÍÄ£¿éÖØÃûÁË£¬²»»áÕýÈ·¶ÁÈ¡Ä£¿ésocketÁË¡£ ÔÚ07-4-15£¬jessinio smith <jessinio在gmail.com> дµÀ£º > > ¿´²»³öΪʲôѽ£¬°ïһϡ£ÃÆѽ > > > #!/usr/bin/python > # -*- coding: utf-8 -*- > import socket > > mySocket = socket.socket() > mySocket.bind(('192.168.1.72',4444)) > mySocket.listen () > #Ö÷º¯ÊýµÄ¿ªÊ¼£º > if __name__ == '__main__': > while 1: > mySocketChild,addr = mySocket.accept() > print addr > mySocketChild.close() > > ³ö´íÐÅÏ¢£º > Traceback (most recent call last): > File " socket.py", line 3, in ? > import socket > File "/home/jessinio/files/socket.py", line 5, in ? > mySocket = socket.socket() > TypeError: 'module' object is not callable > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070415/83e97737/attachment.htm
2007年04月15日 星期日 13:37
¸Ðл£¡£¡¸Ð¶¯ÖÐ~~~~~~ ÃÆÁ˺ܶࡣ»¹ÒÔΪ×Ô¼ºÃ»ÓÐд´úÂëµÄÌ츳¡£Ïë°ÑµçÄÔ¸øÈÓÁË¡£ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070415/0c220ab9/attachment.html
2007年04月15日 星期日 13:58
¸ÄÁË»¹ÊDz»ÐÐѽ£¡£¡£º еÄÎÊÌ⣺ jessinio在nio2host:~/files$ mv socket.py printPeersocket.py jessinio在nio2host:~/files$ python printPeersocket.py Traceback (most recent call last): File "printPeersocket.py", line 3, in ? import socket File "/usr/lib/python2.4/socket.py", line 5, in ? This module provides socket operations and some related functions. TypeError: 'module' object is not callable -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070415/b36f1dd9/attachment.htm
2007年04月15日 星期日 14:10
µ±Ç°Ä¿Â¼ÏÂÒѾ±àÒë¹ýµÄÎļþɾû£¿±ÈÈçsocket.pyc £º£© ÔÚ07-4-15£¬jessinio smith <jessinio在gmail.com> дµÀ£º > > ¸ÄÁË»¹ÊDz»ÐÐѽ£¡£¡£º > > еÄÎÊÌ⣺ > > jessinio在nio2host:~/files$ mv socket.py printPeersocket.py > jessinio在nio2host:~/files$ python printPeersocket.py > Traceback (most recent call last): > File "printPeersocket.py", line 3, in ? > import socket > File "/usr/lib/python2.4/socket.py", line 5, in ? > This module provides socket operations and some related functions. > TypeError: 'module' object is not callable > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070415/4bd00b1c/attachment.html
2007年04月15日 星期日 14:20
Ŷ£¡£¡£¡£¡£¡£¡£¡£¡ sys.pathĬÈÏ°üÀ¨µ±Ç°Ä¿Â¼µÄÂ𣿣¿ >>> sys.path ['', '/usr/lib/python24.zip', '/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload', '/usr/local/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages', '/usr/lib/python2.4/site-packages/Numeric', '/usr/lib/python2.4/site-packages/cairo', '/usr/lib/python2.4/site-packages/gst-0.10', '/var/lib/python-support/python2.4', '/usr/lib/python2.4/site-packages/gtk- 2.0', '/var/lib/python-support/python2.4/gtk-2.0', '/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode'] µÚÒ»¸öÊÇ¿ÕµÄ×Ö·û´®¡£±íʾµ±Ç°Ä¿Â¼Â𣿣¿²»ÊÇ'.'Â𣿣¿ -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070415/ee6c6660/attachment-0001.htm
2007年04月15日 星期日 14:31
*path* A list of strings that specifies the search path for modules. Initialized from the environment variable PYTHONPATH, plus an installation-dependent default. As initialized upon program startup, the first item of this list, path[0], is the directory containing the script that was used to invoke the Python interpreter. If the script directory is not available (e.g. if the interpreter is invoked interactively or if the script is read from standard input), path[0] is the empty string, which directs Python to search modules in the current directory first. ÔÚ07-4-15£¬jessinio smith <jessinio在gmail.com> дµÀ£º > > Ŷ£¡£¡£¡£¡£¡£¡£¡£¡ > > sys.pathĬÈÏ°üÀ¨µ±Ç°Ä¿Â¼µÄÂ𣿣¿ > >>> sys.path > ['', '/usr/lib/python24.zip', '/usr/lib/python2.4', > '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', > '/usr/lib/python2.4/lib-dynload', '/usr/local/lib/python2.4/site-packages', > '/usr/lib/python2.4/site-packages', > '/usr/lib/python2.4/site-packages/Numeric', > '/usr/lib/python2.4/site-packages/cairo', > '/usr/lib/python2.4/site-packages/gst- 0.10', > '/var/lib/python-support/python2.4', '/usr/lib/python2.4/site-packages/gtk- > 2.0', '/var/lib/python-support/python2.4/gtk-2.0', > '/usr/lib/python2.4/site-packages/wx-2.6-gtk2-unicode'] > > µÚÒ»¸öÊÇ¿ÕµÄ×Ö·û´®¡£±íʾµ±Ç°Ä¿Â¼Â𣿣¿²»ÊÇ'.'Â𣿣¿ > > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070415/84227782/attachment.html
Zeuux © 2025
京ICP备05028076号