def _get_mencoder_directory(): platform = platform_helper.get_platform() if platform == platform_helper.Platforms.mac: platform_specific_mplayer_directory = 'Mac' elif platform == platform_helper.Platforms.windows: platform_specific_mplayer_directory = 'Windows' else: raise ValueError("Unknown platform.") return os.path.join(_get_mplayer_directory(), platform_specific_mplayer_directory)
def get_image_file_names(self, files): """The file picker returns different types on different platforms. This handles each one. """ platform = platform_helper.get_platform() if platform == platform_helper.Platforms.windows: # Windows returns a single string for the file list. return self.window.tk.splitlist(files) else: # Mac returns a tuple of files. # Also use this in the default case. return files
def _get_mencoder_file(): platform = platform_helper.get_platform() if platform == platform_helper.Platforms.windows: return "mencoder.exe" else: return "mencoder"