Skip to main content

EddmPrint

콘솔 출력에 색상과 메타데이터(파일명, 함수명, 라인번호)를 자동으로 추가하는 Python 라이브러리입니다.

설치

pip install eddmPrint

사용법

기본 사용법 (v0.1.4 이상)

라이브러리를 임포트하면 자동으로 시작되며, 기본 print 함수가 자동으로 확장됩니다:

import eddmPrint

# 기본 print 함수가 자동으로 확장됩니다
print("테스트 메시지")  # 자동으로 파일명, 함수명, 라인 정보가 출력됨

고급 사용법

import eddmPrint

# 기본 프린트 (print 함수가 자동으로 확장됨)
print("기본 메시지")

# 다양한 메시지 타입
eddmPrint.error("에러 메시지")
eddmPrint.success("성공 메시지")
eddmPrint.warning("경고 메시지")
eddmPrint.info("정보 메시지")

# 줄바꿈이 포함된 메시지
eddmPrint.println("줄바꿈이 포함된 메시지")

색상과 템플릿 커스터마이징

from eddmPrint import Colors, Templates

# 색상 직접 설정
print("빨간색 메시지", color=Colors.RED)
print("초록색 메시지", color=Colors.GREEN)

# 템플릿 설정
print("간단한 템플릿", template=Templates.SIMPLE)
print("상세한 템플릿", template=Templates.DETAILED)

커스텀 프린터 사용

from eddmPrint import EddmPrint

# 새로운 인스턴스 생성
my_printer = EddmPrint(color="\033[36m", prefixTemplate="[DEBUG {file}:{line}]")
my_printer.start()
my_printer.print("커스텀 프린터 테스트")

색상 목록

다음과 같은 색상 상수를 사용할 수 있습니다:

  • Colors.BLACK
  • Colors.RED
  • Colors.GREEN
  • Colors.YELLOW
  • Colors.BLUE
  • Colors.MAGENTA
  • Colors.CYAN
  • Colors.WHITE
  • Colors.BRIGHT_RED
  • Colors.BRIGHT_GREEN
  • 등등...

템플릿 목록

다음과 같은 템플릿 상수를 사용할 수 있습니다:

  • Templates.DEFAULT: "[파일명: {file} | 함수명: {func} | 라인: {line}]"
  • Templates.SIMPLE: "[{file}:{line}]"
  • Templates.FUNCTION_ONLY: "[함수: {func}]"
  • Templates.FILE_ONLY: "[파일: {file}]"
  • Templates.LINE_ONLY: "[라인: {line}]"
  • Templates.COMPACT: "{file}:{line}"
  • Templates.DETAILED: "파일: {file} | 함수: {func} | 라인: {line}"

개발자 정보

새 버전 릴리스하기

이 프로젝트는 GitHub Actions를 사용하여 자동으로 릴리스를 생성하고 PyPI에 배포합니다. 새 버전을 릴리스하려면 다음 단계를 따르세요:

  1. 코드를 수정하고 커밋합니다.
  2. 버전 태그를 생성합니다:
    git tag v0.1.0
    git push origin v0.1.0
    
  3. GitHub Actions가 자동으로 릴리스를 생성하고 PyPI에 배포합니다.

라이센스

이 프로젝트는 MIT 라이센스를 따릅니다. 자세한 내용은 LICENSE를 참조하세요.

Metadata

Release files for eddmPrint 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eddmPrint 0.1.7
File Size Uploaded
eddmprint-0.1.7.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eddmPrint 0.1.7
File Interpreter ABI Platform
eddmprint-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / eddmprint-0.1.7.tar.gz

Download URL eddmprint-0.1.7.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a498a4cf5ffb19bb66bee8329238bd27046427fd00289c535cb52fdaa6f5f5aa
BLAKE2b-256 checksum
How to use checksums
faab0c59a1de6158a19a80f45749ad7fd3ea4dfd4a8b3e262a8607bdbfbdd5d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / eddmprint-0.1.7-py3-none-any.whl

Download URL eddmprint-0.1.7-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0485cd4374bfc3bcef19b434322fe5439ae4fb33375679a6dc767d118363dca8
BLAKE2b-256 checksum
How to use checksums
73edbd682de8a638f9539e1bcccf1452e974f54afc4fdbfd70230468d17abc27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page