Skip to content

Put main script inside "__main__" - #2

Open
adamoudad wants to merge 1 commit into
OreNoMochii:masterfrom
adamoudad:master
Open

Put main script inside "__main__"#2
adamoudad wants to merge 1 commit into
OreNoMochii:masterfrom
adamoudad:master

Conversation

@adamoudad

Copy link
Copy Markdown

J'ai déplacé tes fonctions au début du fichier et ai mis le reste de ton code après if __name__ == "__main__":
Cela permet d'utiliser le code en tant que module (si on veut juste les fonctions), ou de l'exécuter avec tout le code si il est exécuté de cette façon :
python webscrawaii.py

- functions are defined at the beginning
- main script is executed only as the main program
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant