-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
34 lines (25 loc) · 781 Bytes
/
main.py
File metadata and controls
34 lines (25 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python3
"""FinMail Intelligence Dashboard — Personal Finance Email Intelligence."""
import logging
import os
import sys
log_handlers = [logging.StreamHandler(sys.stdout)]
# Also log to file for bundled app (no visible terminal)
log_dir = os.path.join(os.path.expanduser("~"), ".finmail")
try:
os.makedirs(log_dir, exist_ok=True)
log_handlers.append(logging.FileHandler(os.path.join(log_dir, "app.log")))
except OSError:
pass
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
handlers=log_handlers,
)
def main():
from gui.app import FinMailApp
app = FinMailApp()
app.protocol("WM_DELETE_WINDOW", app.on_closing)
app.mainloop()
if __name__ == "__main__":
main()