IronPython Extra Libs 1.2

Extra Files

  1. DreTaX
    Fougerite Compatibility:
    All Versions
    This library is included in Fougerite 1.0.8+

    This is not a plugin!

    Server owners scroll down.

    If you are a Plugin Developer, and using PyCharm (And you installed IronPython) you already have the full library installed. You can work with those, but be warned. Some of the (folder) libraries cannot be imported. The only folder that I found working now is the encoding folder, since that uses the codecs.py file for import.

    All the other single files can be imported.

    To import a lib you have to do the following:

    Code (Python):

    import clr
    clr.AddReferenceByPartialName("Fougerite")
    import Fougerite
    import sys
    path = Util.GetRootFolder()
    sys.path.append(path + "\\Save\\Lib\\")
    import random #import nameoflib
    To make this Lib to be optional:
    Code (Python):
    Lib = True
    try:
        import random
    except ImportError:
        Lib = False # If the plugin couldn't import random It means the lib doesn't exist in the folder.

    Json Example for Developers:


    Code (Python):
    import sys
    import json

    obj = {"name":"balu","coords":{'x':1.1,'y':2.2,'z':3.3}}

    jsonString = json.encode(obj)
    pretty = json.makepretty(jsonString)

    fromjson = json.decode(jsonString)
    fromprettyjson = json.decode(pretty)

    Server.Broadcast(fromjson["name"] + " @ " + str(fromprettyjson["coords"]))

    If you are a Server Owner:

    If a Plugin Requires this library, the only thing you have to do is to place all the py files, with the encoding folder to:

    Server/Save/Lib (Where you can find the Magma, JsPlugins and PyPlugins folder. Just create a new folder called Lib and paste all the files inside.)

    That's all.

Recent Updates

  1. Additions
  2. Update