PyMT on second display
Posted: 30 March 2009 05:22 PM   [ Ignore ]
Avatar
Rank
Joined  2008-11-21
Total Posts:  10
New Member

I’m sorry if this has been covered, but I’ve not found it with a decent search here,

I’ve just dusted off my badly neglected table to try out PyMT, got it installed and running without too many problems, but I’ve one issue..

Can you get it to go full screen on an external display in Leopard?
I’m new to python, although I think I’ll be crash coursing over the next few weeks now PyMT is in my hands, and I just can’t figure it for myself.

Profile
 
 
Posted: 31 March 2009 07:43 AM   [ Ignore ]   [ # 1 ]
Avatar
Rank
Joined  2008-12-27
Total Posts:  92
New Member

Hi Jentulman,

I’ve added the possibility to change width / height / display of pymt-based application. You can checkout the trunk version for testing. Check the README : http://pymt.googlecode.com/svn/trunk/README

If you want to known which index display to use, you can start a pymt app with --display=0.
Exemple :

$ python examples/tutorials/tut2.py --display=0
[INFO ] Fbo will use software Framebuffer
[DEBUG ] Detected display 0: XlibScreen(screen=0, x=0, y=0, width=1680, height=1050, xinerama=1)
[DEBUG ] Detected display 1: XlibScreen(screen=0, x=1680, y=0, width=1280, height=1024, xinerama=1)
[INFO ] listening for Tuio on 127.0.0.1:3333

Display index are showed in debug. If you want to run on another window, just set --display=1

Can you try under osx if it’s work ?

Thanks,

++tito;

Profile
 
 
Posted: 31 March 2009 07:58 AM   [ Ignore ]   [ # 2 ]
Avatar
Rank
Joined  2008-11-21
Total Posts:  10
New Member

Superstar,

Thanks kindly, I’ll try it out as soon as I get home and let you know.

phil.

Profile
 
 
Posted: 31 March 2009 02:37 PM   [ Ignore ]   [ # 3 ]
Avatar
Rank
Joined  2008-11-21
Total Posts:  10
New Member

Okay then, so I checked out trunk and re-ran the setup.py install

then having run the tut2.py --display=0 I get

BigMac:tutorials philpython tut2.py --display=1
[INFO   ] Fbo will 
use hardware Framebuffer
[DEBUG  ] Detected display 0
CarbonScreen(x=0y=0width=1920height=1200)
[DEBUG  ] Detected display 1CarbonScreen(x=-1280y=0width=1280height=1024)
[INFO   ] listening for Tuio on 127.0.0.1:3333

Which launches the tut2 in windowed mode (Not sure if that’s what’s meant to happen, I’ve got my ~/pymt/config set to fullscreen) but now I know which screen I’m going for.

So I go with launcher.py --display=1
and get…

[INFO   ] Fbo will use hardware Framebuffer
Traceback 
(most recent call last):
  
File "start.py"line 145in <module>
    
MTWallpaperWindow(wallpaper='wallpaper.jpg')
  
File "/Library/Python/2.5/site-packages/pymt/ui/wallpaperwindow.py"line 29in __init__
    super
(MTWallpaperWindowself).__init__(**kwargs)
  
File "/Library/Python/2.5/site-packages/pymt/ui/window.py"line 129in __init__
    super
(MTWindowself).__init__(**params)
  
File "/Library/Python/2.5/site-packages/pymt/mtpyglet.py"line 418in __init__
    super
(TouchWindowself).__init__(**kwargs)
  
File "/Library/Python/2.5/site-packages/pyglet/window/__init__.py"line 659in __init__
    
'Width and height cannot be specified with fullscreen.')
pyglet.window.WindowExceptionWidth and height cannot be specified with fullscreen.

I’m also getting the same error if I start it without the display arg.

Profile
 
 
Posted: 31 March 2009 03:08 PM   [ Ignore ]   [ # 4 ]
Avatar
Rank
Joined  2008-12-27
Total Posts:  92
New Member

Ok, i’ve fixed the bug. Please svn up && python setup.py install smile

Profile
 
 
Posted: 01 April 2009 03:04 AM   [ Ignore ]   [ # 5 ]
Avatar
Rank
Joined  2008-11-21
Total Posts:  10
New Member

Righto,

I checked out the latest trunk and ran setup again, plunged straight in with launcher.py --display=1 (1 being my target display on previous checks). It does now launch without error, but whether I launched with display 0 or 1 it always opened fullscreen on my primary display.

I tried it next with tut2.py and at that point my machine froze entirely, and in part due to the house-shaking drum’n’bass coming up from downstairs and in part due to my hunger I gave up for the evening and went to find my dinner. Hopefully I’ll get back to it when I get in this evening.

Profile
 
 
Posted: 01 April 2009 03:15 AM   [ Ignore ]   [ # 6 ]
Avatar
Rank
Joined  2008-12-27
Total Posts:  92
New Member

launcher is just a cd desktop && python start.py.
arguments are not passed to the real launcher

try to pass argument in python start.py --display=1

Profile
 
 
Posted: 01 April 2009 03:22 AM   [ Ignore ]   [ # 7 ]
Avatar
Rank
Joined  2008-11-21
Total Posts:  10
New Member

Ahh cool, I’d not looked at what launcher did by that point.

Will let you know.

Profile
 
 
Posted: 01 April 2009 01:17 PM   [ Ignore ]   [ # 8 ]
Avatar
Rank
Joined  2008-11-21
Total Posts:  10
New Member

Hello again,

That seems to have done the job nicely, I also updated to the latest trunk and it seems to be running well. Thanks for your help.

I’m going to go spend the evening with a python manual now and get up to speed with the syntax (I’m a full-time PHP guy), then after a few Hello Worlds, the first crack at something for the table/PyMT will be pong.

I’ve also updated my old introduction thread with a terrible bit of video http://nuigroup.com/forums/viewthread/3633/#31514

See you all soon.

Profile
 
 
Posted: 03 July 2009 04:18 PM   [ Ignore ]   [ # 9 ]
Avatar
Rank
Joined  2009-03-02
Total Posts:  21
New Member

hi folks,
is this problem fixed on the package available for download here?
http://code.google.com/p/pymt/downloads/list

 Signature 

jeraman
life is random. live a shuffle life.

Profile
 
 
Posted: 03 July 2009 04:54 PM   [ Ignore ]   [ # 10 ]
Avatar
Rank
Joined  2008-12-27
Total Posts:  92
New Member

No, it’s available on trunk version. Check Installation Instruction in Wiki !

Profile
 
 
Posted: 01 September 2009 03:37 PM   [ Ignore ]   [ # 11 ]
Rank
Joined  2009-09-01
Total Posts:  2
New Member

I’m going to checkout the trunk and test this.  However do you know if we can span both screens on an extended setup.  I think you may know what I’m talking about but I’ll be more specific.  I have two screens connected to one computer, they are in extended mode (not mirroring), and I’d like the window to display across both screens.

Thanks

Edit:

If I set: w = MTWindow(fullscreen=False), then run code using this: python test.py --display=0 --size=2048x768, I can get a window that spans the two screens.  This is a start, however it would be nice if the window was fullscreen spanning both screens.  I didn’t grab the trunk, because pymt-0.3rc3 was posted a few days ago.  That seems to have the above mentioned fix in it.

Profile