From db0c2f5b8af01342d334e493a0ac964155877219 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 28 Aug 2015 21:30:08 -0700 Subject: glsl_scraper: Use python3 --- misc/glsl_scraper.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'misc') diff --git a/misc/glsl_scraper.py b/misc/glsl_scraper.py index ece63dc..4e032cd 100644 --- a/misc/glsl_scraper.py +++ b/misc/glsl_scraper.py @@ -1,7 +1,7 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 import argparse -import cStringIO +import io import os import re import shutil @@ -13,7 +13,7 @@ from textwrap import dedent class Shader: def __init__(self, stage): - self.stream = cStringIO.StringIO() + self.stream = io.StringIO() self.stage = stage if self.stage == 'VERTEX': @@ -190,18 +190,18 @@ class Parser: self.current_shader.add_text(t) def handle_macro(self, macro): - t = self.token_iter.next() + t = next(self.token_iter) assert t == '(' if macro == 'qoCreateShaderGLSL': # Throw away the device parameter - t = self.token_iter.next() - t = self.token_iter.next() + t = next(self.token_iter) + t = next(self.token_iter) assert t == ',' - stage = self.token_iter.next().strip() + stage = next(self.token_iter).strip() - t = self.token_iter.next() + t = next(self.token_iter) assert t == ',' self.current_shader = Shader(stage) -- cgit v1.2.3