Top "Python-2.6" questions

For issues that are specific to Python 2.6. If your question applies to Python in general, use the tag [python].

List Comprehension: why is this a syntax error?

Why is print(x) here not valid (SyntaxError) in the following list-comprehension? my_list=[1,2,3] [print(my_item) for my_item …

python list-comprehension python-2.6
Download a file from https with authentication

I have a Python 2.6 script that downloades a file from a web server. I want this this script to pass …

python urllib2 python-2.6
Counter in Collections module Python

I've come across a really weird problem. I'm trying to use Counter function in collections module. However, I keep getting …

collections counter python-import importerror python-2.6
Python 2.6 TreeMap/SortedDictionary?

Is there a built-in sorted dictionary implementation in Python 2.6, or are hashtables the only kind? Clarifications: I'm asking about sorted …

python dictionary python-2.6 treemap sorteddictionary
Setup.py: install lxml with Python2.6 on CentOS

I have installed Python 2.6.6 on CentOS 5.4, [@SC-055 lxml-2.3beta1]$ python Python 2.6.6 (r266:84292, Jan 4 2011, 09:49:55) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 Type "…

python lxml python-2.6 python-import centos5
Any gotchas using unicode_literals in Python 2.6?

We've already gotten our code base running under Python 2.6. In order to prepare for Python 3.0, we've started adding: from __future__ …

python unicode python-2.6 unicode-literals
Simple example of how to use ast.NodeVisitor?

Does anyone have a simple example using ast.NodeVisitor to walk the abstract syntax tree in Python 2.6? The difference between …

python python-2.6 abstract-syntax-tree
How to stop Python parse_qs from parsing single values into lists?

In python 2.6, the following code: import urlparse qsdata = "test=test&test2=test2&test2=test3" qs = urlparse.parse_qs(…

python python-2.6
Determine season given timestamp in Python using datetime

I'd like to extract only the month and day from a timestamp using the datetime module (not time) and then …

date python-2.6
How to install python2.6-devel package under CentOs 5

I need to install mysql-python under python2.6. mysql-python package needs python2.6-devel package that depends on the libpython2.6.so.1.0(64bit) …

x86-64 python-2.6 centos5 mysql-python