일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- C언어 포인터
- 도커
- Algorithm
- c# 윈폼
- docker
- 깃
- jupyter lab
- gitlab
- github
- c#
- 플러터
- git
- Unity
- 다트 언어
- C# delegate
- HTML
- vim
- 유니티
- C++
- Python
- jupyter
- c# 추상 클래스
- c# winform
- c언어
- 구조체
- Flutter
- 포인터
- Houdini
- Data Structure
- dart 언어
- Today
- Total
nomad-programmer
[Programming/Python] 컴파일 및 디컴파일 본문
Python 메뉴얼 컴파일 자료
py_compile 이용하는 방법
https://docs.python.org/3/library/py_compile.html
py_compile — Compile Python source files — Python 3.8.1 documentation
py_compile — Compile Python source files Source code: Lib/py_compile.py The py_compile module provides a function to generate a byte-code file from a source file, and another function used when the module source file is invoked as a script. Though not ofte
docs.python.org
compileall 이용하는 방법
https://docs.python.org/3/library/compileall.html
compileall — Byte-compile Python libraries — Python 3.8.1 documentation
compileall — Byte-compile Python libraries Source code: Lib/compileall.py This module provides some utility functions to support installing Python libraries. These functions compile Python source files in a directory tree. This module can be used to create
docs.python.org
스택오버플로우 참고
https://stackoverflow.com/questions/5607283/how-can-i-manually-generate-a-pyc-file-from-a-py-file
How can I manually generate a .pyc file from a .py file
For some reason, I can not depend on Python's "import" statement to generate .pyc file automatically Is there a way to implement a function as following? def py_to_pyc(py_filepath, pyc_filepath):...
stackoverflow.com
Python 디컴파일 방법
.pyc 파일을 .py 파일로 만드는 방법에는 "uncompyle6" 라는 것이 있다.
https://github.com/rocky/python-uncompyle6
rocky/python-uncompyle6
A cross-version Python bytecode decompiler. Contribute to rocky/python-uncompyle6 development by creating an account on GitHub.
github.com
pip install uncompyle6
// example
uncompyle6 <파일명>.pyc
py2exe 로 생성한 파일에서 소스파일 추출
unpy2exe 를 이용한다. 이것을 이용하면 exe파일에서 .pyc 파일을 얻어낼 수 있다.
https://github.com/matiasb/unpy2exe
matiasb/unpy2exe
Extract .pyc files from executables created with py2exe - matiasb/unpy2exe
github.com
'Programming > Python' 카테고리의 다른 글
[Programming/Python] pyinstaller 파일 용량 문제 (0) | 2020.07.09 |
---|---|
[Programming/Python] License 생성, 부여, 검사 등의 모듈 (0) | 2020.03.24 |
[Programming/Python] .py file compile (0) | 2020.03.23 |
[Programming/Python] functools의 partial (0) | 2020.03.11 |
[Programming/Python] 코드 난독화(obfuscation) / Source Code 보호 (0) | 2019.12.23 |