Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
4006CEM-PyNews/main.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
22 lines (13 sloc)
573 Bytes
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
#main file for project | |
from os import get_terminal_size as gts | |
def main(): | |
#use os.get_terminal_size() here to determine width of the terminal window | |
#and format the welcome message accordingly | |
terminalWidth = gts()[0] | |
welcomeMessage = "Welcome to PyNews, an automated news emailing service" | |
print(welcomeMessage.center(80 if terminalWidth >= 80 else terminalWidth, "'").center(terminalWidth, " ")) | |
print("".ljust(terminalWidth, "~")) | |
print("".ljust(terminalWidth, "~")) | |
#next will be login | |
if __name__ == "__main__": | |
main() |