python-bug-12398 (original) (raw)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
#! /usr/bin/env python |
---|
""" |
This code works with Python 2.6 but fails on Python 2.7 |
""" |
import httplib, urllib2 |
params = b'\x40\x00\x01\x02\xFF' |
url = unicode("http://posttestserver.com/post.php") |
req = urllib2.Request(url, data=params) |
urllib2.urlopen(req) |