root@ubuntu:~/k1rha/python/http# python blind.py
Traceback (most recent call last):
File "blind.py", line 1, in <module>
import urllib.request
File "/usr/lib/python3.2/urllib/request.py", line 88, in <module>
import http.client
File "/usr/lib/python3.2/http/client.py", line 69, in <module>
import email.parser
File "/usr/lib/python3.2/email/parser.py", line 12, in <module>
from email.feedparser import FeedParser
File "/usr/lib/python3.2/email/feedparser.py", line 27, in <module>
from email import message
File "/usr/lib/python3.2/email/message.py", line 17, in <module>
from email import utils
File "/usr/lib/python3.2/email/utils.py", line 28, in <module>
import socket
File "/root/k1rha/python/http/socket.py", line 7, in <module>
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
AttributeError: 'module' object has no attribute 'AF_INET'
root@ubuntu:~/k1rha/python/http#
위와같인 에러가 떴을때 아래와 같은 결과를 얻을수 있었다.
h I found the problem, it seems I cant run socket things from my home folder ... I moved the script into a new folder and it worked.
Thanks.
즉 폴더에 소켓생성권한이 없기떄문에 다른 폴더로 옮겨 실행했다는 내용이다 필자도 비슷하게 해결봄.
'Python' 카테고리의 다른 글
[python 2.7] Reverse TCP connection Simple code (0) | 2012.09.25 |
---|---|
[python ] 학교서버관리를 위해 만든 서버 체크리스트 (0) | 2012.09.10 |
[ Python ] 전역변수 설정법 (global value ) ex. thread (0) | 2012.08.09 |
[ python 3.2 ] thread -> _thread (0) | 2012.07.18 |
stdout 으로 표준 출력 되는 값을 변수로 저장하여 가져오기. (0) | 2012.07.18 |