색상과 위치 정보가 포함된 개선된 프린트 라이브러리
Project description
eddmPrint
개선된 print 함수로 파일명, 함수명, 라인 번호를 자동으로 표시합니다.
설치 방법
pip install eddmPrint
기본 사용법
from eddmPrint import EddmPrint
# 기본 설정으로 시작
printer = EddmPrint()
printer.start()
# 이제 print는 자동으로 위치 정보를 포함합니다
print("Hello, World!") # [파일명: example.py | 함수명: <module> | 라인: 7] Hello, World!
# 원래 print 함수로 복원
printer.restore()
색상 사용자 지정
from eddmPrint import EddmPrint, Colors
printer = EddmPrint(color=Colors.GREEN)
printer.start()
print("녹색으로 표시됩니다")
# 중간에 색상 변경
printer.setColor(Colors.RED)
print("이제 빨간색으로 표시됩니다")
템플릿 사용자 지정
from eddmPrint import EddmPrint, Templates
# 간단한 템플릿 사용
printer = EddmPrint(prefixTemplate=Templates.SIMPLE)
printer.start()
print("간단한 템플릿으로 표시됩니다") # [file.py:10] 간단한 템플릿으로 표시됩니다
# 사용자 정의 템플릿
custom_template = "위치: {file}의 {line}번째 줄"
printer.setPrefixTemplate(custom_template)
print("사용자 정의 템플릿으로 표시됩니다") # 위치: file.py의 14번째 줄 사용자 정의 템플릿으로 표시됩니다
개발자 정보
새 버전 릴리스하기
이 프로젝트는 GitHub Actions를 사용하여 자동으로 릴리스를 생성하고 PyPI에 배포합니다. 새 버전을 릴리스하려면 다음 단계를 따르세요:
- 코드를 수정하고 커밋합니다.
- 버전 태그를 생성합니다:
git tag v0.1.0 git push origin v0.1.0
- GitHub Actions가 자동으로 릴리스를 생성하고 PyPI에 배포합니다.
라이센스
이 프로젝트는 MIT 라이센스를 따릅니다. 자세한 내용은 LICENSE를 참조하세요.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eddmprint-0.1.0.tar.gz
(4.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eddmprint-0.1.0.tar.gz.
File metadata
- Download URL: eddmprint-0.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4314bc3cf393f0c83ebd071072592668754df6d40f6bdd06702bd7cddba637d8
|
|
| MD5 |
cbaad85d097639e983d145df851da202
|
|
| BLAKE2b-256 |
34877f76d556c18a888177603c5942e931958aacbb7d3bb7146ba2a371d86693
|
File details
Details for the file eddmprint-0.1.0-py3-none-any.whl.
File metadata
- Download URL: eddmprint-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7b69c4ccd111acb626b95b38b67a92cc5020eeb032e3a90b1402ff33f98bc85
|
|
| MD5 |
fbcd99ba85f585aebb25f630e479cbc2
|
|
| BLAKE2b-256 |
515582d19e846c67cce29ee5ac692593c1e44c647132d9783132019ff3a6e087
|