medicafe 0.250805.0__py3-none-any.whl → 0.250805.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of medicafe might be problematic. Click here for more details.

MediCafe/__main__.py CHANGED
@@ -24,7 +24,7 @@ batch script without adding unnecessary interface layers.
24
24
  import sys
25
25
  import os
26
26
  import argparse
27
- import os
27
+ import subprocess
28
28
 
29
29
  # Set up module paths for proper imports
30
30
  def setup_entry_point_paths():
@@ -90,10 +90,33 @@ def run_medilink():
90
90
  """Run MediLink application"""
91
91
  try:
92
92
  print("Starting MediLink...")
93
- # Import and execute MediLink
94
- import runpy
95
- exit_code = runpy.run_module('MediLink.MediLink_main', run_name='__main__')
96
- return 0
93
+ # Use subprocess.call for Python 3.4.4 compatibility
94
+
95
+ # Get the path to MediLink_main.py
96
+ current_dir = os.path.dirname(os.path.abspath(__file__))
97
+ workspace_root = os.path.dirname(current_dir)
98
+ medilink_main_path = os.path.join(workspace_root, 'MediLink', 'MediLink_main.py')
99
+
100
+ if os.path.exists(medilink_main_path):
101
+ # Set up environment for subprocess to find MediCafe
102
+ env = os.environ.copy()
103
+ python_path = workspace_root
104
+ if 'PYTHONPATH' in env:
105
+ env['PYTHONPATH'] = python_path + os.pathsep + env['PYTHONPATH']
106
+ else:
107
+ env['PYTHONPATH'] = python_path
108
+
109
+ # Set working directory to MediLink directory for proper file paths
110
+ medilink_dir = os.path.dirname(medilink_main_path)
111
+
112
+ # Use subprocess.call for Python 3.4.4 compatibility
113
+ result = subprocess.call([sys.executable, medilink_main_path],
114
+ cwd=medilink_dir,
115
+ env=env)
116
+ return result
117
+ else:
118
+ print("Error: MediLink_main.py not found at {}".format(medilink_main_path))
119
+ return 1
97
120
 
98
121
  except ImportError as e:
99
122
  print("Error: Unable to import MediLink: {}".format(e))
@@ -106,10 +129,33 @@ def run_claims_status():
106
129
  """Run United Claims Status checker"""
107
130
  try:
108
131
  print("Starting United Claims Status...")
109
- # Import and execute Claims Status
110
- import runpy
111
- exit_code = runpy.run_module('MediLink.MediLink_ClaimStatus', run_name='__main__')
112
- return 0
132
+ # Use subprocess.call for Python 3.4.4 compatibility
133
+
134
+ # Get the path to MediLink_ClaimStatus.py
135
+ current_dir = os.path.dirname(os.path.abspath(__file__))
136
+ workspace_root = os.path.dirname(current_dir)
137
+ claims_status_path = os.path.join(workspace_root, 'MediLink', 'MediLink_ClaimStatus.py')
138
+
139
+ if os.path.exists(claims_status_path):
140
+ # Set up environment for subprocess to find MediCafe
141
+ env = os.environ.copy()
142
+ python_path = workspace_root
143
+ if 'PYTHONPATH' in env:
144
+ env['PYTHONPATH'] = python_path + os.pathsep + env['PYTHONPATH']
145
+ else:
146
+ env['PYTHONPATH'] = python_path
147
+
148
+ # Set working directory to MediLink directory for proper file paths
149
+ medilink_dir = os.path.dirname(claims_status_path)
150
+
151
+ # Use subprocess.call for Python 3.4.4 compatibility
152
+ result = subprocess.call([sys.executable, claims_status_path],
153
+ cwd=medilink_dir,
154
+ env=env)
155
+ return result
156
+ else:
157
+ print("Error: MediLink_ClaimStatus.py not found at {}".format(claims_status_path))
158
+ return 1
113
159
 
114
160
  except ImportError as e:
115
161
  print("Error: Unable to import MediLink_ClaimStatus: {}".format(e))
@@ -122,10 +168,33 @@ def run_deductible():
122
168
  """Run United Deductible checker"""
123
169
  try:
124
170
  print("Starting United Deductible...")
125
- # Import and execute Deductible checker
126
- import runpy
127
- exit_code = runpy.run_module('MediLink.MediLink_Deductible', run_name='__main__')
128
- return 0
171
+ # Use subprocess.call for Python 3.4.4 compatibility
172
+
173
+ # Get the path to MediLink_Deductible.py
174
+ current_dir = os.path.dirname(os.path.abspath(__file__))
175
+ workspace_root = os.path.dirname(current_dir)
176
+ deductible_path = os.path.join(workspace_root, 'MediLink', 'MediLink_Deductible.py')
177
+
178
+ if os.path.exists(deductible_path):
179
+ # Set up environment for subprocess to find MediCafe
180
+ env = os.environ.copy()
181
+ python_path = workspace_root
182
+ if 'PYTHONPATH' in env:
183
+ env['PYTHONPATH'] = python_path + os.pathsep + env['PYTHONPATH']
184
+ else:
185
+ env['PYTHONPATH'] = python_path
186
+
187
+ # Set working directory to MediLink directory for proper file paths
188
+ medilink_dir = os.path.dirname(deductible_path)
189
+
190
+ # Use subprocess.call for Python 3.4.4 compatibility
191
+ result = subprocess.call([sys.executable, deductible_path],
192
+ cwd=medilink_dir,
193
+ env=env)
194
+ return result
195
+ else:
196
+ print("Error: MediLink_Deductible.py not found at {}".format(deductible_path))
197
+ return 1
129
198
 
130
199
  except ImportError as e:
131
200
  print("Error: Unable to import MediLink_Deductible: {}".format(e))
@@ -138,10 +207,33 @@ def run_download_emails():
138
207
  """Run email download functionality"""
139
208
  try:
140
209
  print("Starting email download...")
141
- # Import and execute Gmail downloader
142
- import runpy
143
- exit_code = runpy.run_module('MediLink.MediLink_Gmail', run_name='__main__')
144
- return 0
210
+ # Use subprocess.call for Python 3.4.4 compatibility
211
+
212
+ # Get the path to MediLink_Gmail.py
213
+ current_dir = os.path.dirname(os.path.abspath(__file__))
214
+ workspace_root = os.path.dirname(current_dir)
215
+ medilink_gmail_path = os.path.join(workspace_root, 'MediLink', 'MediLink_Gmail.py')
216
+
217
+ if os.path.exists(medilink_gmail_path):
218
+ # Set up environment for subprocess to find MediCafe
219
+ env = os.environ.copy()
220
+ python_path = workspace_root
221
+ if 'PYTHONPATH' in env:
222
+ env['PYTHONPATH'] = python_path + os.pathsep + env['PYTHONPATH']
223
+ else:
224
+ env['PYTHONPATH'] = python_path
225
+
226
+ # Set working directory to MediLink directory for proper file paths
227
+ medilink_dir = os.path.dirname(medilink_gmail_path)
228
+
229
+ # Use subprocess.call for Python 3.4.4 compatibility
230
+ result = subprocess.call([sys.executable, medilink_gmail_path],
231
+ cwd=medilink_dir,
232
+ env=env)
233
+ return result
234
+ else:
235
+ print("Error: MediLink_Gmail.py not found at {}".format(medilink_gmail_path))
236
+ return 1
145
237
 
146
238
  except ImportError as e:
147
239
  print("Error: Unable to import MediLink_Gmail: {}".format(e))
@@ -26,18 +26,26 @@ server_port = 8000
26
26
  cert_file = 'server.cert'
27
27
  key_file = 'server.key'
28
28
  # Try to find openssl.cnf in various locations
29
- openssl_cnf = 'MediLink\\openssl.cnf'
29
+ openssl_cnf = 'openssl.cnf' # Use relative path since we're running from MediLink directory
30
30
  if not os.path.exists(openssl_cnf):
31
31
  log("Could not find openssl.cnf at: " + os.path.abspath(openssl_cnf))
32
- # Try one directory up
33
- parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
34
- alternative_path = os.path.join(parent_dir, 'MediBot', 'openssl.cnf')
35
- log("Trying alternative path: " + alternative_path)
36
- if os.path.exists(alternative_path):
37
- openssl_cnf = alternative_path
32
+ # Try MediLink directory
33
+ medilink_dir = os.path.dirname(os.path.abspath(__file__))
34
+ medilink_openssl = os.path.join(medilink_dir, 'openssl.cnf')
35
+ log("Trying MediLink directory: " + medilink_openssl)
36
+ if os.path.exists(medilink_openssl):
37
+ openssl_cnf = medilink_openssl
38
38
  log("Found openssl.cnf at: " + openssl_cnf)
39
39
  else:
40
- log("Could not find openssl.cnf at alternative path either")
40
+ # Try one directory up
41
+ parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
42
+ alternative_path = os.path.join(parent_dir, 'MediBot', 'openssl.cnf')
43
+ log("Trying alternative path: " + alternative_path)
44
+ if os.path.exists(alternative_path):
45
+ openssl_cnf = alternative_path
46
+ log("Found openssl.cnf at: " + openssl_cnf)
47
+ else:
48
+ log("Could not find openssl.cnf at alternative path either")
41
49
 
42
50
  httpd = None # Global variable for the HTTP server
43
51
  shutdown_event = Event() # Event to signal shutdown
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: medicafe
3
- Version: 0.250805.0
3
+ Version: 0.250805.2
4
4
  Summary: MediCafe
5
5
  Home-page: https://github.com/katanada2
6
6
  Author: Daniel Vidaud
@@ -18,7 +18,7 @@ MediBot/update_json.py,sha256=vvUF4mKCuaVly8MmoadDO59M231fCIInc0KI1EtDtPA,3704
18
18
  MediBot/update_medicafe.py,sha256=-l3jaWLkwehX3ju5OhxPMo621_UWOH4dauHbJj-JNcY,13255
19
19
  MediCafe/MediLink_ConfigLoader.py,sha256=gCC4me808KzSNneRTj6h3IFwjERxP-Q9XQUayPZu7Ew,7009
20
20
  MediCafe/__init__.py,sha256=6bSEXGy35ljEeTv40LcsokC8riYGk6lRj1QDpSepwnA,5461
21
- MediCafe/__main__.py,sha256=JnKwWOosAyzn6BHOKGQ6_6qEnbcT2Tr6p0EGuWyY0oE,7559
21
+ MediCafe/__main__.py,sha256=Sr_4BHC3_o11472EEJ9qcrfuQLTyPZJHNqTTLb1yVx8,12050
22
22
  MediCafe/api_core.py,sha256=uevBnoJJOtF_9WuJTVNkJOdNFfp9ReLlK5CtDoSdWZ4,58693
23
23
  MediCafe/api_core_backup.py,sha256=mad-sFk4nyUmNb2nQ_t4GMT6FJ4hrdJyKHUO0oRvMaE,18629
24
24
  MediCafe/api_factory.py,sha256=GJjsJQwrAI7WY2cbn3P1I-w9wtcRmQaXMw8CtFDvkxU,11015
@@ -49,7 +49,7 @@ MediLink/MediLink_Deductible_Validator.py,sha256=2g-lZd-Y5fJ1mfP87vM6oABg0t5Om-7
49
49
  MediLink/MediLink_Display_Utils.py,sha256=Bl15Ofqh09KIYsNXzM6WIE97Gp_4RVUw43J0NUzIERY,3121
50
50
  MediLink/MediLink_Down.py,sha256=vZEFNWa6drpXK8DCzt3DAlHdPGdhv3HoLnQh9cppT8o,11793
51
51
  MediLink/MediLink_ERA_decoder.py,sha256=MiOtDcXnmevPfHAahIlTLlUc14VcQWAor9Xa7clA2Ts,8710
52
- MediLink/MediLink_Gmail.py,sha256=urVnaDOIZkIiWAJxx3ChvldTmlVQlAiySMMtw-4tw-U,34874
52
+ MediLink/MediLink_Gmail.py,sha256=9gd_Lp7Bz-seUxquaOAC34fPOHLH7aeCM2yCOaHRVOo,35329
53
53
  MediLink/MediLink_GraphQL.py,sha256=O6OCaumT0zIC7YcIAwLOOYxiQnYhoMc48UL8ilNIBec,45720
54
54
  MediLink/MediLink_Mailer.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
55
  MediLink/MediLink_Parser.py,sha256=w2ZD4minjwkaMz7nzP_r8v_Ow_uM5KHjpPSY8mIHcdE,9787
@@ -73,9 +73,9 @@ MediLink/test_cob_library.py,sha256=wUMv0-Y6fNsKcAs8Z9LwfmEBRO7oBzBAfWmmzwoNd1g,
73
73
  MediLink/test_timing.py,sha256=yH2b8QPLDlp1Zy5AhgtjzjnDHNGhAD16ZtXtZzzESZw,2042
74
74
  MediLink/test_validation.py,sha256=FJrfdUFK--xRScIzrHCg1JeGdm0uJEoRnq6CgkP2lwM,4154
75
75
  MediLink/webapp.html,sha256=JPKT559aFVBi1r42Hz7C77Jj0teZZRumPhBev8eSOLk,19806
76
- medicafe-0.250805.0.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
77
- medicafe-0.250805.0.dist-info/METADATA,sha256=AVSamvkieMxjqWi0qyKVjMIcnsoB-0A6u1OzPUJfbV8,5501
78
- medicafe-0.250805.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
79
- medicafe-0.250805.0.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
80
- medicafe-0.250805.0.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
81
- medicafe-0.250805.0.dist-info/RECORD,,
76
+ medicafe-0.250805.2.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
77
+ medicafe-0.250805.2.dist-info/METADATA,sha256=VGHRuX2s8kSmlQKvUW92Ux1ZOMM1sslKpHA_SbMIWks,5501
78
+ medicafe-0.250805.2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
79
+ medicafe-0.250805.2.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
80
+ medicafe-0.250805.2.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
81
+ medicafe-0.250805.2.dist-info/RECORD,,