From 7db4bf466cda08ae7b477586bd3e22a50d4295df Mon Sep 17 00:00:00 2001 From: "Curtly Vassell (vassellc2)" Date: Thu, 1 Sep 2022 15:31:34 +0100 Subject: [PATCH] Transferred files over from codio. --- main.py | 22 ++++++++++++++++++++++ registration.py | 5 +++++ 2 files changed, 27 insertions(+) create mode 100644 main.py create mode 100644 registration.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..976a3d2 --- /dev/null +++ b/main.py @@ -0,0 +1,22 @@ +#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() \ No newline at end of file diff --git a/registration.py b/registration.py new file mode 100644 index 0000000..1e61d72 --- /dev/null +++ b/registration.py @@ -0,0 +1,5 @@ +#this module contains the function needed for registering a new user +import sqlite3 +def register(newUser, newPass): + con = sqlite + \ No newline at end of file