#!/usr/bin/python import sys,urllib,os def mpd_settings(): print "Beginning setup of xchat_mpd-0.1..." print print "Answer the following questions to install xchat_mpd" print host=raw_input('Please specify the host on which MPD runs: ') port=raw_input('Please specify the port on which MPD runs: ') print print "For xchat_mpd to run, the python mpdclient" print "module must be installed, available at" print "http://www.musicpd.org/py-libmpdclient.shtml" print def module_needsinstall(): install_module=raw_input('Should I install the module for you? [y/n] ') if install_module == 'y': print elif install_module == 'n': print elif install_module == 'yes': print elif install_module == 'no': print else: print "Error: please enter either [y]es or [n]o." module_needsinstall() mpd_settings() module_needsinstall() print host print port print install_module