def warm_up(): logging.debug("Warming up QuickTime") rsrcPath = bundle.getBundleResourcePath() attributes = NSMutableDictionary.dictionary() attributes["QTMovieFileNameAttribute"] = os.path.join(rsrcPath, "warmup.mov") attributes["QTMovieOpenAsyncRequiredAttribute"] = True attributes["QTMovieDelegateAttribute"] = None global warmup_movie warmup_movie, error = QTMovie.movieWithAttributes_error_(attributes, None) if error is not None: logging.warn("QuickTime Warm Up failed: %s" % error) else: warmup_handler.handleInitialLoadStateForMovie_(warmup_movie)
def warm_up(): logging.debug('Warming up QuickTime') rsrcPath = bundle.getBundleResourcePath() attributes = NSMutableDictionary.dictionary() attributes['QTMovieFileNameAttribute'] = os.path.join( rsrcPath, 'warmup.mov') attributes['QTMovieOpenAsyncRequiredAttribute'] = True attributes['QTMovieDelegateAttribute'] = None global warmup_movie warmup_movie, error = QTMovie.movieWithAttributes_error_(attributes, None) if error is not None: logging.warn("QuickTime Warm Up failed: %s" % error) else: warmup_handler.handleInitialLoadStateForMovie_(warmup_movie)
def extension_core_roots(): syspath = os.path.join(bundle.getBundleResourcePath(), u'extensions') syspath = syspath.encode('utf-8') return [syspath]
def root(): # XXX sigh. # Unicode kludge. This wouldn't be a problem once we switch to Python 3. path = os.path.join(bundle.getBundleResourcePath(), u'resources') return path.encode('utf-8')