forked from kushaldas/pym
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import mymodule.bars as bars | ||
from mymodule.bars import simplebar | ||
__all__ = [bars, simplebar] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
""" | ||
Bars Module | ||
============ | ||
This is an example module which provides different ways to print bars. | ||
""" | ||
|
||
def starbar(num): | ||
""" | ||
Prints a bar with * | ||
:arg num: Length of the bar | ||
""" | ||
print('*' * num) | ||
|
||
def hashbar(num): | ||
""" | ||
Prints a bar with # | ||
:arg num: Length of the bar | ||
""" | ||
print('#' * num) | ||
|
||
def simplebar(num): | ||
""" | ||
Prints a bar with - | ||
:arg num: Length of the bar | ||
""" | ||
print('-' * num) | ||
|
||
if __name__=='__main__': | ||
simplebar(20) |