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?
ChatBot-Client/Signup.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
35 lines (28 sloc)
894 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
#Gulsum Ozer# | |
from tkinter import * | |
signup = Tk() | |
Label_h1 = Label (signup, text = "Sign up below") | |
Label_user = Label(signup, text = "Username") | |
Label_pass = Label(signup, text = "Password") | |
entry_user = Entry (signup) | |
entry_pass = Entry (signup, show = "*") | |
Label_h1.grid(row=0, column=1) | |
Label_user.grid(row=1, column=0) | |
Label_pass.grid(row=2, column=0) | |
entry_user.grid(row=1, column=1) | |
entry_pass.grid(row=2, column=1) | |
def btn_click(): | |
username = entry_user.get() | |
password = entry_pass.get() | |
f = open('users.txt','') | |
f.append(username+'-'+password) | |
f.close() | |
signup_btn = Button(signup, text="Signup", command = btn_click) | |
signup_btn.grid(row=3, column=1) | |
def login_click(): | |
import os | |
os.system('python3 Login.py') | |
f.close() | |
loginpage_btn = Button(signup, text="Login page", command = login_click) | |
loginpage_btn.grid(row=4, column=1) | |
signup.mainloop() |