Answer the question
In order to leave comments, you need to log in
Python default options?
I ran into an interesting problem.
def change(proxy=get()['proxy'], gmail=get()['gmail'], password=get()['password'], json_active=os.path.isfile(JSON_PATH)):
''' "change" changes the values of config.json '''
print(json_active)
print(os.path.isfile(JSON_PATH))
config = {
'proxy': proxy,
'gmail': gmail,
'password': password,
'json_active': json_active
}
with open(f'{os.getcwd()}\\config\\config.json', 'w') as file:
json.dump(config, file, indent=1)
def main():
clear_terminal.clear()
config.change()
data = config.get()
flag = input('>>> ')
if flag == '1':
USER_EMAIL = input('Your Gmail: ')
number_combinations = email_combinate.combinate(USER_EMAIL)
print(f'JSON generated, size: {number_combinations}')
input('Press ENTER to continue')
main()
Answer the question
In order to leave comments, you need to log in
Default parameter values are defined only once at the time of script execution or module import.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question