Skip to main content

BlackPy

BlackPy는 배경과 캐릭터마다 작성한 Python 코드를 로컬 웹 무대에서 실행하는 교육용 프로그램이다. 학생은 VS Code에서 일반 def와 한글 명령으로 코드를 작성하고, 웹의 명령 목록을 클릭해 필요한 코드를 복사한다. class, self, async, await나 BlackPy용 import를 직접 작성할 필요가 없다.

설치와 실행

Windows x64와 Python 3.10 이상, 웹 브라우저가 필요하다. 패키지에는 .NET·ASP.NET Core 런타임이 포함되어 있으며 BlackPy 외의 Python 실행 의존성은 없다.

python -m pip install blackpy
blackpy new 내프로젝트
blackpy run 내프로젝트

new는 없거나 비어 있는 폴더에 새 프로젝트를 만든다. 기존 학생 파일은 덮어쓰지 않는다. blackpy 명령을 찾지 못하면 python -m blackpy new 내프로젝트와 python -m blackpy run 내프로젝트를 사용한다.

내프로젝트/
├─ project.json
├─ 배경.py
├─ 고양이.py
├─ 자동차.py
└─ __builtins__.pyi

공통 실행부는 설치한 Python 환경에 들어가며 학생 파일은 프로젝트 폴더에 남는다. run은 웹 브라우저를 열고 실행부의 별도 콘솔 창은 만들지 않는다. 명령을 입력한 터미널은 실행부가 끝날 때까지 기다린다. BlackPy의 마지막 브라우저 탭이나 창을 닫으면 약 3초 뒤 실행부도 종료된다.

첫 코드

VS Code에서 내프로젝트 폴더를 열고 고양이.py를 다음과 같이 작성한다. 웹의 시작 버튼을 누른 뒤 무대를 클릭하고 오른쪽 방향키를 누른다.

def 시작():
    말하기("오른쪽 방향키를 누르고 있어 보세요!")


def 키_클릭_중(누른_키):
    if 누른_키 == "오른쪽":
        방향 = 0
        앞으로(120)

고양이는 오른쪽 키를 누르는 동안 초당 120만큼 움직인다. 일반 이벤트에서 앞으로(120)은 총 120만큼 이동하는 명령이고, ~중 이벤트에서는 초당 이동량을 뜻한다. 속도 배율의 기본값은 1이다.

코드 변경은 웹에서 다시 시작할 때 반영된다. 한글 명령과 이벤트는 BlackPy 실행기가 연결하므로 편집기의 일반 Python 실행 버튼 대신 웹의 시작·중지·다시 시작을 사용한다.

VS Code 명령 안내

VS Code의 Python·Pylance 확장을 사용하고 project.json이 있는 개별 프로젝트 폴더를 열면 __builtins__.pyi가 말하기 등의 명령과 인자를 알린다. 정의되지 않은 이름의 진단을 끄지 않으므로 명령 이름의 오타도 확인할 수 있다. 기존 프로젝트에는 다음 명령으로 안내 파일을 추가한다.

blackpy editor 내프로젝트

학생 코드와 편집기 설정은 보존한다. 내용이 다른 안내 파일이 이미 있으면 덮어쓰지 않는다. 편집기 안내는 BlackPy의 코드 변환 전체를 검사하는 기능은 아니며, 함수 안의 크기 += 0.1 같은 상태 증감에는 일반 Python 분석기의 경고가 남을 수 있다. 크기 변경은 크기_바꾸기(0.1) 명령으로도 작성할 수 있다.

제공 범위와 라이선스

캐릭터별 움직임·말하기·크기·가시성, 키·클릭·접촉 이벤트와 방송을 제공한다. 접촉은 회전을 반영하지 않는 사각 범위 비교이며 물리 시뮬레이션과 소리는 제공하지 않는다. 학생 Python은 일반 사용자 권한으로 실행되며 보안 샌드박스로 격리되지 않는다.

MIT 라이선스이다. 라이선스와 제3자 고지는 설치 패키지에 포함되어 있다.

Metadata

Release files for blackpy 0.1.0

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

Built distribution (wheel)

Table of built distributions (wheels) for blackpy 0.1.0
File Interpreter ABI Platform Actions
blackpy-0.1.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for blackpy-0.1.0-py3-none-win_amd64.whl

Release files / blackpy-0.1.0-py3-none-win_amd64.whl

Download URL blackpy-0.1.0-py3-none-win_amd64.whl
Size 48.8 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
e18301bd3770a93b7b42f60ac4dbf2e4ea2685eacd0cbf033f4c754a8d826d5b
BLAKE2b-256 checksum
How to use checksums
b80f797dacaaf63caafca24fd91e52a9acd3533d1ece943c19ec468dfeec89d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for blackpy 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for blackpy-0.1.0-py3-none-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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