I am building a custom module (let's call it test_mod
) for my files where I define a backup path with a timestamp:
from datetime import datetime
class Backup:
Timestamp = datetime.now()
Using import test_mod
and calling test_mod.Backup.Timestamp
will return me the timestamp of the moment when the module was imported, but as I call the attribute again and again, the timestamp remains the same.
Why is that and what should I do if I want to make the .Timestamp
atribute update whenever I call it?