def config_file(file, reconfigure=False):
	value = click.prompt('Enter digital ocean access token', type=str)
	f = open(file, 'w')
	f.write('[docli]\nauth_token='+value)
	f.close()
	if not reconfigure:
		bashrc = os.path.expanduser('~/.bashrc')
		bash_profile = os.path.expanduser('~/.bash_profile')
		profile = os.path.expanduser('~/.profile')
		if os.path.isfile(bashrc):
			bashrc_file = open(bashrc, 'a')
			bashrc_file.write('eval "$(_DOCLI_COMPLETE=source docli)"')
			bashrc_file.close()
			click.echo("apply changes by running 'source ~/.bashrc' without ''")
		elif os.path.isfile(bash_profile):
			bash_profile_file = open(bash_profile, 'a')
			bash_profile_file.write('eval "$(_DOCLI_COMPLETE=source docli)"')
			bash_profile_file.close()
			click.echo("apply changes by running 'source ~/.bash_profile' without ''")
		elif os.path.isfile(profile):
			profile_file = open(profile, 'a')
			profile_file.write('eval "$(_DOCLI_COMPLETE=source docli)"')
			profile_file.close()
			click.echo("apply changes by running 'source ~/.profile' without ''")
		else:
			msg = 'Add following line to your bashrc.\n eval "$(_DOCLI_COMPLETE=source docli)"'
			click.echo(msg)
	click.echo()
	click.echo("configuration completed.")
create configuration file
dataset/ETHPy150Open yspanchal/docli/docli/main.py/config_file