Using Python scripts with an installed Python program(Python v3.14)
Python installation and configuration
Download and install the Python program
You can down Python v3.14 at
Python Release Python 3.14.2 .
Select “Windows installer (32-bit)”.
Install Python. Make sure that the Add Python 3.14 to PATH option is checked.
Install Pywin32
Run Command Prompt as an Administrator.
Use the following command to install Pywin32.
python -m pip install pywin32
Register Pywin32 to the Registry.
Run Command Prompt as an Administrator.
Run the following commands.
cd %USERPROFILE%\AppData\Local\Programs\Python\Python314-32\Lib\site-packages\win32comext\axscript\client python .\pyscript.py
Copy the relevant files to your Python installation location.
Move to %USERPROFILE%\AppData\Local\Programs\Python\Python314-32\lib\site-packages\pywin32_system32 folder
Copy the following two files to the Python installation path (default path: C:\Users["UserName"]\AppData\Local\Programs\Python\Python314-32).
cd C:\Users\["UserName"]\AppData\Local\Programs\Python\Python314-32\lib\site-packages\pywin32_system32 copy pythoncom314.dll %USERPROFILE%\AppData\Local\Programs\Python\Python314-32 copy pywintypes314.dll %USERPROFILE%\AppData\Local\Programs\Python\Python314-32
Change a Registry value
Find \HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{DF630910-1C1D-11d0-AE36-8C0F5E000000}\InprocServer32 key.
Note: You can quickly find this by searching ‘pythoncom’ in the \HKEY_CLASSES_ROOT\WOW6432Node\CLSID\ path.
Change the value of the registry to the path of the copied file (Python installation folder\Pythoncom314.dll).
(Python Default Path : C:\Users\["UserName"]\AppData\Local\Programs\Python\Python314-32\Pythoncom314.dll)Note: Do not use %USERPROFILE% for C:\USERS\[“username”] in this section.
Xshell Configuration
Turn on the ‘Do not use Xshell’s embedded Python' option in the global options (Tools → Options → Advanced).
Run your Python script.
If the installation or settings are not configured properly, the following error can occur.