MCPcopy
hub / github.com/Sathvik-Rao/ClipCascade / __init__

Method __init__

ClipCascade_Desktop/src/core/application.py:34–67  ·  view source on GitHub ↗
(
        self,
        log_file_path=LOG_FILE_NAME,
        data_file_path=DATA_FILE_NAME,
        mutex_identifier=MUTEX_NAME,
    )

Source from the content-addressed store, hash-verified

32
33class Application:
34 def __init__(
35 self,
36 log_file_path=LOG_FILE_NAME,
37 data_file_path=DATA_FILE_NAME,
38 mutex_identifier=MUTEX_NAME,
39 ):
40 try:
41 self.log_file_path = os.path.join(
42 get_program_files_directory(), log_file_path
43 )
44 self.data_file_path = os.path.join(
45 get_program_files_directory(), data_file_path
46 )
47 self.mutex_identifier = mutex_identifier
48
49 if PLATFORM == MACOS or PLATFORM.startswith(LINUX):
50 self.lock_file = None # File(lock) object
51 self.mutex_identifier = os.path.join(
52 get_program_files_directory(), self.mutex_identifier
53 )
54
55 self.config = Config(
56 file_name=self.data_file_path
57 ) # Maintain a single configuration instance for the entire application lifecycle.
58
59 self.request_manager = RequestManager(self.config)
60 self.stomp_manager = STOMPManager(self.config)
61 self.p2p_manager = P2PManager(self.config)
62 self.cipher_manager = CipherManager(self.config)
63 except Exception as e:
64 CustomDialog(
65 f"An error occurred during application initialization: {e}",
66 msg_type="error",
67 ).mainloop()
68
69 def setup_logging(self):
70 LOG_FORMAT = "%(asctime)s - %(levelname)s - %(message)s"

Callers

nothing calls this directly

Calls 8

ConfigClass · 0.90
RequestManagerClass · 0.90
STOMPManagerClass · 0.90
P2PManagerClass · 0.90
CipherManagerClass · 0.90
CustomDialogClass · 0.90
mainloopMethod · 0.45

Tested by

no test coverage detected