Skip to content

Instantly share code, notes, and snippets.

@quirksubdol
quirksubdol / Login_tweaks.py
Created November 2, 2019 16:34
The login program with functions
# -------------------------------------------------------------------------------------
# Experimental tab for making the code more readable and the functionality more modular
# with the use of functions that mostly take care of pickling/unpickling
# -------------------------------------------------------------------------------------
import PySimpleGUI as sg
import pickle
Accounts = []
# ---------------------------------------------------------------------------------------------------------------------- #
# The current version of the program is functioning in a certain cycle that i wont try to work around, but i will explain#
# as best as i can. The pickle file that holds the accounts, in a username/password format gets overwritten every time #
# the the user signs up accounts. #
# So, the first time your run the program and select to sign up, the user accounts you create, will remain in the pickle #
# file after you close the program. If the next time you run the program you select to login instead, the #
# pickled file will have the accounts you created previously. If by mistake you select to sign up, you can always close #
# the sign up window, and the pickled file wont be affected. Basically, every time you hit the submit button in the #
# sign up window and it's successful, th