Nanofibers of poly(3,4-ethylenedioxythiophene) - PEDOT and polypyrrole - PPy have been prepared using the template method. We present a study of the electronic and mechanical properties of these nanofibers. Strong variations of the estimated conductivity, the resistivity ratio rho(1.5K)/rho(300K) and the elastic modulus are observed when the diameter is reduced from 200nm to 20nm. They are discussed in terms of change in the conformation of the polymer chains and/or doping level due to the confinement.