click icon indicating copy to clipboard operation
click copied to clipboard

examples not working out of the box

Open moritz-gross opened this issue 9 months ago • 1 comments

Hi everybody,

I missed the note in the README of the examples at first and wrongly thought I could run the file just like in the quickstart tutorial with python foo.py

I think right now the README is a bit too minimal and could be extended with:

  • a direct link to https://click.palletsprojects.com/en/stable/virtualenv/ for an explanation
  • a note with the following workaround to add if the user doesn't want to look into virtualenv
if __name__ == '__main__':
    hello()

moritz-gross avatar Mar 04 '25 22:03 moritz-gross

If name equals dunder main is a separate concept from a virtual env. The first having to do with being able to call the .py file as a script and the second being about dependencies. However, if you have something in mind to make the examples readme better, I am open to a PR.

Rowlando13 avatar Apr 05 '25 23:04 Rowlando13