When I try to run a second script from a first script, the first script reruns from the beginning. Below is the code where i try to run the new script. I don't know where the problem lies.
def log_user_in(self): self.cursor.execute('SELECT username AND password, COUNT(*) FROM users WHERE username=%s AND password=%s GROUP BY username',(self.login_username_entry.get(), self.login_password_entry.get())) self.cursor.fetchall() self.row_count = self.cursor.rowcount if self.row_count == 1: self.login_window.destroy() call(['python3', 'HabitTracker.py'])
I expected this code to run a script called HabitTracker.py, but instead it reruns my main.py script where this snippet of code is found.