/
파이썬 스크립트를 외부 설치 프로그램으로 사용하기(Python v3.10)

파이썬 스크립트를 외부 설치 프로그램으로 사용하기(Python v3.10)

파이썬 설치 및 설정

  1. Python 프로그램을 다운로드 받은 후 설치합니다.

    1. Python 다운로드 및 설치를 위해 Python Release Python 3.10.1 에서 3.10.1을 다운로드합니다.

    2. 해당 페이지에서 “Windows installer (32-bit)”를 다운로드합니다.

    3. Python을 설치합니다. 설치 시 Add Python 3.10 to PATH를 체크합니다.

       

  2. Pywin32 를 설치합니다.

    1. 명령 프롬프트를 관리자 권한으로 실행합니다.

    2. 다음 명령을 사용하여 Pywin32를 설치합니다

      python -m pip install pywin32

       

  3. Pywin32를 Register에 등록합니다.

    1. 명령 프롬프트를 관리자 권한으로 실행합니다.

    2. 다음 명령을 실행합니다.

      cd C:\Users\["UserName"]\AppData\Local\Programs\Python\Python310-32\Lib\site-packages\win32comext\axscript\client python .\pyscript.py

       

  4. 관련 파일을 Python 설치 위치로 복사합니다.

    1. C:\Users\["UserName"]\AppData\Local\Programs\Python\Python310-32\lib\site-packages\pywin32_system32로 이동합니다.

    2. 다음 파일 2개를 Python 설치 경로 (기본경로 : C:\Users\["UserName"]\AppData\Local\Programs\Python\Python310-32)로 복사합니다.

      cd C:\Users\["UserName"]\AppData\Local\Programs\Python\Python310-32\lib\site-packages\pywin32_system32 copy pythoncom310.dll C:\Users\["UserName"]\AppData\Local\Programs\Python\Python310-32 copy pywintypes310.dll C:\Users\["UserName"]\AppData\Local\Programs\Python\Python310-32

       

  5. 레지스트리를 변경합니다.

    1. \HKEY_CLASSES_ROOT\WOW6432Node\CLSID\{DF630910-1C1D-11d0-AE36-8C0F5E000000}\InprocServer32 해당 경로를 찾습니다.
      참고: * \HKEY_CLASSES_ROOT\WOW6432Node\CLSID\해당 경로에서 pythoncom을 검색하시면 빨리 찾을 수 있습니다.

    2. 해당 레지스트리의 값을 복사한 파일(Python설치폴더\Pythoncom310.dll) 경로로 변경합니다.
      (Python 기본 경로 : C:\Users\["UserName"]\AppData\Local\Programs\Python\Python310-32\Pythoncom310.dll)

       

Xshell 설정

  1. Xshell의 ‘도구 - 옵션 - 고급’에서 ‘설치형 Python을 사용' 옵션을 켭니다.

     

  2. 이제 작성한 Python 스크립트 파일을 실행할 수 있습니다.

  3. 정상적으로 설치 및 설정이 되지 않은 경우 다음 에러가 발생합니다.

 

 

 

Related content

터널링을 이용하여 이메일을 안전하게 전송하기
터널링을 이용하여 이메일을 안전하게 전송하기
Read with this
How to utilize an external installation type Python script
How to utilize an external installation type Python script
More like this
Xshell 시작하기
Xshell 시작하기
Read with this
Pyhon script error 8007007e [1]
Pyhon script error 8007007e [1]
More like this
Xshell
Read with this
Using Python scripts with an installed Python program(Python v3.10)
Using Python scripts with an installed Python program(Python v3.10)
More like this