summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2015-08-28 21:30:08 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2015-08-28 21:30:08 -0700
commitdb0c2f5b8af01342d334e493a0ac964155877219 (patch)
tree23e41bd5710930811b42c26c7f2f3b7e2b5d0560 /misc
parente96812143b9d692ee8986458cda1debab4ba2123 (diff)
glsl_scraper: Use python3
Diffstat (limited to 'misc')
-rw-r--r--misc/glsl_scraper.py16
1 files changed, 8 insertions, 8 deletions
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)