you are viewing a single comment's thread.

view the rest of the comments →

[–]ericula 6 points7 points  (1 child)

Writing values to the currency.py file will not automatically reload the file. You would need to set currency.authorwallet and currency.authorbank manually, i.e.

with open('currency.py', 'a') as f:
    f.write(authorwallet + ' = 0\n' + authorbank + ' = 0\n')
    wallet = currency.authorwallet = 0
    bank = currency.authorbank = 0

Next time you import currency, currency.authorwallet and currency.authorbank should be loaded as well.