Christian Fertig added the comment: python3 example, not working on both machines (3.2.1 on openSuSE 12.1 and 3.1.3 on openSuSE 11.4)
fertig@wespe:/home/fertig > python3 Error in sitecustomize; set PYTHONVERBOSE for traceback: SyntaxError: invalid syntax (sitecustomize.py, line 89) Python 3.2.1 (default, Jul 18 2011, 16:24:40) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import http.client >>> import urllib.request >>> http.client.HTTPConnection.debuglevel = 1 >>> request = urllib.request.urlopen('https://172.23.6.222') send: b'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/3.2\r\n\r\n' reply: 'HTTP/1.1 400 Bad Request\r\n' header: Date header: Server Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.2/urllib/request.py", line 138, in urlopen return opener.open(url, data, timeout) File "/usr/lib64/python3.2/urllib/request.py", line 375, in open response = meth(req, response) File "/usr/lib64/python3.2/urllib/request.py", line 487, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python3.2/urllib/request.py", line 413, in error return self._call_chain(*args) File "/usr/lib64/python3.2/urllib/request.py", line 347, in _call_chain result = func(*args) File "/usr/lib64/python3.2/urllib/request.py", line 495, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 400: Bad Request >>> request = urllib.request.urlopen('https://172.23.6.222') send: b'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/3.2\r\n\r\n' reply: 'HTTP/1.1 405 Method Not Allowed\r\n' header: Date header: Server header: Connection Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.2/urllib/request.py", line 138, in urlopen return opener.open(url, data, timeout) File "/usr/lib64/python3.2/urllib/request.py", line 375, in open response = meth(req, response) File "/usr/lib64/python3.2/urllib/request.py", line 487, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python3.2/urllib/request.py", line 413, in error return self._call_chain(*args) File "/usr/lib64/python3.2/urllib/request.py", line 347, in _call_chain result = func(*args) File "/usr/lib64/python3.2/urllib/request.py", line 495, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 405: Method Not Allowed ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16109> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com