Hello Juan, Thanks for trying to help me out.
I installed Mercurial. I'm not exactly sure what it does. It looks like it parallels the functionality of a Linux package manager, but instead of requiring RPM files, it can manage source code from an HTTP server? Please let me know whether I have understood this correctly. Anyway, I tried installing the current Google Code version of pyglet, and my errors may actually be slightly worse than those I obtained with the 1.2alpha1 package from pyglet.org. Here's a transcript from my terminal, with commentary. john@xxx:~$ hg clone https://code.google.com/p/pyglet/ destination directory: pyglet requesting all changes adding changesets adding manifests adding file changes added 2770 changesets with 8998 changes to 2504 files (+10 heads) updating to branch default 901 files updated, 0 files merged, 0 files removed, 0 files unresolved john@xxx:~/pyglet$ sudo python3 setup.py install running install running build running build_py creating _build creating _build/lib creating _build/lib/pyglet copying pyglet/info.py -> _build/lib/pyglet ... ...etc., etc. The setup.py output was longer than my terminal buffer! I will rebuild pyglet and capture the setup.py output in a log file, if anyone thinks it is important to read it. I can report that I saw no error messages, and that the build terminated in a familiar and comforting way: byte-compiling /usr/local/lib/python3.3/dist-packages/pyglet/font/quartz.py to quartz.cpython-33.pyc running install_egg_info Removing /usr/local/lib/python3.3/dist-packages/pyglet-1.2alpha1.egg-info Writing /usr/local/lib/python3.3/dist-packages/pyglet-1.2alpha1.egg-info Using the Linux GUI, I made a copy of the pyglet/tests folder on my Desktop so that I could run it without triggering a local import of pyglet (which has tripped me up many, many times). Then I proceeded as follows: john@xxx:~$ cd $HOME/Desktop/tests john@xxx:~/Desktop/tests$ python3 test.py Test results are saved in log file: pyglet.1.log ------------------------------------------------------------------------------ Running Test: top.IMPORT (1/135) Test that all public modules are accessible after importing just 'pyglet'. This _must_ be the first test run. ------------------------------------------------------------------------------ Running Test: graphics.MULTITEXTURE (8/135) Draws a full-window quad with two texture units enabled and multi texcoords. Texture unit 0 is a checker pattern of yellow and cyan with env mode replace. Texture unit 1 is a checker pattern of cyan and yellow, with env mode modulate. The result should be flat green (with some variation in the center cross). The test will correctly detect the asbence of multitexturing, or if texture coords are not supplied for a unit, but will still pass if the texture coordinates for each unit are swapped (the tex coords are identical). ------------------------------------------------------------------------------ Running Test: window.WINDOW_OPEN (9/135) Test that a window can be opened. Expected behaviour: One small window will be opened coloured purple. Close the window or press ESC to end the test. Press return to begin test... I got that purple-colored window... but then I couldn't close it, not by clicking on the close-window button, and not by pressing ESC. I had to kill my terminal to proceed. Here's what was recorded in pyglet.1.log: INFO Beginning test at Tue Aug 6 18:38:45 2013 INFO Capabilities are: X11, GENERIC INFO sys.platform = linux INFO pyglet.version = 1.2alpha1 INFO Reading test plan from plan.txt INFO --- test (1/135) top.IMPORT INFO Begin unit tests for top.IMPORT INFO 0 tests run INFO --- test (2/135) app.EVENT_LOOP ERROR Cannot load test for app.EVENT_LOOP Traceback (most recent call last): File "test.py", line 265, in test module = self.get_module(options.test_root) File "test.py", line 243, in get_module module = __import__(name) File "../tests/app/EVENT_LOOP.py", line 24 print 'Test interval=%s, iterations=%s, sleep=%s' % (interval, ^ SyntaxError: invalid syntax INFO --- test (3/135) graphics.GRAPHICS_ALLOCATION ERROR Cannot load test for graphics.GRAPHICS_ALLOCATION Traceback (most recent call last): File "test.py", line 265, in test module = self.get_module(options.test_root) File "test.py", line 243, in get_module module = __import__(name) File "../tests/graphics/GRAPHICS_ALLOCATION.py", line 127 except allocation.AllocatorMemoryException, e: ^ SyntaxError: invalid syntax INFO --- test (4/135) graphics.IMMEDIATE ERROR Cannot load test for graphics.IMMEDIATE Traceback (most recent call last): File "test.py", line 265, in test module = self.get_module(options.test_root) File "test.py", line 243, in get_module module = __import__(name) File "../tests/graphics/IMMEDIATE.py", line 8, in <module> from graphics_common import * ImportError: No module named 'graphics_common' INFO --- test (5/135) graphics.IMMEDIATE_INDEXED ERROR Cannot load test for graphics.IMMEDIATE_INDEXED Traceback (most recent call last): File "test.py", line 265, in test module = self.get_module(options.test_root) File "test.py", line 243, in get_module module = __import__(name) File "../tests/graphics/IMMEDIATE_INDEXED.py", line 13, in <module> from graphics_common import * ImportError: No module named 'graphics_common' INFO --- test (6/135) graphics.RETAINED ERROR Cannot load test for graphics.RETAINED Traceback (most recent call last): File "test.py", line 265, in test module = self.get_module(options.test_root) File "test.py", line 243, in get_module module = __import__(name) File "../tests/graphics/RETAINED.py", line 8, in <module> from graphics_common import * ImportError: No module named 'graphics_common' INFO --- test (7/135) graphics.RETAINED_INDEXED ERROR Cannot load test for graphics.RETAINED_INDEXED Traceback (most recent call last): File "test.py", line 265, in test module = self.get_module(options.test_root) File "test.py", line 243, in get_module module = __import__(name) File "../tests/graphics/RETAINED_INDEXED.py", line 13, in <module> from graphics_common import * ImportError: No module named 'graphics_common' INFO --- test (8/135) graphics.MULTITEXTURE INFO Begin unit tests for graphics.MULTITEXTURE INFO 1 tests run INFO --- test (9/135) window.WINDOW_OPEN INFO Begin unit tests for window.WINDOW_OPEN I can see a few Python2-related syntax errors showing up in that log. So, I opened a new terminal and proceeded thus: ohn@john-GA-MA78GM-US2H:~$ cd Desktop/tests john@john-GA-MA78GM-US2H:~/Desktop/tests$ 2to3 -w *.py root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt RefactoringTool: Skipping implicit fixer: buffer root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt RefactoringTool: Skipping implicit fixer: idioms root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt RefactoringTool: Skipping implicit fixer: set_literal root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt RefactoringTool: Skipping implicit fixer: ws_comma root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt root: Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt RefactoringTool: Refactored test.py --- test.py (original) +++ test.py (refactored) @@ -214,9 +214,9 @@ def prompt(message): if PY3K: + return eval(input(message)) + else: return input(message) - else: - return raw_input(message) # So we can find tests.regression and ensure local pyglet copy is tested. @@ -285,10 +285,10 @@ else: result = StandardTestResult(self) - print('-' * 78) - print("Running Test: %s (%d/%d)\n" % (self, options.tests_count, options.num_tests)) + print(('-' * 78)) + print(("Running Test: %s (%d/%d)\n" % (self, options.tests_count, options.num_tests))) if module.__doc__: - print(' ' + module.__doc__.replace('\n','\n ')) + print((' ' + module.__doc__.replace('\n','\n '))) if module_interactive: prompt('Press return to begin test...') @@ -308,7 +308,7 @@ num_failures = len(result.failures) num_errors = len(result.errors) if num_failures or num_errors: - print('%d Failures and %d Errors detected.' % (num_failures, num_errors)) + print(('%d Failures and %d Errors detected.' % (num_failures, num_errors))) if (module_interactive and len(result.failures) == 0 and @@ -316,7 +316,7 @@ # print module.__doc__ user_result = prompt('Passed [Yn]: ') while user_result and user_result not in 'YyNn': - print("Unrecognized response '%s'" % user_result) + print(("Unrecognized response '%s'" % user_result)) user_result = prompt('Passed [Yn]: ') if user_result and user_result in 'Nn': print('Enter failure description: ') @@ -429,7 +429,7 @@ options.tests_skipped = 0 for component in components: component.test(options) - print('-' * 78) + print(('-' * 78)) return True @@ -582,7 +582,7 @@ i += 1 options.log_file = options.log_file % i - print('Test results are saved in log file:', options.log_file) + print(('Test results are saved in log file:', options.log_file)) logging.basicConfig(filename=options.log_file, level=options.log_level, format='%(levelname)s %(message)s') options.log = logging.getLogger() @@ -597,7 +597,7 @@ if not plan.run(options, args): options.log.error('Test run failed.') - print('Test results are saved in log file:', options.log_file) + print(('Test results are saved in log file:', options.log_file)) if __name__ == '__main__': main() RefactoringTool: Files that were modified: RefactoringTool: test.py And lastly, I tried to run the version of test.py that I supposedly fixed using 2to3: john@xxx:~/Desktop/tests$ python3 test.py ('Test results are saved in log file:', 'pyglet.2.log') ------------------------------------------------------------------------------ Running Test: top.IMPORT (1/135) Test that all public modules are accessible after importing just 'pyglet'. This _must_ be the first test run. ------------------------------------------------------------------------------ Running Test: graphics.MULTITEXTURE (8/135) Draws a full-window quad with two texture units enabled and multi texcoords. Texture unit 0 is a checker pattern of yellow and cyan with env mode replace. Texture unit 1 is a checker pattern of cyan and yellow, with env mode modulate. The result should be flat green (with some variation in the center cross). The test will correctly detect the asbence of multitexturing, or if texture coords are not supplied for a unit, but will still pass if the texture coordinates for each unit are swapped (the tex coords are identical). ------------------------------------------------------------------------------ Running Test: window.WINDOW_OPEN (9/135) Test that a window can be opened. Expected behaviour: One small window will be opened coloured purple. Close the window or press ESC to end the test. Press return to begin test... Traceback (most recent call last): File "test.py", line 603, in <module> main() File "test.py", line 597, in main if not plan.run(options, args): File "test.py", line 431, in run component.test(options) File "test.py", line 353, in test child.test(options) File "test.py", line 353, in test child.test(options) File "test.py", line 353, in test child.test(options) File "test.py", line 293, in test prompt('Press return to begin test...') File "test.py", line 217, in prompt return eval(input(message)) File "<string>", line 0 ^ SyntaxError: unexpected EOF while parsing Whoops. That's where it got worse than the last time. I didn't get that syntax error when I tried these kinds of things with the web site's 1.2alpha1 installation. I compared pyglet.1.log to pyglet.2.log using the Linux diff command, and found only two differences: pyglet.1.log, line 1: INFO Beginning test at Tue Aug 6 18:38:45 2013 pyglet.2.log, line 1: INFO Beginning test at Tue Aug 6 18:48:49 2013 Lines 2-73 are identical between both files. The pyglet.1.log file is one line longer than pyglet.2.log. pyglet.1.log, lines 74 and 75: INFO --- test (9/135) window.WINDOW_OPEN INFO Begin unit tests for window.WINDOW_OPEN pyglet.2.log, line 74: INFO --- test (9/135) window.WINDOW_OPEN And so, that's where I'm stuck for now. I may just try to hack away at the 1.2alpha1 package. It's clear that it works, somewhat, in my hands. I wanted the examples and tests to lead me, but I and other Python3 users may be arriving to the party a bit too early for the pyglet developers? -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/groups/opt_out.
