Top "Python-2.x" questions

For questions about Python programming that are specific to version 2.x of the language.

How do you use subprocess.check_output() in Python?

I have found documentation about subprocess.check_output() but I cannot find one with arguments and the documentation is not …

python python-3.x python-2.x
Combine several images horizontally with Python

I am trying to horizontally combine some JPEG images in Python. Problem I have 3 images - each is 148 x 95 - …

python-3.x python-2.7 python-imaging-library python-2.x paste
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 3-6: invalid data

how does the unicode thing works on python2? i just dont get it. here i download data from a server …

python unicode python-2.x
How to read a CSV file from a URL with Python?

when I do curl to a API call link http://example.com/passkey=wedsmdjsjmdd curl 'http://example.com/passkey=wedsmdjsjmdd' …

python csv curl output python-2.x
How to pick just one item from a generator?

I have a generator function like the following: def myfunct(): ... yield result The usual way to call this function would …

python iterator generator python-2.x
Python string to unicode

Possible Duplicate: How do I treat an ASCII string as unicode and unescape the escaped characters in it in python? …

python string unicode python-2.x python-unicode
Determine if 2 lists have the same elements, regardless of order?

Sorry for the simple question, but I'm having a hard time finding the answer. When I compare 2 lists, I want …

python list equality python-2.x
How to add an element to the beginning of an OrderedDict?

I have this: d1 = OrderedDict([('a', '1'), ('b', '2')]) If I do this: d1.update({'c':'3'}) …

python python-3.x dictionary python-2.x ordereddict
How to select a directory and store the location using tkinter in Python

I am creating a GUI with a browse button which I only want to return the path. I've been looking …

python button tkinter directory python-2.x
What is the difference between encode/decode?

I've never been sure that I understand the difference between str/unicode decode and encode. I know that str().decode() …

python string unicode character-encoding python-2.x