A study of B+ to J/psi pi+ and B+ to psi(2S) pi+ decays is performed with data corresponding to 0.37 fb-1 of proton-proton collisions at sqrt(s)=7 TeV. Their branching fractions are found to be B(B+ to J/psi pi+) = (3.88 +- 0.11 +- 0.15) x 10^{-5} and B(B+ to psi(2S) pi+) = (2.52 +- 0.26 +- 0.15) x 10^{-5}, where the first uncertainty is related to the statistical size of the sample and the second quantifies systematic effects. The measured CP asymmetries in these modes are ACP(J/psi pi) = 0.005 +- 0.027 +- 0.011 and ACP(psi(2S) pi) = 0.048 +- 0.090 +- 0.011 with no evidence of direct CP violation seen.