medicafe 0.250810.4__py3-none-any.whl → 0.250810.5__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.
MediBot/MediBot.bat CHANGED
@@ -557,7 +557,6 @@ if errorlevel 1 (
557
557
  pause
558
558
  )
559
559
 
560
- pause
561
560
  goto main_menu
562
561
 
563
562
  :: MediLink Flow
@@ -571,7 +570,6 @@ if errorlevel 1 (
571
570
  pause
572
571
  )
573
572
 
574
- pause
575
573
  goto main_menu
576
574
 
577
575
  :toggle_perf_logging
MediCafe/__main__.py CHANGED
@@ -48,37 +48,33 @@ def run_medibot(config_file=None):
48
48
  """Run MediBot application"""
49
49
  try:
50
50
  print("Starting MediBot...")
51
-
52
- # Set up command line arguments
51
+
52
+ # Resolve workspace root and MediBot.py path
53
+ current_dir = os.path.dirname(os.path.abspath(__file__))
54
+ workspace_root = os.path.dirname(current_dir)
55
+ medibot_path = os.path.join(workspace_root, 'MediBot', 'MediBot.py')
56
+
57
+ if not os.path.exists(medibot_path):
58
+ print("Error: MediBot.py not found at {}".format(medibot_path))
59
+ return 1
60
+
61
+ # Build subprocess arguments
62
+ args = [sys.executable, medibot_path]
53
63
  if config_file:
54
- sys.argv = ['MediBot.py', config_file]
64
+ args.append(config_file)
65
+
66
+ # Ensure subprocess can import project packages
67
+ env = os.environ.copy()
68
+ python_path = workspace_root
69
+ if 'PYTHONPATH' in env:
70
+ env['PYTHONPATH'] = python_path + os.pathsep + env['PYTHONPATH']
55
71
  else:
56
- sys.argv = ['MediBot.py']
57
-
58
- # Import and run MediBot directly
59
- try:
60
- from MediBot import MediBot
61
- # If MediBot has a main function, call it
62
- if hasattr(MediBot, 'main'):
63
- return MediBot.main()
64
- else:
65
- # Otherwise, just import it (it will run its own code)
66
- return 0
67
- except ImportError:
68
- # Fallback: try to run the file directly
69
- import subprocess
70
- medibot_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'MediBot', 'MediBot.py')
71
- if os.path.exists(medibot_path):
72
- # Use subprocess.call for Python 3.4.4 compatibility
73
- result = subprocess.call([sys.executable, medibot_path] + sys.argv[1:],
74
- cwd=os.path.dirname(medibot_path))
75
- return result
76
- else:
77
- raise ImportError("MediBot.py not found at {}".format(medibot_path))
78
-
79
- except ImportError as e:
80
- print("Error: Unable to import MediBot: {}".format(e))
81
- return 1
72
+ env['PYTHONPATH'] = python_path
73
+
74
+ # Run MediBot as a script so its __main__ block executes
75
+ result = subprocess.call(args, cwd=os.path.dirname(medibot_path), env=env)
76
+ return result
77
+
82
78
  except Exception as e:
83
79
  print("Error running MediBot: {}".format(e))
84
80
  return 1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: medicafe
3
- Version: 0.250810.4
3
+ Version: 0.250810.5
4
4
  Summary: MediCafe
5
5
  Home-page: https://github.com/katanada2
6
6
  Author: Daniel Vidaud
@@ -1,4 +1,4 @@
1
- MediBot/MediBot.bat,sha256=W7B9QSezMsOnv3TkTcQwmOG12bj0SJNRMoXucaMOqxI,25106
1
+ MediBot/MediBot.bat,sha256=IDRMxWGoiUsyNWKU8ASiBlF454Tp9gp4PV1SDjQpnE8,25092
2
2
  MediBot/MediBot.py,sha256=G3QuSgyEizas4plYez1n-u8xigbbtYEgl1x6ZSTWsAw,34306
3
3
  MediBot/MediBot_Charges.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  MediBot/MediBot_Crosswalk_Library.py,sha256=HZHbjKHhjLW2jERmLS6pEZOl-MUxUu1YwA6oUltfdkE,24693
@@ -18,7 +18,7 @@ MediBot/update_json.py,sha256=vvUF4mKCuaVly8MmoadDO59M231fCIInc0KI1EtDtPA,3704
18
18
  MediBot/update_medicafe.py,sha256=i2-6b2y9XXaroPG8uP_RPFwOOsQSY_dTiuhl6vG8uoo,25693
19
19
  MediCafe/MediLink_ConfigLoader.py,sha256=_tB8FlJSNsRDHKL2X7XMmtLcxhCeXtiaddV-jOQWHi4,7723
20
20
  MediCafe/__init__.py,sha256=DF0XUu3G43AejXvEmd5aCyy0GDQahQD0pMwexmxem-E,5477
21
- MediCafe/__main__.py,sha256=MKw4jaPiBuqsvU7KzRtmgVcOv6QPspPzR8x5dQzih0I,12097
21
+ MediCafe/__main__.py,sha256=2VvgWe2xxS_oWMk8shIf_z617DeBpZDt_isww3GHQ2I,11817
22
22
  MediCafe/api_core.py,sha256=AwnB2BMiBOMS_LKJlkHgd_lQPpE57WEYMfS-O-DeOzo,63851
23
23
  MediCafe/api_core_backup.py,sha256=Oy_Fqt0SEvGkQN1Oqw5iUPVFxPEokyju5CuPEb9k0OY,18686
24
24
  MediCafe/api_factory.py,sha256=I5AeJoyu6m7oCrjc2OvVvO_4KSBRutTsR1riiWhTZV0,12086
@@ -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.250810.4.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
77
- medicafe-0.250810.4.dist-info/METADATA,sha256=T7Ts8QkhbshySGFM13dayAIr38IFgpNj2GunO2PfRRY,5501
78
- medicafe-0.250810.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
79
- medicafe-0.250810.4.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
80
- medicafe-0.250810.4.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
81
- medicafe-0.250810.4.dist-info/RECORD,,
76
+ medicafe-0.250810.5.dist-info/LICENSE,sha256=65lb-vVujdQK7uMH3RRJSMwUW-WMrMEsc5sOaUn2xUk,1096
77
+ medicafe-0.250810.5.dist-info/METADATA,sha256=J6-Zwjdo_ImfDTlIoWyCpaokFFRSzQ7xsfTAsH3tkBs,5501
78
+ medicafe-0.250810.5.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
79
+ medicafe-0.250810.5.dist-info/entry_points.txt,sha256=m3RBUBjr-xRwEkKJ5W4a7NlqHZP_1rllGtjZnrRqKe8,52
80
+ medicafe-0.250810.5.dist-info/top_level.txt,sha256=U6-WBJ9RCEjyIs0BlzbQq_PwedCp_IV9n1616NNV5zA,26
81
+ medicafe-0.250810.5.dist-info/RECORD,,