computer-use-ootb-internal 0.0.125__py3-none-any.whl → 0.0.127__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.
@@ -135,37 +135,37 @@ class GuardService(win32serviceutil.ServiceFramework):
135
135
 
136
136
  # --- Instance Helper Methods (Moved from module level) ---
137
137
  def get_base_python_executable(self):
138
- """Tries to find python.exe instead of pythonservice.exe if running as service."""
138
+ """Tries to find pythonw.exe or python.exe instead of pythonservice.exe if running as service."""
139
139
  service_exe = sys.executable
140
140
  self.log_info(f"get_base_python_executable: sys.executable is {service_exe}")
141
- # Normalize path for comparison
142
141
  service_exe_lower = service_exe.lower()
143
-
144
- # Check if running as pythonservice.exe
142
+ final_exe_to_use = service_exe # Default to sys.executable
143
+
145
144
  if 'pythonservice.exe' in os.path.basename(service_exe_lower):
146
- # Construct expected python.exe path in the same directory
147
145
  dir_name = os.path.dirname(service_exe)
146
+ potential_pythonw_exe = os.path.join(dir_name, 'pythonw.exe')
148
147
  potential_python_exe = os.path.join(dir_name, 'python.exe')
149
- self.log_info(f"get_base_python_executable: Checking for python.exe at {potential_python_exe}")
150
148
 
151
- if os.path.exists(potential_python_exe):
152
- self.log_info(f"get_base_python_executable: Found python.exe at {potential_python_exe}")
153
- # Quote if necessary
154
- final_exe = potential_python_exe
155
- if " " in final_exe and not final_exe.startswith('"'):
156
- return f'"{final_exe}"'
157
- return final_exe
149
+ self.log_info(f"get_base_python_executable: Checking for pythonw.exe at {potential_pythonw_exe}")
150
+ if os.path.exists(potential_pythonw_exe):
151
+ self.log_info(f"get_base_python_executable: Found pythonw.exe, preferring it.")
152
+ final_exe_to_use = potential_pythonw_exe
158
153
  else:
159
- self.log_error(f"get_base_python_executable: Could not find python.exe near pythonservice.exe (checked {potential_python_exe}). Falling back to using {service_exe}.")
160
- # Fallback to original sys.executable (quoted if needed)
161
- if " " in service_exe and not service_exe.startswith('"'):
162
- return f'"{service_exe}"'
163
- return service_exe
164
- else: # Not running as pythonservice.exe, assume sys.executable is correct
154
+ self.log_info(f"get_base_python_executable: pythonw.exe not found. Checking for python.exe at {potential_python_exe}")
155
+ if os.path.exists(potential_python_exe):
156
+ self.log_info(f"get_base_python_executable: Found python.exe.")
157
+ final_exe_to_use = potential_python_exe
158
+ else:
159
+ self.log_error(f"get_base_python_executable: Could not find pythonw.exe or python.exe near pythonservice.exe. Falling back to using {service_exe}.")
160
+ # Keep final_exe_to_use as service_exe (default)
161
+ else:
165
162
  self.log_info(f"get_base_python_executable: sys.executable is not pythonservice.exe, using it directly.")
166
- if " " in service_exe and not service_exe.startswith('"'):
167
- return f'"{service_exe}"'
168
- return service_exe
163
+ # Keep final_exe_to_use as service_exe (default)
164
+
165
+ # Quote the final selected path if necessary
166
+ if " " in final_exe_to_use and not final_exe_to_use.startswith('"'):
167
+ return f'"{final_exe_to_use}"'
168
+ return final_exe_to_use
169
169
 
170
170
  def get_python_executable(self):
171
171
  # This method is now just an alias for clarity if needed elsewhere,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: computer-use-ootb-internal
3
- Version: 0.0.125
3
+ Version: 0.0.127
4
4
  Summary: Computer Use OOTB
5
5
  Author-email: Siyuan Hu <siyuan.hu.sg@gmail.com>
6
6
  Requires-Python: >=3.11
@@ -2,7 +2,7 @@ computer_use_ootb_internal/README.md,sha256=FxpW95lyub2iX73ZDfK6ML7SdEKg060H5I6G
2
2
  computer_use_ootb_internal/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
3
3
  computer_use_ootb_internal/app_teachmode.py,sha256=ZZW98870QPNK76LN4f4k9RjBELYcF_3hl0w0fvxj3dY,22268
4
4
  computer_use_ootb_internal/dependency_check.py,sha256=y8RMEP6RXQzTgU1MS_1piBLtz4J-Hfn9RjUZg59dyvo,1333
5
- computer_use_ootb_internal/guard_service.py,sha256=rxTdjzhcZf-Osohnf9xnKFTiKUr-DJAgFHPEGfmFDVI,42789
5
+ computer_use_ootb_internal/guard_service.py,sha256=5wmestMg86e-TxnUVRLdDOTzJ7tOB1R0YoxMO8UjEhs,42829
6
6
  computer_use_ootb_internal/requirements-lite.txt,sha256=5DAHomz4A_P2BmTIXNkNqkHbnIF0AyZ4_1XAlb1LaYs,290
7
7
  computer_use_ootb_internal/run_teachmode_ootb_args.py,sha256=HB7L9vuIPUXVqeTicyNJKArzTNAfgdpsyO3JEzmByIo,7315
8
8
  computer_use_ootb_internal/service_manager.py,sha256=SD8jzfn0VVXBOr_nP6zmBWSC2TzrU_sp2e5JJkSlQFU,9734
@@ -33,7 +33,7 @@ computer_use_ootb_internal/computer_use_demo/tools/run.py,sha256=xhXdnBK1di9muaO
33
33
  computer_use_ootb_internal/computer_use_demo/tools/screen_capture.py,sha256=L8qfvtUkPPQGt92N-2Zfw5ZTDBzLsDps39uMnX3_uSA,6857
34
34
  computer_use_ootb_internal/preparation/__init__.py,sha256=AgtGHcBpiTkxJjF0xwcs3yyQ6SyUvhL3G0vD2XO-zJw,63
35
35
  computer_use_ootb_internal/preparation/star_rail_prepare.py,sha256=s1VWszcTnJAKxqCHFlaOEwPkqVSrkiFx_yKpWSnSbHs,2649
36
- computer_use_ootb_internal-0.0.125.dist-info/METADATA,sha256=lJj1xS-1SkLR50BD0oV7Aeaod0RnmFtCsX_1v0wTE1I,1048
37
- computer_use_ootb_internal-0.0.125.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
38
- computer_use_ootb_internal-0.0.125.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
39
- computer_use_ootb_internal-0.0.125.dist-info/RECORD,,
36
+ computer_use_ootb_internal-0.0.127.dist-info/METADATA,sha256=gHp7WyAKyY3ctWvSuT1acMWsvqpxfnVQozEleBI15uI,1048
37
+ computer_use_ootb_internal-0.0.127.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
38
+ computer_use_ootb_internal-0.0.127.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
39
+ computer_use_ootb_internal-0.0.127.dist-info/RECORD,,