| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 명언모음
- 오늘의역사
- 명언
- 명심보감
- 파이썬
- Gemini
- 이모지메모
- 장자명언
- FSM
- 코틀린
- Android
- 소울칼리버6
- 오픈소스
- Firebase
- Freesound
- javascript
- 명상명언
- ASMR
- 생성AI
- Linux
- Flutter
- jetpack compose
- kotlin
- ChatGPT
- 공부집중
- Coroutine
- DART
- 좋은글필사하기
- androidx
- gemini-cli
Archives
- Today
- Total
Vintage appMaker의 Tech Blog
[github] 파이썬 확장모듈(C++) 만들기 본문
VintageAppMaker/MakePythonModule
Visual Studio 2008로 파이썬 모듈만들기. Contribute to VintageAppMaker/MakePythonModule development by creating an account on GitHub.
github.com
개발환경
- Visual C++(2008)
- Python2.7(화면설정은 python 2.5 screenshot)
C++로 pyd 만드는 예제. 개발환경이 10년전이긴하나, C++로 된 라이브러리를 만든다면 참고하여 자신의 개발환경에 맞게 빌드할 수 있다. 예제는 Python 소스에서 C++로 만든 확장모듈 dlog의 메소드를 사용하여 GUI(Window GUI)에 문자열을 출력하는 것이다.

# -*- coding: cp949 -*-
import dlog
import os
# testing twice open
dlog.openwindow()
dlog.openwindow()
findlist = os.listdir("c:\\windows\\")
i = 0
for f in findlist:
dlog.dout(f, i)
i = i + 1
raw_input("아무키나 누르세요 - 윈도우 종료")
dlog.closewindow()
raw_input("아무키나 누르세요 - 윈도우 시작")
# testing twice open
dlog.openwindow()
dlog.openwindow()
findlist = os.listdir("c:\\windows\\")
i = 0
for f in findlist:
dlog.dout(f, i)
i = i + 1
'Source code or Tip > python' 카테고리의 다른 글
| python에서 case - 딕셔너리와 함수 (0) | 2020.12.30 |
|---|---|
| python에서 간단한 RPC 구현 (Ubuntu <--> Windows) (0) | 2020.12.09 |
| 스크래치 2.0 HTTP Extension 만들기 (0) | 2020.11.10 |
| 우분투 python에서 ncurses (0) | 2020.11.09 |
| python selenium을 이용한 브라우저 제어 (0) | 2020.07.29 |
Comments