Skip to content

bedrock-ws/bedrockpyrepl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bedrockpyrepl

Execute Python within Minecraft

bedrockpyrepl is a Python REPL that can be used within Minecraft.

Warning: Use at your own risk

The code entered in the chat is executed on the system running the server, so be cautious about what you enter.

Features

  • Use _ to access the value evaluated by the last expression.
  • SystemExit stops the program, other errors are displayed in the chat.

Quickstart

  1. Install bedrockpyrepl and its dependencies

    pip install -U git+https://github.com/bedrock-ws/bedrockpyrepl.git
  2. Set up bedrockpy.

  3. Run the server.

    python -m bedrockpyrepl

Known Issues

  • Variables are dropped immediately.

    <PlayerName> a = 5
    <PlayerName> a + 1
      File "chat", line 1, in <module>
    NameError: name 'a' is not defined
    
  • print cannot be used correctly

  • use __run__ function sync

Following features are intended to be unsupported:

  • Multiline code such as:

    >>> for i in range(5):
    ...     print(i)
    ...
    0
    1
    2
    3
    4
    5
NOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG.

About

Execute Python inside Minecraft

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages