def _get_picture(self, path): # /initstrokes/<id>の形式で入ってくる splitPath = path.split('/') helper = PictureHelper() if len(splitPath) < 3: # IDがない場合、指定された履歴の情報を取得する return helper.get_picture() else: # 指定された履歴の情報を取得する return helper.get_picture_by_id(splitPath[2])