Alguien Habla español

2018-05-18 Thread Pool Seminario Leon
Hola y perdon por no escribir en Ingles (la verdad es que no se Ingles ) , 
pero quisiera saber si hay alguien en el grupo que sepa algo de español , 
me encantaría aprender de el pyglet

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


Re: headless rendering

2018-05-18 Thread Bleyddyn apRhys
I should be able to write an OpenGL Hello World type app in Cocoa and try 
it out.

I'm also planning on trying to rewrite the script to use python threading 
instead of MPI. Maybe if the main executable is launched with access to 
Quartz it will pass that on to all its threads.


On Friday, May 18, 2018 at 6:38:17 AM UTC-7, Benjamin Moran wrote:
>
> I wouldn't be surprised if this is a "security feature" of OSX.
> Unfortunately I don't have any suggestions for you. I'm curious if it's 
> possible to open other OpenGL applications with a locked screen, or just 
> pyglet. If opening other applications is possible, maybe it's something we 
> can improve in pyglet.
>
>
> On Friday, May 18, 2018 at 2:39:32 AM UTC+9, Bleyddyn apRhys wrote:
>>
>> I realize this is really old, but I recently ran into a very similar 
>> problem and was wondering if you or anyone has found a solution for Mac OS 
>> X?
>>
>> Specifically, I 'm trying to run 
>> https://github.com/AppliedDataSciencePartners/WorldModels/blob/master/05_train_controller.py
>>  
>> 
>>  
>> on my iMac. It's not headless, but as soon as my screensaver kicks in I get 
>> the same error...
>>
>>screen = display.get_default_screen()
>>  File 
>> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyglet/canvas/base.py",
>>  
>> line 73, in get_default_screen
>>return self.get_screens()[0]
>> IndexError: list index out of range
>>
>> Accessing the Quartz window system in any non-standard way has always 
>> been a problem for OS X, but I had hoped maybe there was a solution by now.
>>
>> My current work-around is to disable my screensaver, but that also means 
>> my computer isn't locked. Not something I care to do, especially given that 
>> script could be running for days at a time.
>>
>>
>> On Saturday, October 3, 2015 at 8:52:34 AM UTC-7, Andrea Cuttone wrote:
>>>
>>> All right I finally managed to make it run on Linux:
>>>
>>> xvfb-run -s "-screen 0 1400x900x24" python hello_world.py 
>>>
>>> This runs without problems on Ubuntu 12.04 and 14.04, and Mint 17.2.
>>>
>>> Still no luck on OSX. I guess the problem is that pyglet as most apps in 
>>> OSX uses Quartz instead of X11, so Xvfb does nothing.
>>>
>>>
>>> On Tuesday, September 29, 2015 at 3:51:15 PM UTC-4, Andrea Cuttone wrote:

 I now tried on a Ubuntu 13.10 machine

 I run xvfb-run ipython hello_world.py 
 :

 Traceback (most recent call last):
   File "hello_world.py", line 3, in 
 window = pyglet.window.Window()
   File 
 "/home/andrea/.local/lib/python2.7/site-packages/pyglet/__init__.py", line 
 357, in __getattr__
 __import__(import_name)
   File 
 "/home/andrea/.local/lib/python2.7/site-packages/pyglet/window/__init__.py",
  
 line 1817, in 
 gl._create_shadow_window()
   File 
 "/home/andrea/.local/lib/python2.7/site-packages/pyglet/gl/__init__.py", 
 line 205, in _create_shadow_window
 _shadow_window = Window(width=1, height=1, visible=False)
   File 
 "/home/andrea/.local/lib/python2.7/site-packages/pyglet/window/xlib/__init__.py",
  
 line 163, in __init__
 super(XlibWindow, self).__init__(*args, **kwargs)
   File 
 "/home/andrea/.local/lib/python2.7/site-packages/pyglet/window/__init__.py",
  
 line 559, in __init__
 self._create()
   File 
 "/home/andrea/.local/lib/python2.7/site-packages/pyglet/window/xlib/__init__.py",
  
 line 210, in _create
 visual_info = self.config.get_visual_info()
   File 
 "/home/andrea/.local/lib/python2.7/site-packages/pyglet/gl/xlib.py", line 
 182, in get_visual_info
 self.canvas.display._display, self._fbconfig).contents
 ValueError: NULL pointer access




 On Tuesday, September 29, 2015 at 11:11:14 AM UTC-4, swiftcoder wrote:
>
> What are the chances you can switch to a Linux server?
>
> It's likely to be a lot simpler to get X to give you a headless 
> framebuffer (or MESA equivalent), then to rewrite pyglet's OS X 
> implementation to allow headless operation.
> On Tue, Sep 29, 2015 at 07:20, Andrea Cuttone  
> wrote:
>
>> the app is already written using pyglet. Wouldn't that require to 
>> complete rewrite it using pycairo?
>>
>>
>>
>> Andrea Cuttone
>>
>> On Tue, Sep 29, 2015 at 10:13 AM, Andre D  wrote:
>>
>>> Does something like pycairo fit your needs?
>>> On Sep 29, 2015 10:12 AM, "Andrea Cuttone"  
>>> wrote:
>>>
 The application is https://github.com/andrea-cuttone/geoplotlib, a 
 python 

Re: Writing tests for a pyglet application

2018-05-18 Thread Benjamin Moran
Hi guys, 

The shadow window stuff was written before my time, but it's basically an 
OpenGL context created on a hidden window. The purpose was/is to allow 
users to load resources (Textures) before creating a Window.  I'm not sure 
how useful it really is to keep. If removed, we could just raise a detailed 
exception telling users to "please create a Window before loading images" 
or something to that effect.  There may be some projects that depend on 
this functionality out there, so it's worth discussing before removal.

The documentation stuff is in need of a cleanup. Recently, certain IDEs 
were hitting bugs with the _is_epydoc checks in the codebase, due to 
setting these things themselves. I believe it's for online documentation, 
but I'm not positive. In any case, the current plan is to remove all of the 
documentation checks from the codebase. Modern documentation tools have 
made all of this obsolete, so we should be able to clean a lot of this 
cruft out of the library. Anyone who is wanting to help out with that would 
be most welcome!

-Ben


On Friday, May 18, 2018 at 12:01:49 AM UTC+9, Paul Craven wrote:
>
> What does the shadow window do? There's not much documentation there, 
> aside from "XXX Remove"
>
> On Thursday, May 17, 2018 at 9:29:28 AM UTC-5, Chris Norman wrote:
>>
>> Hi,
>> I have never written tests for Pyglet, so please take whatever I say with 
>> a pinch of sault. I do however know that there is an option for not having 
>> the shadow window. I think it's pyglet.options['SHADOW_WINDOW'] = False.
>>
>> HTH,
>>
>> On Thu, May 17, 2018 at 3:21 PM, Paul Everitt  
>> wrote:
>>
>>> I'm a contributor to Arcade, the Python 3.6+ 2d game library. I'm 
>>> converting the existing doctests to pytest and trying to introduce some 
>>> faster unit testing. In particular, not firing up a GUI window on each test.
>>>
>>> I had hoped to make a MockWindow that I used to stub 
>>> pyglet.window.BaseWindow. The challenge: this line:
>>>
>>> from pyglet.window import Window
>>>
>>> ...immediately triggers a GUI window. Here are the last three lines in 
>>> pyglet.window.__init__.py:
>>>
>>> # XXX remove
>>> # Create shadow window. (trickery is for circular import)
>>> if not _is_pyglet_docgen:
>>> pyglet.window = sys.modules[__name__]
>>> gl._create_shadow_window()
>>>
>>>
>>> The last line is done with non-import trickery that appears beyond the 
>>> reach of mocking. Thus, I'm interested in some feedback:
>>>
>>> - Am I totally on the wrong path, and unit testing a method on a 
>>> subclass of BaseWindow requires a window?
>>>
>>> - Should I refactor arcade.Window to subclass from something which 
>>> subclasses BaseWindow, to give me a place to step in?
>>>
>>> - Does anybody have a pyglet application with tests that don't spawn 
>>> windows?
>>>
>>> Thanks, and I confess that it is likely I am looking at this all wrong.
>>>
>>> --Paul
>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> To post to this group, send email to pyglet...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/pyglet-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>>
>> Take care,
>>
>> Chris Norman
>>
>>

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


Re: headless rendering

2018-05-18 Thread Benjamin Moran
I wouldn't be surprised if this is a "security feature" of OSX.
Unfortunately I don't have any suggestions for you. I'm curious if it's 
possible to open other OpenGL applications with a locked screen, or just 
pyglet. If opening other applications is possible, maybe it's something we 
can improve in pyglet.


On Friday, May 18, 2018 at 2:39:32 AM UTC+9, Bleyddyn apRhys wrote:
>
> I realize this is really old, but I recently ran into a very similar 
> problem and was wondering if you or anyone has found a solution for Mac OS 
> X?
>
> Specifically, I 'm trying to run 
> https://github.com/AppliedDataSciencePartners/WorldModels/blob/master/05_train_controller.py
>  
> 
>  
> on my iMac. It's not headless, but as soon as my screensaver kicks in I get 
> the same error...
>
>screen = display.get_default_screen()
>  File 
> "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyglet/canvas/base.py",
>  
> line 73, in get_default_screen
>return self.get_screens()[0]
> IndexError: list index out of range
>
> Accessing the Quartz window system in any non-standard way has always been 
> a problem for OS X, but I had hoped maybe there was a solution by now.
>
> My current work-around is to disable my screensaver, but that also means 
> my computer isn't locked. Not something I care to do, especially given that 
> script could be running for days at a time.
>
>
> On Saturday, October 3, 2015 at 8:52:34 AM UTC-7, Andrea Cuttone wrote:
>>
>> All right I finally managed to make it run on Linux:
>>
>> xvfb-run -s "-screen 0 1400x900x24" python hello_world.py 
>>
>> This runs without problems on Ubuntu 12.04 and 14.04, and Mint 17.2.
>>
>> Still no luck on OSX. I guess the problem is that pyglet as most apps in 
>> OSX uses Quartz instead of X11, so Xvfb does nothing.
>>
>>
>> On Tuesday, September 29, 2015 at 3:51:15 PM UTC-4, Andrea Cuttone wrote:
>>>
>>> I now tried on a Ubuntu 13.10 machine
>>>
>>> I run xvfb-run ipython hello_world.py 
>>> :
>>>
>>> Traceback (most recent call last):
>>>   File "hello_world.py", line 3, in 
>>> window = pyglet.window.Window()
>>>   File 
>>> "/home/andrea/.local/lib/python2.7/site-packages/pyglet/__init__.py", line 
>>> 357, in __getattr__
>>> __import__(import_name)
>>>   File 
>>> "/home/andrea/.local/lib/python2.7/site-packages/pyglet/window/__init__.py",
>>>  
>>> line 1817, in 
>>> gl._create_shadow_window()
>>>   File 
>>> "/home/andrea/.local/lib/python2.7/site-packages/pyglet/gl/__init__.py", 
>>> line 205, in _create_shadow_window
>>> _shadow_window = Window(width=1, height=1, visible=False)
>>>   File 
>>> "/home/andrea/.local/lib/python2.7/site-packages/pyglet/window/xlib/__init__.py",
>>>  
>>> line 163, in __init__
>>> super(XlibWindow, self).__init__(*args, **kwargs)
>>>   File 
>>> "/home/andrea/.local/lib/python2.7/site-packages/pyglet/window/__init__.py",
>>>  
>>> line 559, in __init__
>>> self._create()
>>>   File 
>>> "/home/andrea/.local/lib/python2.7/site-packages/pyglet/window/xlib/__init__.py",
>>>  
>>> line 210, in _create
>>> visual_info = self.config.get_visual_info()
>>>   File 
>>> "/home/andrea/.local/lib/python2.7/site-packages/pyglet/gl/xlib.py", line 
>>> 182, in get_visual_info
>>> self.canvas.display._display, self._fbconfig).contents
>>> ValueError: NULL pointer access
>>>
>>>
>>>
>>>
>>> On Tuesday, September 29, 2015 at 11:11:14 AM UTC-4, swiftcoder wrote:

 What are the chances you can switch to a Linux server?

 It's likely to be a lot simpler to get X to give you a headless 
 framebuffer (or MESA equivalent), then to rewrite pyglet's OS X 
 implementation to allow headless operation.
 On Tue, Sep 29, 2015 at 07:20, Andrea Cuttone  
 wrote:

> the app is already written using pyglet. Wouldn't that require to 
> complete rewrite it using pycairo?
>
>
>
> Andrea Cuttone
>
> On Tue, Sep 29, 2015 at 10:13 AM, Andre D  wrote:
>
>> Does something like pycairo fit your needs?
>> On Sep 29, 2015 10:12 AM, "Andrea Cuttone"  
>> wrote:
>>
>>> The application is https://github.com/andrea-cuttone/geoplotlib, a 
>>> python library for plotting geographical data.
>>> The use case is running the app to render the maps, capture the 
>>> framebuffer and store it to disk in form of raster images.
>>> This works great when there is a physical screen attached, but it 
>>> fails with a headless session.
>>>
>>>
>>>
>>>
>>>
>>> Andrea Cuttone
>>>
>>> On Tue, Sep 29, 2015 at 10:05 AM, Andre D  wrote:
>>>
 What does the 

Re: headless rendering

2018-05-18 Thread Greg Ewing

Bleyddyn apRhys wrote:
as soon as my screensaver kicks in I 
get the same error...


   screen = display.get_default_screen()
 File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyglet/canvas/base.py", 
line 73, in get_default_screen

   return self.get_screens()[0]
IndexError: list index out of range


Well, I suppose that kind of makes sense -- your screen can't get
burned in if you don't have one!

--
Greg

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