Rob | 1 May 22:26 2015
Picon

Pyglet 1.2.3a2

Hi all,

I created a new package with the latest fixes. Still need to test it thoroughly though.

As always it is available from PyPI:
http://pypi.python.org/pypi/pyglet/1.2.3a2

Or:
pip install pyglet==1.2.3a2

Kind regards,
Rob

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Noah A | 29 Apr 18:59 2015
Picon

Pyglet without X Windows and other questions

I'm in the early phases of trying to decide between Pyglet and PyGame. I have very little GUI programming experience. I write web applications but for my current needs web interfaces are too heavy and have too much latency.

I bought a book on PyGame and started trying to make something with it but I found the API wasn't very Pythonic (in my opinion) and felt like I might as well be using C++ for the performance gains since it was already a pain to use. But I looked at Pyglet and the API seems much better to me. I'm just unsure if it can do what I need.
  1. Can Pyglet be used to create applications which run from the console (ie direct to frame buffer) without X Windows to avoid overhead.
  2. Is Pyglet hardware accelerated on most computers?
  3. Is Pyglet hardware accelerated on the Raspberry Pi 2?
  4. Can you point me to any projects which use Pyglet so I can gauge performance?
  5. In a windowed environment can Pyglet get and set the window location so that when it launches the Window can be put back where it was last time?
I have two main kinds of applications I want to make. One is simple touch screen (non-multi touch) interfaces with big buttons and sliders for gloved fingers on industrial equipment. Standard GUI toolkits don't work well for this because they all seem to be built assuming you have a keyboard and mouse. The other is to display gauges on industrial equipment which requires several layers of overlapping transparent images. For example think about the face of a sophisticated watch with a date dial, power meter, and such. This page has examples of the kind of complex dials. http://www.luxurybazaar.com/subcategories/subid_1285_Classique_Moonphase.html




--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
claudio canepa | 27 Apr 07:26 2015
Picon

[ANN] cocos 0.6.3 released

Besides small bugfixes, this release brings

- support to load (some) .tmx maps with hexagonal tiles
- compatibility break: HexMapLayer and HexCell changed __init__ signature
- support collisions between CircleShape and AARectShape in collision_model,
thanks Daniel Gillet
- support to read .tmx (Tiled Editor) object layers and objects
- deprecated do_not_scale and do_not_scale_window, use autoscale

Full Changelog at https://raw.githubusercontent.com/los-cocos/cocos/master/CHANGELOG

available from pypi https://pypi.python.org/pypi/cocos2d/0.6.3
or github https://github.com/los-cocos/cocos


What is cocos2d:
A framework for building 2D games, demos, and other graphical/interactive applications.
Draws using OpenGL, which is hardware accelerated.
Targets the Operating Systems linux, mac or windows on Pc-like hardware.
Provides some conventions and classes to help you structure a "scene based application".
A cocos2d application consists of several scenes, and a workflow connecting the different scenes.
It provides you with a "director" (a singleton) which handles that workflow between scenes.
Each scene is composed of an arbitrary number of layers; layers take care of drawing to the screen (using the pyglet and OpenGL APIs), handling events and in general contain all of the game/application logic.

cocos2d simplifies the game development in these areas:

* Flow control: Manage the flow control between different scenes in an easy way
* Sprites: Fast and easy sprites
* Actions: Just tell sprites what you want them to do. Composable actions like move, rotate, scale and much more
* Effects: Effects like waves, twirl, lens and much more
* Tiled Maps: Support for rectangular and hexagonal tiled maps
* Collision: Basic pure python support for collisions
* Transitions: Move from scene to scene with style
* Menus: Built in classes to create menus
* Text Rendering: Label and HTMLLabel with action support
* Built-in Python Interpreter: For debugging purposes
* Access to OpenGL functionality
* and much more! http://python.cocos2d.org

enjoy !

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Florian Höch | 26 Apr 15:32 2015

Current development version of pyglet steals menus when used with wxPython under Mac OS X

Hi,

I'm using pyglet devel (122cf30) together with wxPython (3.0.2 cocoa) in an application. This works well, except that under Mac OS X (Yosemite), after application startup pyglet replaces my menus with just an app menu with "Quit!" and "Hide!" entries. The way I've worked around it for now is by overriding the platform event loop with a dummy one in pyglet.app.__init__ (I only use pyglet to play sound), but a better solution is probably needed.

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
pyglet_has_bugs | 24 Apr 18:51 2015
Picon

Why is the constructor of pyglet.text.Label eating up so much time? (~13ms per call)

Here's how I call it:

label = pyglet.text.Label(text,
                          font_name='Georgia',
                          font_size=8,
                          x=x, y=y,
                          anchor_x='center', anchor_y='center',
                          batch=text_batch)

text_batch is an object that has been made by the following call:

text_batch = pyglet.graphics.Batch()

It takes an average of 13 milliseconds to execute that line. Each label contains only about 10 characters (the longest one is 22 characters long). The equivalent in Pygame is much, much faster, so I'm wondering if maybe I'm doing something wrong/something is wrong with the configuration on my machine.

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
John Bent | 22 Apr 23:08 2015
Picon

Pyglet stops playing sounds after being called multiple times

I have a large number of small mp3 files that I need to check individually. In a python foreach file loop, I'm calling this function which uses pyglet:

def play(player,src):
 
try:
   
#music = pyglet.resource.media(src)
    music
= pyglet.media.load(src, streaming=False)
    music
.play()
    ans
= raw_input("\tWas this sound good (r to replay, q to quit)? [y|n|r|q]: ")
   
if (ans == 'r'):
     
return play(player,src)
   
if (ans == 'q'):
      sys
.exit(0)
   
else:
      success
= (ans == 'y')
 
except pyglet.media.avbin.AVbinException, e:
   
print "Exception playing file. Assuming bad."
    success
= 0  
 
print "%s -> %d" % ( src, success )
 
return success

It works great for about 10 files but then it just stops working without any error indication that I'm noticing. It acts like it is playing the sounds but there is just silence. Is there some resource I should be unloading or deallocating or something? I'm on OS X and initially had to install AVBin to get pyglet to work at all.

Thanks!

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
pyglet_has_bugs | 21 Apr 17:57 2015
Picon

Doing graphics without window.clear()

Redrawing every image in my application in every call of on_draw takes too much time, so I updated my code to work the following way:

Every time an image is modified, it is added to a queue. Every time on_draw is called, it iterates through the queue and draws each image. When the application loads, every image is added to the queue. window.clear() is never called.

For some reason, the application keeps oscillating as I use it. After one update to one image, half of the displayed images vanish. After one more update to an image, all of the vanished images reappear, and the other half of them vanish. After one more update, all of the displayed images vanish, and the other half reappear again. I put print statements in the method that draws images, and it is only drawing one image every time I update an image. This implies to me that there are perhaps multiple graphics windows being drawn to.

Any suggestions for where to look to fix this problem?

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
magurp244 | 12 Apr 03:03 2015
Picon

Pyglet 1.2.x Multitexturing Support

I was just wondering what the state was with this?

I've been really looking forward to the multitexturing functions of pyglet 1.2, though it seems like their not fully implemented.
It seems to render find statically, though it seems like VertexDomain.py isn't configured to handle the multi_tex_coord lists. After a little tweaking I managed to
dynamically change textures, but it scrambles the FPScounter display, along with any blitted images afterwards.

I don't really know enough about Opengl or the inner workings of Pyglet myself to easily track down the issue, which either has to do with how i'm rendering the multitex-coords
or to do with the rendering pipeline in pyglet itself.

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Rob | 7 Apr 08:40 2015
Picon

Documentation on pyglet.org

Hi all,

Currently the documentation page on pyglet.org (http://pyglet.org/documentation.html) is outdated. The latest documentation is available on readthedocs:

1.2 (stable): https://pyglet.readthedocs.org/en/pyglet-1.2-maintenance/
1.3 (dev): https://pyglet.readthedocs.org/en/latest/

<at> Richard: Could you update the documentation page? Maybe also replace the /doc from the server with a redirect?

Rob

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Russell Valentine | 31 Mar 02:36 2015
Picon

How to delete source?

Been liking pyglet so far. Nice job! I did run into a problem I have not figure out.

I fetch a file on the internet and store it as a temporary file. When I'm doing playing it I want to delete it. I do something like the following, where self._player is a pyglet.media.Player. self._source is a streaming store created from the temporary file. self._tmp_fn is the temporary filename.

    def close(self, args=None):
        if self._player:
            self._player.delete()
            self._player = None
            self._source = None
            gc.collect()
        if self._tmp_fn:
            os.unlink(self._tmp_fn)
            self._tmp_fn = None


Seems okay but on windows when I try to delete self._tmp_fn I get:

WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\path_to_tempfile\\tempfile'

How do I make sure pyglet isn't using the file any more so I can delete it?
 
Thank you.

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
Brandon Keith Biggs | 30 Mar 19:40 2015
Picon

Re: I found a serious bug in Pyglet 1.2.2 for Python 2.7, on Windows.

Hello,
Is this in the documentation? I don't see it.
Also, pyglet.Player().position does not work.
Is there another function for this?
Thank you,

On 3/30/2015 6:44 PM, Rob wrote:
Hi,

pyglet.media.listener is deprecated. You should use pyglet.media.get_audio_driver().get_listener()

Do you still get the same error when using that? The call to get_audio_driver() will make sure the driver is initialized.

Rob

Op maandag 30 maart 2015 14:06:03 UTC+2 schreef Brandon Keith Biggs:
Hello,
pyglet.media.listener.position
raises an error saying that this feature is not created yet.
Is there another way of panning sound?
thanks,

On 3/30/2015 10:15 AM, Rob van der Most wrote:

I did not merge any fixes for panning, so I guess not. Is there an issue for it?

Rob

On 30 Mar 2015 09:50, "Brandon Keith Biggs" <brandonk... <at> gmail.com> wrote:
Hello,
Does this version fix panning?
I don't see any panning tests in the tests folder.
Thank you,

On 3/30/2015 4:09 AM, Justin Northrop wrote:
It works now, thanks for the quick response. :D

On Sun, Mar 29, 2015 at 9:42 AM, Rob <silves... <at> gmail.com> wrote:
Could you try the 1.2.3a1 version?

Install with pip:
$ pip install pyglet==1.2.3a1

Or download here:

Rob

Op dinsdag 24 maart 2015 17:03:51 UTC+1 schreef pyglet_has_bugs:
What I was pointing out is that the breakpoint cannot cause the window focus to change if it is never hit. However, the breakpoint had been hit previously, and I assume that this prior change in focus caused a change that prevented to bug. Thanks again for helping fix it.

On Tue, Mar 24, 2015 at 12:33 AM, Leif Theden <leif.... <at> gmail.com> wrote:
As I noted before, the breakpoint causes window focus to change and due to some circumstance of the window losing focus, the odd behavior seems to be avoided.  The cause of the ALT key bug is related to windows and pyglet not correctly handling the ALT key (which will open a window menu bar in some situations): when the alt key is pressed, windows sends a special event to pyglet.  The event is handled but the return value back to windows was never correct (source of the bug).  The default behavior in this case is to display a window menu bar, which windows attempts to do, but it is not implemented in pyglet and this condition puts the window and pyglet's event queue into an undefined state, and causes some events to be dropped. In this case there events are key presses/releases.  Nothing cosmic about it.  Please see the link I previously posted for more information.


On Sunday, March 22, 2015 at 12:45:49 PM UTC-5, pyglet_has_bugs wrote:
Thank you very much for your thorough reply. Your guess about the breakpoints doesn't make sense to me, because the order of causality does not flow in that order. When my program is in a state in which pressing A will not trigger a key press event (because I've just pressed and released ALT), and I press A, then no key pressed event fires--unless there is a break point in on_key_press. So you see, the breakpoint can only be hit if the code has already performed correctly in the place that it normally fails. This indicates to me that something horrible is going on. I am amazed.

On Sun, Mar 22, 2015 at 1:52 AM, Leif Theden <leif.... <at> gmail.com> wrote:
I fixed it a while ago, but the fix was never merged.  Tonight I applied an old patch I made and made a pull request.  It may be a few days until this is fixed in bitbucket. In the mean time, don't assign anything to the ALT key.  This bug has been known for a long time, but only affects windows users, and is related to the ALT key, which not many people use anyway.

I can't say how the breakpoints affects it for certain, but my guess is that the breakpoints are causing the pyglet window to lose focus, which interferes with key events in windows, and those side effects don't cause the behavior that was causing erratic input after pressing ALT.  A debugger should never cause functions to work differently.  In this case it is more related to the windows window manager more than anything.


On Saturday, March 21, 2015 at 8:54:06 PM UTC-7, pyglet_has_bugs wrote:
Wow, so this has been known for a while, and you just finally fixed it? Just for me? :o :D

On Saturday, March 21, 2015 at 8:31:02 PM UTC-4, Leif Theden wrote:
Please, your nick 'pyglet_has_bugs' is a bit excessive; 99.999% software projects have bugs.  In any case, thank you for the detailed bug report.  In the future please submit bug reports to https://bitbucket.org/pyglet/pyglet/issues.  Finally, I've fixed the problem on my branch and submitted a pull request.

In case anyone is interested, the issue is documented here: https://code.google.com/p/pyglet/issues/detail?id=462&q=leif&colspec=ID%20Stars%20Type%20Status%20OpSys%20Modified%20Summary


On Saturday, March 21, 2015 at 5:19:02 PM UTC-5, pyglet_has_bugs wrote:
Someone on reddit.com/r/learnpython says they couldn't reproduce the bug with Pyglet 1.2.2 and Python 3 on Linux.

http://redd.it/2zqtyf
--
You received this message because you are subscribed to a topic in the Google Groups "pyglet-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyglet-users/DuHs6HxXSm0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyglet-users... <at> googlegroups.com.
To post to this group, send email to pyglet... <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "pyglet-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyglet-users/DuHs6HxXSm0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyglet-users... <at> googlegroups.com.
To post to this group, send email to pyglet... <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "pyglet-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyglet-users/DuHs6HxXSm0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyglet-users... <at> googlegroups.com.
To post to this group, send email to pyglet... <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

--
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 pyglet-users... <at> googlegroups.com.
To post to this group, send email to pyglet... <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

--
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 pyglet-users... <at> googlegroups.com.
To post to this group, send email to pyglet... <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.
--
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 pyglet-users... <at> googlegroups.com.
To post to this group, send email to pyglet... <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

--
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 pyglet-users+unsubscribe <at> googlegroups.com.
To post to this group, send email to pyglet-users <at> googlegroups.com.
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.


Gmane