

@util.positional(2)
def format_python_file(file_descriptor, output, indent_space=2):
    "Format FileDescriptor object as a single Python module.\n\n  Services generated by this function will raise NotImplementedError.\n\n  All Python classes generated by this function use delayed binding for all\n  message fields, enum fields and method parameter types.  For example a\n  service method might be generated like so:\n\n    class MyService(remote.Service):\n\n      @remote.method('my_package.MyRequestType', 'my_package.MyResponseType')\n      def my_method(self, request):\n        raise NotImplementedError('Method my_method is not implemented')\n\n  Args:\n    file_descriptor: FileDescriptor instance to format as python module.\n    output: File-like object to write module source code to.\n    indent_space: Number of spaces for each level of Python indentation.\n  "
    out = generate.IndentWriter(output, indent_space=indent_space)
    (out << 'from protorpc import message_types')
    (out << 'from protorpc import messages')
    if file_descriptor.service_types:
        (out << 'from protorpc import remote')
    if file_descriptor.package:
        (out << ("package = '%s'" % file_descriptor.package))
    _write_enums(file_descriptor.enum_types, out)
    _write_messages(file_descriptor.message_types, out)
    _write_services(file_descriptor.service_types, output)

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/generate_python.py format_python_file/VarMisuse@109/449 `out`->`output`