If you have only one line selected you can use this:
select = iface.activeLayer().selectedFeatures()
for feature in select:
geom = feature.geometry()
if geom.type() == QGis.Line:
feat_geom = geom.asPolyline()
x=feat_geom[0][0]
y=feat_geom[0][1]
print x, y
#you can also export it as wkt, if you need it for further calculations
wkt = geom.exportToWkt()
print wkt
if you have more selected features you can create a list and append the values there.
feat_geom = []
select = iface.activeLayer().selectedFeatures()
for feature in select:
geom = feature.geometry()
if geom.type() == QGis.Line:
f_geom = geom.asPolyline()
#create a list of geometries
feat_geom.append(f_geom)
print feat_geom