Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
EcmaXp

[Experimental] micropython on OpenComputers

Recommended Posts

This mod provide the way to use python on OpenComputers.

(When i finish the work by next 2016 year, it will running as server mods so client are don't need this mods)

 

= Source Code =

- https://github.com/EcmaXp/micropython (MIT License)

- https://github.com/EcmaXp/mpoc (Public Domain!)

 

= Notes =

- Build this mod are very hard.

  (Easy way is must require linux machine for build micropython library)

- Currently multi state with micropython are working but can be crash minecraft! (VERY UNSTABLE)

  (i don't know why that is crash; sometimes bad free thing happen)

- Do not repeat computer turn on/off or press key (or click, scroll, etc) rapidly

- Only one instance of python are allowed.

  (designed for multi instance but it have bug)

- There is no persist.

  (zero code for persist the thing...)

  (can't resume computer after restart server)

- CPU/Memory limit are included but not sandboxed.

- Require many module for fully function like Lua.

 

= How to build? =

1. get micropython

$ git clone https://github.com/EcmaXp/micropython.git

 

2. build micropython library

in linux

$ make -C opencom

-> copy libmicropython.so + jnupy.jar

 

in windows

- windows port are unstable

- (if you have VS2015 then just open micropython.vcxproj and compile)

-> copy libmicropython.dll (still you require build jnupy.jar; check micropython/java folder)
 

4. get mpoc

$ git clone https://github.com/EcmaXp/mpoc.git

paste the library and jar file.
and setup gradlew.build for include jnupy.jar content to jar file.
 
5. modify source code.
dll and script path are hard-codeded
must modify for new path
 (or using dynamic path like OpenComputers;
  it does exteract library from jar, and direct read script from jar)
 
$ ./gradlew
$ ./gradlew jar

 

6. now you get unstable mpoc-1.0.jar 

7. get nbtedit mod for edit nbt for CPU

8. run minecraft and start game

9. modify CPU nbt by type /nbtedit

oc:archClass kr.pe.ecmaxp.mpoc.MicroPythonArch

oc:archName MicroPython

10. make a computer and run

11. Now you can see hello world! (with no library)

 

I can't develop this mod. so there is no download. sorry :(

Someone may happy with this mod.

post-1986-0-33243200-1435928639_thumb.png

post-1986-0-36230500-1435928640_thumb.png

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.