bl_info = {
    "name": "Move X Axis",
    "category": "Object",
}

import bpy
import sys
from rna2xml import seek

class ObjectMoveX(bpy.types.Operator):
    """My Object Moving Script"""      # blender will use this as a tooltip for menu items and buttons.
    bl_idname = "object.move_x"        # unique identifier for buttons and menu items to reference.
    bl_label = "Move X by One"         # display name in the interface.
    bl_options = {'REGISTER', 'UNDO'}  # enable undo for the operator.

    def execute(self, context):        # execute() is called by blender when running the operator.
        print('<root>')
        sys.stdout.flush()
        seek(bpy, '\t')
        print('</root>')

        sys.stdout.flush()
        # The original script
        scene = context.scene
        for obj in scene.objects:
            obj.location.x += 1.0

        return {'FINISHED'}            # this lets blender know the operator finished successfully.

# def register():
    


# def unregister():
#     bpy.utils.unregister_class(ObjectMoveX)


# # This allows you to run the script directly from blenders text editor
# # to test the addon without having to install it.
# if __name__ == "__main__":
#     print('main')
#     register()

bpy.utils.register_class(ObjectMoveX)