728x90
반응형
-
파이썬 소스코드를 검색하여, 네이티브 패키지(
native package
)를 사용하는지 여부를 검사 -
사용 방법:
- 경로
/home/sandbox/python
에 있는 파이썬 파일들이 네이티브 패키지를 사용하는지 검사함.
- 경로
python find_native_python.py /home/sandbox/python
- 코드 (main 함수)
if __name__ == "__main__" :
# Getting a project directory as a command line factor
project_dir = sys.argv[1] if len(sys.argv) > 1 else "."
results = analyze_directory(project_dir)
if results:
print("Native code related calls found:")
for filepath, calls in results.items():
for func, lineno in calls:
print(f" - {filepath}: {func} (Line {lineno})")
else:
print("There are no native code related calls.")
728x90
반응형
'Python' 카테고리의 다른 글
find_native_python : 파이썬 네이티브 패키지(native package) 사용여부 검사 (0) | 2025.01.22 |
---|---|
poker_hand_probabilities : 포커(Poker) 확률 계산기 (0) | 2025.01.22 |
Windows에서 명령 프롬프트(Command Prompt)와 파워쉘(PowerShell)로 pyenv 설치 (0) | 2025.01.16 |
Windows에서 PYENV, PYENV_ROOT, PYENV_HOME 환경 변수 설정 방법 (0) | 2025.01.16 |
Jinja: Python을 위한 강력한 템플릿(template) 엔진의 모든 것 (0) | 2025.01.15 |