Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51519
| References | <cc9a7c29-5851-48ea-b2e1-22c5192071cf@googlegroups.com> |
|---|---|
| From | Joshua Landau <joshua@landau.ws> |
| Date | 2013-07-30 00:14 +0100 |
| Subject | Re: Pyglet on Python3.x, problems |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5284.1375139697.3114.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
On 29 July 2013 23:04, John Ladasky <john_ladasky@sbcglobal.net> wrote: > For whatever reason, the pyglet package is getting a lot of attention on > c.l.python these past few days. I am guilty of generating some of that > potentially off-topic conversation myself. At the end of my last thread, I > reported that I had found the pyglet-users newsgroup, and would direct my > questions there. > > https://groups.google.com/d/msg/comp.lang.python/ARtI0GC9RHc/_6URRrhz7nUJ I suggest you redirect to the archives from http://mail.python.org/pipermail/python-list/. > Well, I joined pyglet-users. I have waited for about 36 hours for the > moderator to approve my first post asking for help. Several other posts > have appeared, but not mine. I don't think that I was impolite. > > Apologies to everyone, but I'm going to ask my questions here. As you may > recall, I'm teaching some adolescent computer programming students. I need > a Python 3-compatible GUI, preferably one oriented towards games. I might > have that GUI in hand, but I need to test it myself first. I've been > researching this issue for over a week. I have a student tomorrow, so I'm > facing a bit of a deadline. (Yeah, I could teach him about B-trees > instead, but... you know, kids.) > > In my own defense, I'm not entirely certain that the problems I have > encountered are specific to pyglet. They might have to do with the > limitations of the 2to3 program. > > I'm starting with my own Ubuntu 13.04 system. I downloaded > pyglet-1.2alpha1, unzipped it and executed "sudo python3 setup.py install", > as I have done with many a package. Then I tried running various programs > in two directories (these programs are also on the pyglet.org web site). > > pyglet-1.2alpha1/examples/programming_guide/hello_world.py runs fine. > > pyglet-1.2alpha1/examples/programming_guide/image_viewer.py also runs fine. > > pyglet-1.2alpha1/examples/programming_guide/animation.py produces an > error. Here's the traceback. > ... > From earlier discussions, I know that distutils automatically executes > 2to3 on the pyglet core module, when you invoke pyglet's setup.py file from > Python 3. The setup script does not appear to run 2to3 on the code outside > of the package itself. And while I doubted that the KeyError I saw above > was a Python 2/3 compatibility issue, I tried running 2to3 on animation.py > anyway. 2to3 seems to agree with me, reporting back "RefactoringTool: No > files need to be modified." > > Finally, I got errors when trying to run pyglet-1.2alpha1/tests/test.py. > At first, it looked like the fix would be easy: > ... > Clearly this was a problem for 2to3, so I ran it on test.py. It corrected > that one print statement, and nothing else. Then I ran test.py again. > This time I got a deeper problem: > ... > This error suggests that, during the build and install process, 2to3 left > some code uncorrected in pyglet/__init__.py. This has me worried. Could > there be other code that 2to3 failed to correct? I don't want to offer my > students a tool, only to have it crash on them. > > So, there you have it, the two errors that I am encountering. If anyone > has any advice, I would appreciate it. Thanks! > Seems relevant: https://code.google.com/p/pyglet/issues/detail?id=615&colspec=ID%20Stars%20StatusType%20OpSys%20Modified%20Summary If https://code.google.com/p/pyglet/issues/detail?id=630&colspec=ID%20Stars%20StatusType%20OpSys%20Modified%20Summary is your problem then, for me: >>> import pyglet >>> pyglet.window <pyglet._ModuleProxy object at 0x7ffab02cf690> >>> pyglet.window.Window() <pyglet.window.xlib.XlibWindow object at 0x7ffab02c7b50> Window pops up. It works! Sorry. What happens when you help(pyglet) and help(pyglet.window) and help(pyglet.window.Window)?
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Pyglet on Python3.x, problems John Ladasky <john_ladasky@sbcglobal.net> - 2013-07-29 15:04 -0700
Re: Pyglet on Python3.x, problems Joshua Landau <joshua@landau.ws> - 2013-07-30 00:14 +0100
Re: Pyglet on Python3.x, problems John Ladasky <john_ladasky@sbcglobal.net> - 2013-07-29 17:34 -0700
Re: Pyglet on Python3.x, problems Ian Kelly <ian.g.kelly@gmail.com> - 2013-07-29 17:44 -0600
Re: Pyglet on Python3.x, problems John Ladasky <john_ladasky@sbcglobal.net> - 2013-07-29 17:47 -0700
Re: Pyglet on Python3.x, problems Chris Angelico <rosuav@gmail.com> - 2013-07-30 02:38 +0100
csiph-web