File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change
1
+ """
2
+ This file is required for Python to recognize the directory as a "regular" package.
3
+
4
+ Python "regular" packages use the __init__.py file to initialize the package and
5
+ can include package-level variables, import statements, and initialization code
6
+ you wish to run when the package is first imported into a program.
7
+
8
+ For more information, see the official documentation:
9
+ https://docs.python.org/3/reference/import.html#regular-packages
10
+ """
Original file line number Diff line number Diff line change
1
+ """
2
+ In Python packages, this file called __main__.py is run when the package is run
3
+ directly from command line, as opposed to importing it into another program.
4
+ """
5
+
1
6
import examplepackagefb1258 .wisdom as wisdom
2
7
3
8
4
9
def main ():
5
- line = wisdom .get ()
6
- print (line )
10
+ """
11
+ Get some wise text and print it out.
12
+ """
13
+ line = wisdom .get () # get a line of text
14
+ print (line ) # print it out
7
15
8
16
9
17
if __name__ == "__main__" :
18
+ # run the main function
10
19
main ()
Original file line number Diff line number Diff line change
1
+ """
2
+ This module provides a function to retrieve a pseudo-random line from Lewis Carroll's poem "The Jabberwocky".
3
+ Read more about Jabberwocky here: https://en.wikipedia.org/wiki/Jabberwocky
4
+ """
5
+
1
6
import random
2
7
3
8
You can’t perform that action at this time.
0 commit comments