How to compute homotopy classes of maps on the 2-torus? Let $\mathbb T^2$ be the 2-Torus and let $X$ be a topological space.
Is there any way of computing $[\mathbb T^2,X]$, the set of homotopy class of continuous maps $\mathbb T^2\to X$ if I know, for instance, the homotopy groups of $X$?
Actually, I am interested in the case $X=\mathbb{CP^\infty}$. I would like to classify $\mathbb T^1$-principal bundles over $\mathbb T^2$ (in fact $\mathbb T^2$-principal bundles, but this follows easily.)

If you want to calculate $[\mathbb T^2,\mathbb CP^\infty]$, perhaps, it's easier to use the classification of maps to $\mathbb CP^\infty$ instead: $[X,\mathbb CP^\infty]=H^2(X)$; so $[\mathbb T^2,\mathbb CP^\infty]=H^2(\mathbb T^2)=\mathbb Z$.
