Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(0)  |  Derive(0)  |  Import(3)

src/m/t/mt-serverland-HEAD/serverland/dashboard/views.py   mt-serverland(Download)
from serverland.dashboard.models import TranslationRequest, WorkerServer
from serverland.dashboard.forms import TranslationRequestForm
from serverland.settings import LOG_LEVEL, LOG_HANDLER, DEPLOYMENT_PREFIX, \
  TRANSLATION_MESSAGE_PATH, COMMIT_TAG
from serverland.protobuf.TranslationRequestMessage_pb2 import \
                message.source_text += unicode(chunk, 'utf-8')
 
            handle = open('{0}/{1}.message'.format(TRANSLATION_MESSAGE_PATH,
              new.request_id), 'w+b')
            # pylint: disable-msg=E1101

src/m/t/mt-serverland-HEAD/serverland/dashboard/models.py   mt-serverland(Download)
from google.protobuf.message import DecodeError
from os import remove
from serverland.settings import LOG_LEVEL, LOG_HANDLER, \
  TRANSLATION_MESSAGE_PATH
from serverland.protobuf.TranslationRequestMessage_pb2 import \
                serialized = self.worker.fetch_translation(self.request_id)
                handle = open('{0}/{1}.message'.format(
                  TRANSLATION_MESSAGE_PATH, self.request_id), 'w+b')
                handle.write(serialized)
                handle.close()
    def is_corrupted(self):
        """Checks whether the translation request message file is OK."""
        try:
            # Read in serialized message from file.
            handle = open('{0}/{1}.message'.format(TRANSLATION_MESSAGE_PATH,
    def start_translation(self):
        """Sends the serialized translation request to the worker server."""
        handle = open('{0}/{1}.message'.format(TRANSLATION_MESSAGE_PATH,
          self.request_id), 'rb')
        message = handle.read()
 
        try:
            handle = open('{0}/{1}.message'.format(TRANSLATION_MESSAGE_PATH,
              self.request_id), 'rb')
            serialized = handle.read()

src/m/t/mt-serverland-HEAD/serverland/dashboard/api/handlers.py   mt-serverland(Download)
from serverland.protobuf.TranslationRequestMessage_pb2 import \
     TranslationRequestMessage
from serverland.settings import TRANSLATION_MESSAGE_PATH
import uuid
 
            message.source_text += unicode(chunk, 'utf-8')
 
        handle = open('{0}/{1}.message'.format(TRANSLATION_MESSAGE_PATH,
                                               new.request_id), 'w+b')
        # pylint: disable-msg=E1101