Top "Python-2.x" questions

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

Why doesn't print work in a lambda?

Why doesn't this work? lambda: print "x" Is this not a single statement, or is it something else? The documentation …

python printing lambda python-2.x
Open the file in universal-newline mode using the CSV Django module

I am trying to access a model.filefield in Django to parse a CSV file in Python using the csv …

django macos csv newline python-2.x
Python requests - Exception Type: ConnectionError - try: except does not work

I am using a webservice to retrieve some data but sometimes the url is not working and my site is …

python url python-requests connection python-2.x
How do I print a '%' sign using string formatting?

I've made a little script to calculator percent; however, I wish to actually include the '%' within the message …

python printing python-2.x percentage
Uninstall python built from source?

I've installed python 2.6 from source, and somehow later mistakenly installed another python 2.6 from a package manager too. I can't find …

python linux ubuntu python-2.x
What do numbers starting with 0 mean in python?

When I type small integers with a 0 in front into python, they give weird results. Why is this? >>&…

python python-2.x
How to use a multiprocessing.Manager()?

I have a concern about multiprocessing.Manager() in python. Here is the example: import multiprocessing def f(ns): ns.x *=10 …

python multiprocessing python-2.x
vcvarsall.bat needed for python to compile missing from visual studio 2015 ( v 14)

I am trying to install numpy in python 3.5 under windows 10 with visual studio 2015 ultimate installed. Short version: file vcvarsall.bat …

python-3.x visual-c++ visual-studio-2015 pip python-2.x
When is it better to use zip instead of izip?

When is it better to use zip instead of itertools.izip?

python-2.7 python-2.x itertools