@util.positional(2)
def format_python_file(file_descriptor, output, indent_space=2):
 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, out)

@ util . positional ( 2 ) def format_python_file ( file_descriptor , output , indent_space = 2 ) : 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 , out )
format filedescriptor object as a single python module .