A facile route to ultra-long polyaniline nanowires and the fabrication of photoswitch.