Added a new file called functions.py which contains user-customizable functions, instead of requiring the user to edit imgupload.py.
9 lines
231 B
Python
9 lines
231 B
Python
import string
|
|
import random
|
|
|
|
|
|
def generate_name():
|
|
chars = string.ascii_letters + string.digits # uppercase, lowercase, and numbers
|
|
name = ''.join((random.choice(chars) for i in range(8))) # generate name
|
|
return name
|