Skip to main content

Thread: Code Critique and help with making .exe


hi,

have program wrote in python. i'm looking constructive criticism , on making executable file windows.

anyways, program creates 16 character password , outputs window on screen. allows create many passwords pressing 'generate' button in window.

code:
#!/usr/bin/python  # pwgen.py  # program create 16 character password using lowercase letters,  # uppercase letters, numbers, , symbols. can copy , paste  # password appliction have random , secure password.      tkinter import *  random import *     def random_password():    charlist = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o',                'p','q','r','s','t','u','v','w','x','y','z','a','b','c','d',                'e','f','g','h','i','j','k','l','m','n','o','p','q','r','s',                't','u','v','w','x','y','z','0','1','2','3','4','5','6','7',                '8','9','!','@','#','$','%','^','&','*','(',')','_','-','=',                '+',',','<','.','>','?','/']    pw = ''    length = 16    in range (length):      num = randint(0,len(charlist)-1)      pw = pw + charlist[num]    return pw     #  # begin gui code  #     root = tk()  root.title("password generator")  root.resizable(0,0)  root.minsize(300,0)     frame = frame(root)  frame.pack(pady=10, padx=5)     content = stringvar()  updater = lambda:content.set(random_password())     gen_btn = button(frame, text="generate", command=updater)  gen_btn.config(font=("sans-serif", 14),  bg="#92cc92")  gen_btn.pack(side=left, padx=5)     field = entry(frame, textvariable=content)  field.config(fg='blue', font=('courier',  16, "bold"), justify='center')  field.pack(fill=both, side=right, padx=5)     root.mainloop()

input appreciated.

hi there. looks useful programme. few pieces of advice:

1) how including option generate passwords of different length? i'm sure wouldn't hard include dropdown menu choose password length. reason because while handle 8-10 random characters, can't remember 16 random characters, , honest don't want want trivial password. also, websites , other password-requiring software specifies length of password yo need (e.g. uni website requires 8 digit login). having option, might increase target audience.

2) on related note, (maybe version 2) having conditions passwords (e.g. must have @ least 1 letter, 1 number, , 1 symbol). again, requirement passwords. while probabilistically can expect case 16 characters, , if conditions aren't satisfied generate new password, may professionalism of programme if option exists.

3) python fantastic language, implemented, , perfect these kinds of programmes. however, if wanting make files executable windows, python may not best option. if distribute python code windows, many windows users need python installed on computers, may cause compatibility issues. while python standard on ubuntu machines (and maybe linux machines), there isn't level of acceptance in windows community.

other that, programme looks cool, , can see having played couple of minutes, seems work well.

try this guide make .exe.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Code Critique and help with making .exe


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support