Python Forum

Full Version: CLI module - click
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello any one please help with my code to get standard input from username and print it
import click

@click.command()
@click.option('--count', default=1, help='Number of greetings.')
@click.option('--name', prompt='Your name',
              help='The person to greet.')
def hello(count, name):
    """Simple program that greets NAME for a total of COUNT times."""
    for x in range(count):
        click.echo('Hello %s!' % name)

if __name__ == '__main__':
    hello()
What's the problem? Works fine for me.
i need users first name and last name print in this