Re: [pygame] Multiple keyboard

2011-11-23 Thread pierrelafran...@sympatico.ca

This look like something we need, but for Linux.
Is this available (I haven't find anything like it on Google)
Thanks

P.

On 11-11-19 11:32 PM, Alec Bennett wrote:

Have you tried the pyHooks module? It can hook the keyboard at what
might be a lower level than pygame. I know, for example, that it works
whether or not the application has focus.

There's a demo script that prints all the info about a given keystroke,
maybe there's something in it that differentiates multiple keyboards.

Apologies if this was already mentioned.




On Sat, Nov 19, 2011 at 2:15 PM, Miriam English m...@miriam-english.org
mailto:m...@miriam-english.org wrote:

It looks like the serial value changes each time you use a different
keyboard. I tried pressing 1 then 2 on one keyboard and found
the serial number doesn't change. Interesting.

Unfortunately when you input from another keyboard the serial number
just seems to increment. With just 2 keyboards I guess this should
be a matter of _even_ serial numbers being from one keyboard, and
_odd_ serial numbers being from the other keyboard.

I'm not sure how you detect the serial numbers from python though.
Perhaps someone else here knows more about this stuff.

Best wishes,

- Miriam


pierrelafran...@sympatico.ca mailto:pierrelafran...@sympatico.ca
wrote:


KeyPress event, serial 38, synthetic NO, window 0x521,
 root 0x10b, subw 0x0, time 443293042, (833,223),
root:(839,249),
 state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
 XLookupString gives 1 bytes: (31) 1
 XmbLookupString gives 1 bytes: (31) 1
 XFilterEvent returns: False

KeyRelease event, serial 39, synthetic NO, window 0x521,
 root 0x10b, subw 0x0, time 443293186, (833,223),
root:(839,249),
 state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
 XLookupString gives 1 bytes: (31) 1
 XFilterEvent returns: False

MappingNotify event, serial 39, synthetic NO, window 0x0,
 request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 39, synthetic NO, window 0x521,
 root 0x10b, subw 0x0, time 443294033, (833,223),
root:(839,249),
 state 0x10, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
 XLookupString gives 1 bytes: (32) 2
 XmbLookupString gives 1 bytes: (32) 2
 XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x521,
 root 0x10b, subw 0x0, time 443294153, (833,223),
root:(839,249),
 state 0x10, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
 XLookupString gives 1 bytes: (32) 2
 XFilterEvent returns: False

MappingNotify event, serial 40, synthetic NO, window 0x0,
 request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 40, synthetic NO, window 0x521,
 root 0x10b, subw 0x0, time 443294689, (833,223),
root:(839,249),
 state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
 XLookupString gives 1 bytes: (31) 1
 XmbLookupString gives 1 bytes: (31) 1
 XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0x521,
 root 0x10b, subw 0x0, time 443294817, (833,223),
root:(839,249),
 state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
 XLookupString gives 1 bytes: (31) 1
 XFilterEvent returns: False

MappingNotify event, serial 41, synthetic NO, window 0x0,
 request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 41, synthetic NO, window 0x521,
 root 0x10b, subw 0x0, time 443295313, (833,223),
root:(839,249),
 state 0x10, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
 XLookupString gives 1 bytes: (32) 2
 XmbLookupString gives 1 bytes: (32) 2
 XFilterEvent returns: False

KeyRelease event, serial 42, synthetic NO, window 0x521,
 root 0x10b, subw 0x0, time 443295441, (833,223),
root:(839,249),
 state 0x10, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
 XLookupString gives 1 bytes: (32) 2
 XFilterEvent returns: False

MappingNotify event, serial 42, synthetic NO, window 0x0,
 request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 42, synthetic NO, window 0x521,
 root 0x10b, subw 0x0, time 443295937, (833,223),
root:(839,249),
 state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
 XLookupString gives 1 bytes: (31) 1
 XmbLookupString gives 1 bytes: (31) 1

Re: [pygame] Multiple keyboard

2011-11-19 Thread pierrelafran...@sympatico.ca

On 11-11-07 06:38 AM, René Dudfield wrote:

Hi,

You're using X right?  I can't find a way with Xlib to find which
keyboard generated the event.  I also don't have an extra keyboard to
plugin at the moment.

Try running 'xev' in a terminal.  Then press a key on each keyboard, and
see if there are any differences in the output.

They should print something like this:

KeyPress event, serial 36, synthetic NO, window 0x461,
 root 0xad, subw 0x0, time 223972330, (-345,178), root:(450,225),
 state 0x4, keycode 54 (keysym 0x63, c), same_screen YES,
 XLookupString gives 1 bytes: (03) 
 XmbLookupString gives 1 bytes: (03) 
 XFilterEvent returns: False


Maybe copy them back to the email so we can all have a look.



cheers,

On Fri, Nov 4, 2011 at 9:33 PM, pierrelafran...@sympatico.ca
mailto:pierrelafran...@sympatico.ca pierrelafran...@sympatico.ca
mailto:pierrelafran...@sympatico.ca wrote:

Debian on Atom-PC like computer / Python / Pygame
Thanks


--
Pierre


On 11-11-04 03:07 PM, René Dudfield wrote:

Hi,

It might be possible to get that information with a system message.
What platform/s do you need to support?

cheers,

On Fri, Nov 4, 2011 at 7:37 PM, pierrelafran...@sympatico.ca
mailto:pierrelafran...@sympatico.ca
mailto:PierreLafrance1@__sympatico.ca
mailto:pierrelafran...@sympatico.ca
pierrelafran...@sympatico.ca mailto:pierrelafran...@sympatico.ca

mailto:PierreLafrance1@__sympatico.ca
mailto:pierrelafran...@sympatico.ca wrote:

Hi
We have an application using a Digital Keyboard like this one :
http://www.targus.ca/ca/product_details.asp?sku=AKP10CA
http://www.targus.ca/ca/__product_details.asp?sku=__AKP10CA

http://www.targus.ca/ca/__product_details.asp?sku=__AKP10CA
http://www.targus.ca/ca/product_details.asp?sku=AKP10CA

Now our application need many of them, and our application must
distinguish all key from all keyboard.  For example, when
user press
enter from keyboard 1, we must know the KP_ENTER is from
keyboard 1,
and same thing for keyboard 2...n

Is this possible with Pygame (according to our web search
this seams
to not feasible with Pygame, but I'm hopping you prove me
wrong and
we will not have to do that at SDL level... (please...)

Thanks,

--
Pierre,








Hi
Sorry for late response, being busy running a business.

This is the xev output on my Ubuntu system, with 2 identical Targus keyboads.  I 
pressed 1 on keyboard 1 and 2 on keyboard 2, then 1 on keyboard 1 and 2 on 
keyboard 2, etc...


KeyPress event, serial 38, synthetic NO, window 0x521,
root 0x10b, subw 0x0, time 443293042, (833,223), root:(839,249),
state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
XLookupString gives 1 bytes: (31) 1
XmbLookupString gives 1 bytes: (31) 1
XFilterEvent returns: False

KeyRelease event, serial 39, synthetic NO, window 0x521,
root 0x10b, subw 0x0, time 443293186, (833,223), root:(839,249),
state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
XLookupString gives 1 bytes: (31) 1
XFilterEvent returns: False

MappingNotify event, serial 39, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 39, synthetic NO, window 0x521,
root 0x10b, subw 0x0, time 443294033, (833,223), root:(839,249),
state 0x10, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
XLookupString gives 1 bytes: (32) 2
XmbLookupString gives 1 bytes: (32) 2
XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x521,
root 0x10b, subw 0x0, time 443294153, (833,223), root:(839,249),
state 0x10, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
XLookupString gives 1 bytes: (32) 2
XFilterEvent returns: False

MappingNotify event, serial 40, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 40, synthetic NO, window 0x521,
root 0x10b, subw 0x0, time 443294689, (833,223), root:(839,249),
state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
XLookupString gives 1 bytes: (31) 1
XmbLookupString gives 1 bytes: (31) 1
XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0x521,
root 0x10b, subw 0x0, time 443294817, (833,223), root:(839,249),
state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
XLookupString gives 1 bytes: (31) 1
XFilterEvent returns: False

MappingNotify event, serial 41, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 41, synthetic NO, window 0x521,
root 0x10b, subw 0x0, time 443295313, (833,223

Re: [pygame] Sound stops working after hours of operation

2011-11-05 Thread pierrelafran...@sympatico.ca

Hi
The line of code is there :
self.beep_file = pygame.mixer.Sound(%s/beep.wav % FILE_LOCATION)
So we reload the file from disk (SDCARD) each time.
Is this can be an issue ?
Thanks

--
Pierre

On 11-11-04 09:36 PM, Luke Paireepinart wrote:

Do you load the beep from disk once and then play it back with the in-memory 
sound object or are you reloading it each time?

-
Sent from a mobile device. Apologies for brevity and top-posting.
-

On Nov 4, 2011, at 5:42 PM, 
pierrelafran...@sympatico.capierrelafran...@sympatico.ca  wrote:


Hi
Our Pygame application run 24/7 on a Atom/Intel Desktop Board D945GSEJT, with 
Debian Squeeze / Python / Pygame.

Our application use this code to create once in a while, a BEEP sound. Lets say 
its to wake up users :-)

self.beep_file = pygame.mixer.Sound(%s/beep.wav % FILE_LOCATION)

This works find for many hours, but stops working within a day.  If we make 
this system command in shell :
aplay %s/beep.wav

sound works and we can hear the sound.

In other words, sound trough Pygame doesn't work, but sounds trough system 
works fine.

We search the web for clues, but look likes we are pretty alone with this kind 
of bug.

Any pointer ?
Thanks

--
Pierre







[pygame] Multiple keyboard

2011-11-04 Thread pierrelafran...@sympatico.ca

Hi
We have an application using a Digital Keyboard like this one :
http://www.targus.ca/ca/product_details.asp?sku=AKP10CA

Now our application need many of them, and our application must distinguish all 
key from all keyboard.  For example, when user press enter from keyboard 1, we 
must know the KP_ENTER is from keyboard 1, and same thing for keyboard 2...n


Is this possible with Pygame (according to our web search this seams to not 
feasible with Pygame, but I'm hopping you prove me wrong and we will not have to 
do that at SDL level... (please...)


Thanks,

--
Pierre,



Re: [pygame] Multiple keyboard

2011-11-04 Thread pierrelafran...@sympatico.ca

Debian on Atom-PC like computer / Python / Pygame
Thanks


--
Pierre

On 11-11-04 03:07 PM, René Dudfield wrote:

Hi,

It might be possible to get that information with a system message.
What platform/s do you need to support?

cheers,

On Fri, Nov 4, 2011 at 7:37 PM, pierrelafran...@sympatico.ca
mailto:pierrelafran...@sympatico.ca pierrelafran...@sympatico.ca
mailto:pierrelafran...@sympatico.ca wrote:

Hi
We have an application using a Digital Keyboard like this one :
http://www.targus.ca/ca/__product_details.asp?sku=__AKP10CA
http://www.targus.ca/ca/product_details.asp?sku=AKP10CA

Now our application need many of them, and our application must
distinguish all key from all keyboard.  For example, when user press
enter from keyboard 1, we must know the KP_ENTER is from keyboard 1,
and same thing for keyboard 2...n

Is this possible with Pygame (according to our web search this seams
to not feasible with Pygame, but I'm hopping you prove me wrong and
we will not have to do that at SDL level... (please...)

Thanks,

--
Pierre,






[pygame] Sound stops working after hours of operation

2011-11-04 Thread pierrelafran...@sympatico.ca

Hi
Our Pygame application run 24/7 on a Atom/Intel Desktop Board D945GSEJT, with 
Debian Squeeze / Python / Pygame.


Our application use this code to create once in a while, a BEEP sound. Lets say 
its to wake up users :-)


 self.beep_file = pygame.mixer.Sound(%s/beep.wav % FILE_LOCATION)

This works find for many hours, but stops working within a day.  If we make this 
system command in shell :

aplay %s/beep.wav

sound works and we can hear the sound.

In other words, sound trough Pygame doesn't work, but sounds trough system works 
fine.


We search the web for clues, but look likes we are pretty alone with this kind 
of bug.


Any pointer ?
Thanks

--
Pierre


Re: [pygame] Sound stops working after hours of operation

2011-11-04 Thread pierrelafran...@sympatico.ca

Hi Lenard
I don't know about under/overflow, let me ckeck that
Thanks,

--
Pierre


On 11-11-04 08:20 PM, Lenard Lindstrom wrote:

Hi,

Do you get underflow messages from alsa on the console while the
application is running?

Lenard Lindstrom

On Nov 4, 2011, *pierrelafran...@sympatico.ca*
pierrelafran...@sympatico.ca wrote:

Hi
Our Pygame application run 24/7 on a Atom/Intel Desktop Board
D945GSEJT, with
Debian Squeeze / Python / Pygame.

Our application use this code to create once in a while, a BEEP
sound. Lets say
its to wake up users :-)

self.beep_file = pygame.mixer.Sound(%s/beep.wav % FILE_LOCATION)

This works find for many hours, but stops working within a day. If
we make this
system command in shell :
aplay %s/beep.wav

sound works and we can hear the sound.

In other words, sound trough Pygame doesn't work, but sounds trough
system works
fine.

We search the web for clues, but look likes we are pretty alone with
this kind
of bug.

Any pointer ?
Thanks

--
Pierre





[pygame] Detect keyboard connect / disconnect

2010-12-20 Thread pierrelafran...@sympatico.ca

Hi
Any simple way to detect a keyboard connect and/or disconnect event ?
We tried keyboard.get_count() but didn't work with our keyboard (not sure why).

Thanks

--
Pierre


Re: [pygame] Need names and nationalities for AI playes in new sport-game

2009-11-13 Thread pierrelafran...@sympatico.ca
John Eriksson wrote:
 *smile*
 
 I hereby promise to not use your names, nationalities or
 e-mailaddresses in any other way than to name the AI-players in Power
 Play (or whatever it might be called whenever it's done).
 
 Best Regards
 /John Eriksson
 
 2009/11/13  d...@amberfisharts.com:
 Hi again.

 may I add that I assume that you *only* use our names and nationality. And 
 *only* for this purpose.
 Maybe this is just me being paranoid but I wanted to state clearly that I 
 wouldn't want you to
 publish any other stuff (eMail address for example) or for example sell the 
 pygame-user statistics
 to a third party.

 other than that. you still have my OK :)


 On Thu, 12 Nov 2009 22:19:28 +0100, Lorenz Quack d...@amberfisharts.com 
 wrote:
 Hi,

 John Eriksson wrote:
 I started to search the net to find inspiration for names and
 nationalities to the AI-players. But then I thought it would be much
 nicer to use the names and nationalities of pygame developers instead
 of just using fictive names.

 [snip]

 If you wan't your name to apear as a AI-player in the game, please
 send me your name (first + last) and your nationality.

 nice idea.
 Lorenz Quack, Germany

 looking forward to find my name in a game =)
 
 


Pierre Lafrance
Caucasian, French speaking from Québec (Canada)

Will we know level associate to our name ?
;-)

Good luck


[pygame] How to send a keyboard event ?

2009-11-11 Thread pierrelafran...@sympatico.ca
Hi
I have a simple question : I want to create a class that generates keyboard
event to test my application.
Ex : I want a method to send this :
event.type == KEYDOWN and event.key == K_KP_PLUS:

Any pointers to help me doing this ?
Thanks

-- 
Pierre


Re: [pygame] Distro for Beagle board

2009-10-26 Thread pierrelafran...@sympatico.ca
René Dudfield wrote:
 hi,
 
 Ångström seems to be popular for beagle board people... and open pandora.
 http://www.angstrom-distribution.org/
 
 I know people have used pygame on those platforms.  Also Ångström has
 the older pygame 1.8.1 packaged:
 http://www.angstrom-distribution.org/repo/?pkgname=python-pygame
 
 
 cu!
 
 

Hi
They even have an online image builder, were we can select dev package
and more :
http://www.angstrom-distribution.org/online-image-builder-available

Very cool, get to the points.
I'll see if I can add pygame as dev package in the tool later on.
Cheers!


-- 
Pierre


Re: [pygame] Distro for Beagle board

2009-10-25 Thread pierrelafran...@sympatico.ca
Miriam English wrote:
 Have you considered Puppy Linux?
 :) Kindof appropriate having a Beagle Puppy. heheh
 
 I've been using Puppy on my machines for some years now and it has come
 a long way. The latest, Puppy4.3.1, is the prettiest and easiest to use
 so far. The standard distro is tiny -- 100MB in size, and comes with a
 lot of stuff built-in, but not python as far as I remember. If you
 install the devx file for Puppy4.3.1 you get python and all the
 development sources, headers, etc to compile against. Installing pygame
 should be simple. It is a long while since I did that though.
 
 Puppy will boot straight from live CD, loading entirely into RAM and
 releasing your CD drive for other uses. Or you can run it from USB
 drive. It has some drive-saving features, like caching writes so as not
 to shorten the flash drive's life unnecessarily. Or you can install it
 on a hard drive and run it like any standard OS (what I usually do).
 
 Puppy is very fast, with a very small footprint, but I also use it on
 one of my machines for running 3D modelling stuff like Blender, sound
 editing, etc. It is also the only live Linux distro that I know of that
 is able to play almost any multimedia immediately.
 
 Puppy has some drawbacks, mainly resulting from cutting back on extra
 things not often used. Also, in an attempt to be as user-friendly as
 possible the user logs in as root. This scares a lot of die-hard Linux
 users as a possible security problem, but in practice it is fairly safe,
 and it isn't hard set up the default login as a less priveleged user.
 
 The main site:
 http://www.puppylinux.com/
 
 The most active forum:
 http://www.murga-linux.com/puppy/
 
 Ibiblio, where the distros and packages are:
 ftp://ibiblio.org/pub/linux/distributions/puppylinux/
 but you'll want:
 ftp://ibiblio.org/pub/linux/distributions/puppylinux/puppy-4.3.1/
 and the packages (pet files):
 ftp://ibiblio.org/pub/linux/distributions/puppylinux/pet_packages-4/
 
 You can create your own version of Puppy with python and pygame already
 in there using woof (I'm not kidding, it really is called that).
 If you want to create a Puppy specifically for the ARM processor, woof
 might do that too. I can't help there as I haven't used woof, but there
 are a lot of people in the Puppy forum who I'm sure would be delighted
 to help.
 
 Read about woof here:
 http://puppylinux.com/woof/
 
 Cheers,
 
 - Miriam
 
 pierrelafran...@sympatico.ca wrote:
 Hi
 We want to migrate our application to BeagleBoard :
 http://beagleboard.org/

 In your opinion, wich distro would offer best support for Pygame ?

 Thank you

 

Ok, I'll look into it.
But I have questions : Beagle doesn't have any HDD, nor CD drive.  It
runs from SD FLASH.  Processor is OMAP from TI (ARM5 I think).

Thank

Any other people experienced Pygame on Beagle board ?
The web site list 5 or 6 linux distro running on Beagle.  I can try them
all, but I would appreciate to have some input before doing these tasks.

Cheers!
-- 
Pierre


[pygame] Distro for Beagle board

2009-10-24 Thread pierrelafran...@sympatico.ca
Hi
We want to migrate our application to BeagleBoard : http://beagleboard.org/

In your opinion, wich distro would offer best support for Pygame ?

Thank you

-- 
Pierre


[pygame] Keyboards, other questions

2009-10-09 Thread pierrelafran...@sympatico.ca
Hi
If I have a Linux base application, with 2 USB keyboards connected to
it, is it possible to know, when a key is press, from wich keyboard the
command is from ?

Thanks

-- 
Pierre


[pygame] Python IDE for windoz

2009-10-06 Thread pierrelafran...@sympatico.ca
Hi
I have administrator rights on a computor in a lab at work, until
tomorrow.  I would like install IDE for Python. What do you suggest me ?

I know, I may not write this question in the good room, but I just learn
this news, and after tomorrow, it will be too late to install Python.

Thanks
-- 
Pierre


Re: [pygame] 10 bits per color

2009-10-01 Thread pierrelafran...@sympatico.ca
René Dudfield wrote:
 hi,
 
 not yet...  highest is rgb 888, and yuv 422
 
 As James mentions SDL 1.3 is getting more pixel formats - I can't
 remember which ones they decided to support.  However a bunch of the
 other non-SDL code in pygame can only use 888.  So maybe in the
 future.
 
 Note, that it'd be very rare if a screen can show that many colors -
 most computer LCD screens are terrible these days (6bit rgb).  Often
 in video screens for home when they talk about the new 10bit color, it
 means 442 yuv, and most tv is broadcast with only 422.
 
 pygame also doesn't support color profiles, which can be important for
 color on your screen... and most importantly pygame doesn't know how
 to change the color of your light bulp(yet) shining down on your
 screen which changes the colors quite a lot.
 
 You can mess with the gama settings if you want... but that can make
 peoples monitors stick with that if you don't set it back!
 
 
 cheers,
 
 
 On Thu, Oct 1, 2009 at 12:46 AM, pierrelafran...@sympatico.ca
 pierrelafran...@sympatico.ca wrote:
 Hi
 Is Pygame supports 10 bits per color (ex RGB101010) ?
 Windows 7 is going to support it
 Thanks!

 Pierre


 
 
Hi all
Thanks for all these details.

I'm asking because new ATI graphic cards support HDMI 1.3 (HDMI support
DeepColor, meaning up to 16 bits per color RGB161616), and new TV with
retro light using LEDs has higher contrast (up to 200:1 wich is
about 126 DB dynamic range) and support HDMI 1.3 with DeepColor.  Lots
of DVD player also support DeepColor (not sure if any movie are
available in DeepColor) And Windows 7, comming october 22 support
RGB101010 and more.  I'm still looking for a Linux distro that has more
than 8 bits per color.
So all the industry is taking the turn with DeepColor.

Thanks,

Pierre Lafrance




Re: [pygame] 10 bits per color

2009-10-01 Thread pierrelafran...@sympatico.ca
 Sounds lik yet another gimmick to get uneducated folk to buy another TV
LOL, I like this one.
But I'm not sure I understand your statement on NTSC.

This is what my research subject is all about.  My boss asked me to
optimize my hardware design (0.35u CMOS image sensor) to fit eyes and
equipement limitations.  But I need first to create RGB101010 software
to see if DeepColor makes sense or not, before optimizing CMOS chips.
Since I like Python and I have Pygame experiences, I wanted to do that
software with Pygames.

Thanks

Pierre

Luke Paireepinart wrote:
 Just because tvs support it doesn't mean they can render it. Tvs
 support the ntsc standard even if they can't display 100% of it. I
 doubt if they have the CRI high enough to resolve 10 bit color on LCDs
 even with LED backlighting. Sounds lik yet another gimmick to get
 uneducated folk to buy another TV (like dynamic contrast, tru motion,
 120 hz, 240 hz lcds, 800 hz plasmas, etc.)
 
 On 10/1/09, pierrelafran...@sympatico.ca pierrelafran...@sympatico.ca wrote:
 René Dudfield wrote:
 hi,

 not yet...  highest is rgb 888, and yuv 422

 As James mentions SDL 1.3 is getting more pixel formats - I can't
 remember which ones they decided to support.  However a bunch of the
 other non-SDL code in pygame can only use 888.  So maybe in the
 future.

 Note, that it'd be very rare if a screen can show that many colors -
 most computer LCD screens are terrible these days (6bit rgb).  Often
 in video screens for home when they talk about the new 10bit color, it
 means 442 yuv, and most tv is broadcast with only 422.

 pygame also doesn't support color profiles, which can be important for
 color on your screen... and most importantly pygame doesn't know how
 to change the color of your light bulp(yet) shining down on your
 screen which changes the colors quite a lot.

 You can mess with the gama settings if you want... but that can make
 peoples monitors stick with that if you don't set it back!


 cheers,


 On Thu, Oct 1, 2009 at 12:46 AM, pierrelafran...@sympatico.ca
 pierrelafran...@sympatico.ca wrote:
 Hi
 Is Pygame supports 10 bits per color (ex RGB101010) ?
 Windows 7 is going to support it
 Thanks!

 Pierre



 Hi all
 Thanks for all these details.

 I'm asking because new ATI graphic cards support HDMI 1.3 (HDMI support
 DeepColor, meaning up to 16 bits per color RGB161616), and new TV with
 retro light using LEDs has higher contrast (up to 200:1 wich is
 about 126 DB dynamic range) and support HDMI 1.3 with DeepColor.  Lots
 of DVD player also support DeepColor (not sure if any movie are
 available in DeepColor) And Windows 7, comming october 22 support
 RGB101010 and more.  I'm still looking for a Linux distro that has more
 than 8 bits per color.
 So all the industry is taking the turn with DeepColor.

 Thanks,

 Pierre Lafrance



 



Re: [pygame] 10 bits per color

2009-10-01 Thread pierrelafran...@sympatico.ca
René Dudfield wrote:
 On Thu, Oct 1, 2009 at 2:34 PM, pierrelafran...@sympatico.ca
 pierrelafran...@sympatico.ca wrote:
 Sounds lik yet another gimmick to get uneducated folk to buy another TV
 LOL, I like this one.
 But I'm not sure I understand your statement on NTSC.

 This is what my research subject is all about.  My boss asked me to
 optimize my hardware design (0.35u CMOS image sensor) to fit eyes and
 equipement limitations.  But I need first to create RGB101010 software
 to see if DeepColor makes sense or not, before optimizing CMOS chips.
 Since I like Python and I have Pygame experiences, I wanted to do that
 software with Pygames.

 Thanks

 Pierre

 
 sounds like a fun project!
 
 from my understanding of non-cutting-edge cmos sensors, they give out
 8-16bit per pixel of range?  Then for color they use a bayer filter,
 to filter out the various wave lengths of light... usually RGB
 filters.  Of course if you took 1/3rd the resolution of that image,
 then it could be 16/16/16 per pixel I guess.
 
 In the same sense you could work with a pygame Surface - but think of
 the colors in a different resolution.  Double the resolution, and
 you've doubled the color depth.
 
 But you might want to check out exr... http://www.openexr.com/  and
 it's python bindings...
 http://excamera.com/sphinx/articles-openexr.html
 
 
 ... thinking of it a bit more... you should be able to display higher
 depths via opengl.
 
 With pygame and opengl you should be able to set a higher bit depth...
 if your driver supports it.
 see: http://pygame.org/docs/ref/display.html#pygame.display.gl_set_attribute
 
 Then send your data to the relevant bit depth gl texture, and you
 should be able to display whatever your driver supports
 
 
 cu.
 
 

Hi all,

 they give out 8-16bit per pixel of range?

René, you put the fingers exactly in the center of our question: Why
camera gave 12, or even 14 bits per color, if Windows, Display, Grahic
cards are limited to 8 bits per color ?
HDMI 1.3 is 1 year old only, Windows will support this (correctly ???)
in 1 month.  Only specialized software are supporting this.  But who has
PhotoShop at home ?

Ok, some print pictures, but in my opinion, there are even less dynamic
range on paper than on LCD (this need to be confirm).

About Bayer, some sensor work differently, if you are interrested, look
at Foveon sensor (bought by Sigma), and this patent:
http://www.google.com/patents/about?id=_mzIEBAJdq=Yves+Audet
That's my boss's patent, the CMOS sensor I'm working on

And yes it's a fun projet, mixing Pygame with chips design :-D

Pierre



Re: [pygame] 10 bits per color

2009-10-01 Thread pierrelafran...@sympatico.ca
Nirav Patel wrote:
 René was referring to average cameras doing 8-16 per pixel, not per
 color.  Though, in a Bayer sensor, I guess you could calculate it
 either way.  The Foveon sensor is of course different.  Even if the
 display is not capable of showing 10 bits per color, it makes sense to
 capture at it to allow for post processing.  You could mess with the
 levels or extend contrast without running into banding or aliasing or
 having to dither.
 
 Nirav
 
 On Thu, Oct 1, 2009 at 9:53 AM, pierrelafran...@sympatico.ca
 pierrelafran...@sympatico.ca wrote:
 René Dudfield wrote:
 On Thu, Oct 1, 2009 at 2:34 PM, pierrelafran...@sympatico.ca
 pierrelafran...@sympatico.ca wrote:
 Sounds lik yet another gimmick to get uneducated folk to buy another TV
 LOL, I like this one.
 But I'm not sure I understand your statement on NTSC.

 This is what my research subject is all about.  My boss asked me to
 optimize my hardware design (0.35u CMOS image sensor) to fit eyes and
 equipement limitations.  But I need first to create RGB101010 software
 to see if DeepColor makes sense or not, before optimizing CMOS chips.
 Since I like Python and I have Pygame experiences, I wanted to do that
 software with Pygames.

 Thanks

 Pierre

 sounds like a fun project!

 from my understanding of non-cutting-edge cmos sensors, they give out
 8-16bit per pixel of range?  Then for color they use a bayer filter,
 to filter out the various wave lengths of light... usually RGB
 filters.  Of course if you took 1/3rd the resolution of that image,
 then it could be 16/16/16 per pixel I guess.

 In the same sense you could work with a pygame Surface - but think of
 the colors in a different resolution.  Double the resolution, and
 you've doubled the color depth.

 But you might want to check out exr... http://www.openexr.com/  and
 it's python bindings...
 http://excamera.com/sphinx/articles-openexr.html


 ... thinking of it a bit more... you should be able to display higher
 depths via opengl.

 With pygame and opengl you should be able to set a higher bit depth...
 if your driver supports it.
 see: http://pygame.org/docs/ref/display.html#pygame.display.gl_set_attribute

 Then send your data to the relevant bit depth gl texture, and you
 should be able to display whatever your driver supports


 cu.


 Hi all,

 they give out 8-16bit per pixel of range?
 René, you put the fingers exactly in the center of our question: Why
 camera gave 12, or even 14 bits per color, if Windows, Display, Grahic
 cards are limited to 8 bits per color ?
 HDMI 1.3 is 1 year old only, Windows will support this (correctly ???)
 in 1 month.  Only specialized software are supporting this.  But who has
 PhotoShop at home ?

 Ok, some print pictures, but in my opinion, there are even less dynamic
 range on paper than on LCD (this need to be confirm).

 About Bayer, some sensor work differently, if you are interrested, look
 at Foveon sensor (bought by Sigma), and this patent:
 http://www.google.com/patents/about?id=_mzIEBAJdq=Yves+Audet
 That's my boss's patent, the CMOS sensor I'm working on

 And yes it's a fun projet, mixing Pygame with chips design :-D

 Pierre


 
 
Hi
Sorry I was not clear.  Most camera now have RAW mode with more than 8
bits per color (in Bayer color space).  Some hi-end camera (like Nikon)
capture images with 14bits per pixel

Why is this, when current display are limited to 8 bits per color ?

It's interresting to see all these answers from Pygame users.  I'm
really happy to see there a lot of knowledge people in this mailing list.

Thanks

Pierre


[pygame] 10 bits per color

2009-09-30 Thread pierrelafran...@sympatico.ca
Hi
Is Pygame supports 10 bits per color (ex RGB101010) ?
Windows 7 is going to support it
Thanks!

Pierre



Re: [pygame] Numeric wireless keyboard

2009-09-09 Thread pierrelafran...@sympatico.ca
Hi
I have succeffully (with a certain amount of pain to update Ubuntu and
ARM systems  ;-)  compiled a SDL program.

On ARM system, SDL doesn't receive good event ID (if I may call it like
this).  When pressing any digit from wired keyboard, it works fine.
When pressing any digit from wireless keyboard, it receive : numlock
key was pressed.

So Pygames is out of the loop, like you all suspected (I have to learn).
 Now what do I do to progress in my investigation ?
Can I recompile SDL with different options ?
Is SDL relies on an other librairy ?
Both system have libsdl version 1.2

Thanks

-- 
Pierre Lafrance

pierrelafran...@sympatico.ca wrote:
 James Paige wrote:
 On Thu, Aug 20, 2009 at 08:58:27AM -0400, pierrelafran...@sympatico.ca wrote:
 René Dudfield wrote:
 yeah, looks like somewhere the keyboard mappings aren't working.
 Likely in linux, C or SDL land.

 This is not a pygame level issue.

 Check on the SDL mailing list, or the arm platform mailing list perhaps?


 cheers,


 Hi Rene.
 What I don't understand is :
 + The alphanumeric keyboards works fine with ARM plateform and Pygame
 + The numeric keyboard works fine with ARM plateform in a text editor
 + The numeric keyboard does't works fine with ARM plateform and Pygame

 So I'm not sure what to look at yet since hardware and software is ok.
 Anyway, I'll keep you post on progress

 Thanks

 Pierre
 I would suggest writing a very small test program in C using SDL. You 
 can find some suitable example code at 
 http://www.libsdl.org/intro.en/usingevents.html

 Compile it with gcc, and use it to test and see if this problem affects 
 the underlying SDL library when python and pygame are not involved.

 That will narrow down where the problem is.

 ---
 James Paige


 Hi
 I have succeffully (with a certain amount of pain to update Ubuntu and
 ARM systems ;-) compiled a SDL program.
 
 On ARM system, SDL doesn't receive good event ID (if I may call it like
 this).  When pressing any digit from wired keyboard, it works fine.
 When pressing any digit from wireless keyboard, it receive : numlock
 key was pressed.
 
 So Pygames is out of the loop, like you all suspected (I have to learn).
  Now what do I do to progress in my investigation ?
 Can I recompile SDL with different options ?
 Is SDL relies on an other librairy ?
 Both system have libsdl version 1.2
 
 Thanks
 





Re: [pygame] Numeric wireless keyboard

2009-09-09 Thread pierrelafran...@sympatico.ca
Ok thanks
-- 
Pierre Lafrance


James Paige wrote:
 Have you asked on the SDL mailing list yet? Since this does indeed seem 
 to be an SDL problem, they are likely to be interested in the problem 
 too.
 
 http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
 
 ---
 James Paige
 
 On Wed, Sep 09, 2009 at 08:52:38PM -0400, pierrelafran...@sympatico.ca wrote:
 Hi
 I have succeffully (with a certain amount of pain to update Ubuntu and
 ARM systems  ;-)  compiled a SDL program.

 On ARM system, SDL doesn't receive good event ID (if I may call it like
 this).  When pressing any digit from wired keyboard, it works fine.
 When pressing any digit from wireless keyboard, it receive : numlock
 key was pressed.

 So Pygames is out of the loop, like you all suspected (I have to learn).
  Now what do I do to progress in my investigation ?
 Can I recompile SDL with different options ?
 Is SDL relies on an other librairy ?
 Both system have libsdl version 1.2

 Thanks

 -- 
 Pierre Lafrance

 pierrelafran...@sympatico.ca wrote:
 James Paige wrote:
 On Thu, Aug 20, 2009 at 08:58:27AM -0400, pierrelafran...@sympatico.ca 
 wrote:
 René Dudfield wrote:
 yeah, looks like somewhere the keyboard mappings aren't working.
 Likely in linux, C or SDL land.

 This is not a pygame level issue.

 Check on the SDL mailing list, or the arm platform mailing list perhaps?


 cheers,


 Hi Rene.
 What I don't understand is :
 + The alphanumeric keyboards works fine with ARM plateform and Pygame
 + The numeric keyboard works fine with ARM plateform in a text editor
 + The numeric keyboard does't works fine with ARM plateform and Pygame

 So I'm not sure what to look at yet since hardware and software is ok.
 Anyway, I'll keep you post on progress

 Thanks

 Pierre
 I would suggest writing a very small test program in C using SDL. You 
 can find some suitable example code at 
 http://www.libsdl.org/intro.en/usingevents.html

 Compile it with gcc, and use it to test and see if this problem affects 
 the underlying SDL library when python and pygame are not involved.

 That will narrow down where the problem is.

 ---
 James Paige


 Hi
 I have succeffully (with a certain amount of pain to update Ubuntu and
 ARM systems ;-) compiled a SDL program.

 On ARM system, SDL doesn't receive good event ID (if I may call it like
 this).  When pressing any digit from wired keyboard, it works fine.
 When pressing any digit from wireless keyboard, it receive : numlock
 key was pressed.

 So Pygames is out of the loop, like you all suspected (I have to learn).
  Now what do I do to progress in my investigation ?
 Can I recompile SDL with different options ?
 Is SDL relies on an other librairy ?
 Both system have libsdl version 1.2

 Thanks




 
 




Re: [pygame] Numeric wireless keyboard

2009-09-04 Thread pierrelafran...@sympatico.ca
James Paige wrote:
 On Thu, Aug 20, 2009 at 08:58:27AM -0400, pierrelafran...@sympatico.ca wrote:
 René Dudfield wrote:
 yeah, looks like somewhere the keyboard mappings aren't working.
 Likely in linux, C or SDL land.

 This is not a pygame level issue.

 Check on the SDL mailing list, or the arm platform mailing list perhaps?


 cheers,


 Hi Rene.
 What I don't understand is :
 + The alphanumeric keyboards works fine with ARM plateform and Pygame
 + The numeric keyboard works fine with ARM plateform in a text editor
 + The numeric keyboard does't works fine with ARM plateform and Pygame

 So I'm not sure what to look at yet since hardware and software is ok.
 Anyway, I'll keep you post on progress

 Thanks

 Pierre
 
 I would suggest writing a very small test program in C using SDL. You 
 can find some suitable example code at 
 http://www.libsdl.org/intro.en/usingevents.html
 
 Compile it with gcc, and use it to test and see if this problem affects 
 the underlying SDL library when python and pygame are not involved.
 
 That will narrow down where the problem is.
 
 ---
 James Paige
 
 
Hi
I have succeffully (with a certain amount of pain to update Ubuntu and
ARM systems ;-) compiled a SDL program.

On ARM system, SDL doesn't receive good event ID (if I may call it like
this).  When pressing any digit from wired keyboard, it works fine.
When pressing any digit from wireless keyboard, it receive : numlock
key was pressed.

So Pygames is out of the loop, like you all suspected (I have to learn).
 Now what do I do to progress in my investigation ?
Can I recompile SDL with different options ?
Is SDL relies on an other librairy ?
Both system have libsdl version 1.2

Thanks

-- 
Pierre Lafrance



Re: [pygame] Numeric wireless keyboard

2009-09-03 Thread pierrelafran...@sympatico.ca
Jake b wrote:
 Hi
 
 I'm compiling the code (my first prg with gcc), and doesn't find SDL.h.
  I have done a find on SDL (find -name SDL.h), without success. Where
 and how can I find this file ?  Do I have to install SDL ? (I'm assuming
 Python is using it and its there...)
 
 
 To search you can try: [ search starting on root, using insensitive case ]
 $ find / -iname SDL.h
 
 Did you try lsusb?
 $ lsusb
 
 To install sdl dev, run synaptic, and do a search for sdl, it might be
 named libsdl1.2-dev
 
 Ubuntu 9.04 is out.
 
 To include SDL.h the best way is to: follow this link:
 http://www.libsdl.org/faq.php?action=listentriescategory=3#21
 http://www.libsdl.org/faq.php?action=listentriescategory=3#21
 
 example:
 $ gcc -o hiworld hiworld.c `sdl-config --cflags --libs`
 
 -- 
 Jake

Hi
I have succedded to fix synaptic (and apt-get) and install SDL.
I compile and run the file, but it produce nothing when I move mouse or
type key (it types letter, but not the message printf should output)
But I don't know exactly how I should call the functions...!!!

Anything I should try ?

My target is to debug a keyboard not working with pygames on a ARM
platform.  I was suggested to make this little programe to debug this issue.

bellow is my code

Thanks

#include stdio.h
#include stdlib.h
#include /usr/include/SDL/SDL.h

int MySDL_WaitEvent()
{
printf(About to call SDL_WaitEvent(event)\n);
SDL_Event event;
SDL_WaitEvent(event);

switch (event.type)
{
printf(In switch/case of SDL_WaitEvent(event)\n);
case SDL_KEYDOWN:
printf(The %s key was pressed!\n,
SDL_GetKeyName(event.key.keysym.sym));
break;
case SDL_QUIT:
exit(0);
}
}


int MySDL_PollEvent()
{
printf(About to call SDL_PollEvent(event)\n);
SDL_Event event;
while ( SDL_PollEvent(event) )
{
switch (event.type)
{
printf(In switch/case of SDL_PollEvent(event)\n);
case SDL_MOUSEMOTION:
printf(Mouse moved by %d,%d to (%d,%d)\n,
event.motion.xrel, event.motion.yrel,
event.motion.x, event.motion.y);
break;
case SDL_MOUSEBUTTONDOWN:
printf(Mouse button %d pressed at (%d,%d)\n,
event.button.button, event.button.x, event.button.y);
break;
case SDL_QUIT:
exit(0);
}
}
}

int main(int argc, char *argv[])
{
printf(About to call SDL_Init()\n);
if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO)  0 )
{
//fprintf(stderr, Unable to init SDL: %s\n, SDL_GetError());
printf(Unable to init SDL: %s\n, SDL_GetError());
exit(1);
}
while(1)
{
printf(About to call MySDL_PollEvent()\n);
MySDL_PollEvent();
printf(About to call MySDL_WaitEvent()\n);
MySDL_WaitEvent();
}   //  while

printf(About to call atexit()\n);
atexit(SDL_Quit);
}

-- 
Pierre Lafrance
--



Re: [pygame] Numeric wireless keyboard

2009-09-03 Thread pierrelafran...@sympatico.ca
Hi
 I think you probably can't get those messages without creating a
 window, so try creating a window before getting events.

You were right all the way, it works now.
Thanks, I'm ready to verify my ARM platform

-- 
Pierre Lafrance
--

Brian Fisher wrote:
 I think you probably can't get those messages without creating a window,
 so try creating a window before getting events.
 
  Also, you don't want to have a separate poll and wait func, which are
 both called and both check for different messages. Both those functions
 remove messages from the queue, so if a your poll function gets a
 SDL_KEYDOWN message, it would end up throwing out the message and then
 your wait function would never receive it. Just do the Poll thing, and
 make it's switch statement do the prints for SDL_KEYDOWN as well.
 
 Anyways, once your test program works for your normal keyboard, then you
 can try it out with the wireless in order to learn how SDL is or is not
 reading that things key data, which will help you understand where the
 problem lies and how to solve it.
 
 On Thu, Sep 3, 2009 at 2:05 PM, pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca wrote:
 
 #include stdio.h
 #include stdlib.h
 #include /usr/include/SDL/SDL.h
 
 int MySDL_WaitEvent()
 {
printf(About to call SDL_WaitEvent(event)\n);
SDL_Event event;
SDL_WaitEvent(event);
 
switch (event.type)
{
printf(In switch/case of SDL_WaitEvent(event)\n);
case SDL_KEYDOWN:
printf(The %s key was pressed!\n,
SDL_GetKeyName(event.key.keysym.sym));
break;
case SDL_QUIT:
exit(0);
}
 }
 
 
 int MySDL_PollEvent()
 {
printf(About to call SDL_PollEvent(event)\n);
SDL_Event event;
while ( SDL_PollEvent(event) )
{
switch (event.type)
{
printf(In switch/case of SDL_PollEvent(event)\n);
case SDL_MOUSEMOTION:
printf(Mouse moved by %d,%d to (%d,%d)\n,
event.motion.xrel, event.motion.yrel,
event.motion.x, event.motion.y);
break;
case SDL_MOUSEBUTTONDOWN:
printf(Mouse button %d pressed at (%d,%d)\n,
event.button.button, event.button.x, event.button.y);
break;
case SDL_QUIT:
exit(0);
}
}
 }
 
 int main(int argc, char *argv[])
 {
printf(About to call SDL_Init()\n);
if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO)  0 )
{
//fprintf(stderr, Unable to init SDL: %s\n, SDL_GetError());
printf(Unable to init SDL: %s\n, SDL_GetError());
exit(1);
}
while(1)
{
printf(About to call MySDL_PollEvent()\n);
MySDL_PollEvent();
printf(About to call MySDL_WaitEvent()\n);
MySDL_WaitEvent();
}   //  while
 
printf(About to call atexit()\n);
atexit(SDL_Quit);
 }
 
 --
 Pierre Lafrance
 --
 
 





Re: [pygame] Numeric wireless keyboard

2009-08-24 Thread pierrelafran...@sympatico.ca
James Paige wrote:
 On Thu, Aug 20, 2009 at 08:58:27AM -0400, pierrelafran...@sympatico.ca wrote:
 René Dudfield wrote:
 yeah, looks like somewhere the keyboard mappings aren't working.
 Likely in linux, C or SDL land.

 This is not a pygame level issue.

 Check on the SDL mailing list, or the arm platform mailing list perhaps?


 cheers,


 Hi Rene.
 What I don't understand is :
 + The alphanumeric keyboards works fine with ARM plateform and Pygame
 + The numeric keyboard works fine with ARM plateform in a text editor
 + The numeric keyboard does't works fine with ARM plateform and Pygame

 So I'm not sure what to look at yet since hardware and software is ok.
 Anyway, I'll keep you post on progress

 Thanks

 Pierre
 
 I would suggest writing a very small test program in C using SDL. You 
 can find some suitable example code at 
 http://www.libsdl.org/intro.en/usingevents.html
 
 Compile it with gcc, and use it to test and see if this problem affects 
 the underlying SDL library when python and pygame are not involved.
 
 That will narrow down where the problem is.
 
 ---
 James Paige
 
 
Hi
I'm compiling the code (my first prg with gcc), and doesn't find SDL.h.
 I have done a find on SDL (find -name SDL.h), without success. Where
and how can I find this file ?  Do I have to install SDL ? (I'm assuming
Python is using it and its there...)

Thanks!

-- 
Pierre Lafrance
B.Ing, M.Sc.A candidate.
--
Les impatients ne perdront rien pour attendre.
Ils ne méritent que Tech-no-waiT


Re: [pygame] Numeric wireless keyboard

2009-08-20 Thread pierrelafran...@sympatico.ca
Luke Paireepinart wrote:
 Oh I should add I've been assuming you're using Linux, are you using
 Windows 7 Embedded or Windows CE or something?
 
 On Wed, Aug 19, 2009 at 9:25 PM, Luke Paireepinart
 rabidpoob...@gmail.com mailto:rabidpoob...@gmail.com wrote:
 
 Pierre,
 no, it shouldn't be hard.  If you figure out where the USB device is
 mounted (it'll be in /dev/usb1 or /deb/kb1 or some such, use lsusb
 to figure out) you can read the raw data in in Python, it's very
 easy.  You just open it as a regular file and read() your data and
 add them to Pygame's event queue.  You'd just do this every frame
 before processing events.  I'm not sure if Pygame is eating the
 keyboard input, though, so you might not be able to get access to it
 while Pygame is running.  I only do Windows development so that is
 why I am being vague, I don't know the exact way to solve this.  I
 assume you have already tested a regular keyboard and using the
 numeric keypad and that works on the ARM platform, right?  It's just
 this specific device that's not working?
 
 
 On Wed, Aug 19, 2009 at 8:36 PM, pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca wrote:
 
 Luke Paireepinart wrote:
  They're on the list, if they get a chance to reply they will.
  I'm not
  sure if it's a Pygame error or SDL or what.  Do you know what
 device
  your keyboard is mounting to?  Try using lsusb on your dev
 platform and
  again on your ARM platform, and see if they're mounting to
 different
  locations.  Then you might be able to force it to mount to the
 same
  location on the ARM platform as it does on your dev platform,
 and then
  perhaps the event parsing will be correct.  You should not be
 getting
  identical events for different keypresses though.
 
  On Wed, Aug 19, 2009 at 7:46 PM, pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
 pierrelafran...@sympatico.ca mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca wrote:
 
  Luke Paireepinart wrote:
   Sorry, no idea.  You could perhaps dig into the event
 processing
  part of
   Pygame but the hardware interface may be on the C/SDL
 side rather than
   Python.  I'm sure Rene or Lenard or someone more
 knowledgeable can
  help.
  
   On Wed, Aug 19, 2009 at 4:34 PM,
 pierrelafran...@sympatico.ca mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
   mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
 pierrelafran...@sympatico.ca mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
   mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca wrote:
  
   Luke Paireepinart wrote:
If it's working in a text editor then Linux has
 the drivers
  working on
your embedded platform.  I would first try just
 printing out
  every
   event:
   
while 1:
for event in pygame.event.get():
print event
   
If pygame is not getting the event then you
 probably will
  need to look
into mapping the device (from /dev/kb1 or whatever) so
  Pygame reads it
for event input.
   
On Wed, Aug 19, 2009 at 3:36 PM,
  pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
   mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
   mailto:pierrelafran...@sympatico.ca

Re: [pygame] Numeric wireless keyboard

2009-08-20 Thread pierrelafran...@sympatico.ca
René Dudfield wrote:
 yeah, looks like somewhere the keyboard mappings aren't working.
 Likely in linux, C or SDL land.
 
 This is not a pygame level issue.
 
 Check on the SDL mailing list, or the arm platform mailing list perhaps?
 
 
 cheers,
 
 

Hi Rene.
What I don't understand is :
+ The alphanumeric keyboards works fine with ARM plateform and Pygame
+ The numeric keyboard works fine with ARM plateform in a text editor
+ The numeric keyboard does't works fine with ARM plateform and Pygame

So I'm not sure what to look at yet since hardware and software is ok.
Anyway, I'll keep you post on progress

Thanks

Pierre



Re: [pygame] Numeric wireless keyboard

2009-08-20 Thread pierrelafran...@sympatico.ca
James Paige wrote:
 On Thu, Aug 20, 2009 at 08:58:27AM -0400, pierrelafran...@sympatico.ca wrote:
 René Dudfield wrote:
 yeah, looks like somewhere the keyboard mappings aren't working.
 Likely in linux, C or SDL land.

 This is not a pygame level issue.

 Check on the SDL mailing list, or the arm platform mailing list perhaps?


 cheers,


 Hi Rene.
 What I don't understand is :
 + The alphanumeric keyboards works fine with ARM plateform and Pygame
 + The numeric keyboard works fine with ARM plateform in a text editor
 + The numeric keyboard does't works fine with ARM plateform and Pygame

 So I'm not sure what to look at yet since hardware and software is ok.
 Anyway, I'll keep you post on progress

 Thanks

 Pierre
 
 I would suggest writing a very small test program in C using SDL. You 
 can find some suitable example code at 
 http://www.libsdl.org/intro.en/usingevents.html
 
 Compile it with gcc, and use it to test and see if this problem affects 
 the underlying SDL library when python and pygame are not involved.
 
 That will narrow down where the problem is.
 
 ---
 James Paige
 
 

Hi James
Thanks, I'll give a try tonight.
Cheers!


Pierre


[pygame] Numeric wireless keyboard

2009-08-19 Thread pierrelafran...@sympatico.ca
Hi
I have a question on keyboard, about an issue we have.

We develop a pygame application on a desktop, using Ubuntu 7.10.  But
target is an embedded ARM board, runing a custom made linux distro, base
on Debian (kernel 2.4).  So far, we managed to make application works on
both platforms.

But now we're trying final setup, using a Logitech wireless numeric
keyboard (pruduct number : 920-000217).
http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en

The Pygame application works this wireless keyboard on Ubuntu 7.10.
The Pygame application doesn't work with this wireless keyboard on
embedded ARM platform.

But, keyboard works fine on embedded ARM platform, in a text editor, or
at command line.  So the custom Linux distro detect the USB dongle and
keyboard works fine.  But only Pygame application on embedded ARM
doesn't work with  this keyboard.

Do you have any suggestion to help me debug this problem ?
Thanks


Pierre


Re: [pygame] Numeric wireless keyboard

2009-08-19 Thread pierrelafran...@sympatico.ca
Luke Paireepinart wrote:
 If it's working in a text editor then Linux has the drivers working on
 your embedded platform.  I would first try just printing out every event:
 
 while 1:
 for event in pygame.event.get():
 print event
 
 If pygame is not getting the event then you probably will need to look
 into mapping the device (from /dev/kb1 or whatever) so Pygame reads it
 for event input.
 
 On Wed, Aug 19, 2009 at 3:36 PM, pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca wrote:
 
 Hi
 I have a question on keyboard, about an issue we have.
 
 We develop a pygame application on a desktop, using Ubuntu 7.10.  But
 target is an embedded ARM board, runing a custom made linux distro, base
 on Debian (kernel 2.4).  So far, we managed to make application works on
 both platforms.
 
 But now we're trying final setup, using a Logitech wireless numeric
 keyboard (pruduct number : 920-000217).
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
 
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
 
 The Pygame application works this wireless keyboard on Ubuntu 7.10.
 The Pygame application doesn't work with this wireless keyboard on
 embedded ARM platform.
 
 But, keyboard works fine on embedded ARM platform, in a text editor, or
 at command line.  So the custom Linux distro detect the USB dongle and
 keyboard works fine.  But only Pygame application on embedded ARM
 doesn't work with  this keyboard.
 
 Do you have any suggestion to help me debug this problem ?
 Thanks
 
 
 Pierre
 
 

Hi
This is event received on Pygame apps, runing on our embedded ARM
plateform, when pressing key 1 to 9 on the wireless keyboard :
Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
Event(3-KeyUp {'key': 300, 'mod': 0})
Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
Event(3-KeyUp {'key': 300, 'mod': 0})
Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
Event(3-KeyUp {'key': 300, 'mod': 0})
Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
Event(3-KeyUp {'key': 300, 'mod': 0})
Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
Event(3-KeyUp {'key': 300, 'mod': 0})
Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
Event(3-KeyUp {'key': 300, 'mod': 0})
Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
Event(3-KeyUp {'key': 300, 'mod': 0})
Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
Event(3-KeyUp {'key': 300, 'mod': 0})
Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
Event(3-KeyUp {'key': 300, 'mod': 0})

Any idea on whats happening ?
Thanks

Pierre



Re: [pygame] Numeric wireless keyboard

2009-08-19 Thread pierrelafran...@sympatico.ca
Luke Paireepinart wrote:
 Sorry, no idea.  You could perhaps dig into the event processing part of
 Pygame but the hardware interface may be on the C/SDL side rather than
 Python.  I'm sure Rene or Lenard or someone more knowledgeable can help.
 
 On Wed, Aug 19, 2009 at 4:34 PM, pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca wrote:
 
 Luke Paireepinart wrote:
  If it's working in a text editor then Linux has the drivers working on
  your embedded platform.  I would first try just printing out every
 event:
 
  while 1:
  for event in pygame.event.get():
  print event
 
  If pygame is not getting the event then you probably will need to look
  into mapping the device (from /dev/kb1 or whatever) so Pygame reads it
  for event input.
 
  On Wed, Aug 19, 2009 at 3:36 PM, pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca wrote:
 
  Hi
  I have a question on keyboard, about an issue we have.
 
  We develop a pygame application on a desktop, using Ubuntu
 7.10.  But
  target is an embedded ARM board, runing a custom made linux
 distro, base
  on Debian (kernel 2.4).  So far, we managed to make
 application works on
  both platforms.
 
  But now we're trying final setup, using a Logitech wireless
 numeric
  keyboard (pruduct number : 920-000217).
 
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
 
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
 
 
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
 
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
 
  The Pygame application works this wireless keyboard on Ubuntu
 7.10.
  The Pygame application doesn't work with this wireless keyboard on
  embedded ARM platform.
 
  But, keyboard works fine on embedded ARM platform, in a text
 editor, or
  at command line.  So the custom Linux distro detect the USB
 dongle and
  keyboard works fine.  But only Pygame application on embedded ARM
  doesn't work with  this keyboard.
 
  Do you have any suggestion to help me debug this problem ?
  Thanks
 
 
  Pierre
 
 
 
 Hi
 This is event received on Pygame apps, runing on our embedded ARM
 plateform, when pressing key 1 to 9 on the wireless keyboard :
 Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
 Event(3-KeyUp {'key': 300, 'mod': 0})
 Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
 Event(3-KeyUp {'key': 300, 'mod': 0})
 Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
 Event(3-KeyUp {'key': 300, 'mod': 0})
 Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
 Event(3-KeyUp {'key': 300, 'mod': 0})
 Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
 Event(3-KeyUp {'key': 300, 'mod': 0})
 Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
 Event(3-KeyUp {'key': 300, 'mod': 0})
 Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
 Event(3-KeyUp {'key': 300, 'mod': 0})
 Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
 Event(3-KeyUp {'key': 300, 'mod': 0})
 Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
 Event(3-KeyUp {'key': 300, 'mod': 0})
 
 Any idea on whats happening ?
 Thanks
 
 Pierre
 
 

Hi
Thanks for your support.
How can I get in touch with these guys ?
Thanks

Pierre


Re: [pygame] Numeric wireless keyboard

2009-08-19 Thread pierrelafran...@sympatico.ca
Luke Paireepinart wrote:
 They're on the list, if they get a chance to reply they will.  I'm not
 sure if it's a Pygame error or SDL or what.  Do you know what device
 your keyboard is mounting to?  Try using lsusb on your dev platform and
 again on your ARM platform, and see if they're mounting to different
 locations.  Then you might be able to force it to mount to the same
 location on the ARM platform as it does on your dev platform, and then
 perhaps the event parsing will be correct.  You should not be getting
 identical events for different keypresses though.
 
 On Wed, Aug 19, 2009 at 7:46 PM, pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca wrote:
 
 Luke Paireepinart wrote:
  Sorry, no idea.  You could perhaps dig into the event processing
 part of
  Pygame but the hardware interface may be on the C/SDL side rather than
  Python.  I'm sure Rene or Lenard or someone more knowledgeable can
 help.
 
  On Wed, Aug 19, 2009 at 4:34 PM, pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca wrote:
 
  Luke Paireepinart wrote:
   If it's working in a text editor then Linux has the drivers
 working on
   your embedded platform.  I would first try just printing out
 every
  event:
  
   while 1:
   for event in pygame.event.get():
   print event
  
   If pygame is not getting the event then you probably will
 need to look
   into mapping the device (from /dev/kb1 or whatever) so
 Pygame reads it
   for event input.
  
   On Wed, Aug 19, 2009 at 3:36 PM,
 pierrelafran...@sympatico.ca mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
   mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
 pierrelafran...@sympatico.ca mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
   mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca
  mailto:pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca wrote:
  
   Hi
   I have a question on keyboard, about an issue we have.
  
   We develop a pygame application on a desktop, using Ubuntu
  7.10.  But
   target is an embedded ARM board, runing a custom made linux
  distro, base
   on Debian (kernel 2.4).  So far, we managed to make
  application works on
   both platforms.
  
   But now we're trying final setup, using a Logitech wireless
  numeric
   keyboard (pruduct number : 920-000217).
  
 
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
 
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
 
 
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
 
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
  
 
 
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
 
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
 
 
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
 
 http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3075cl=ca,en
  
   The Pygame application works this wireless keyboard on
 Ubuntu
  7.10.
   The Pygame application doesn't work with this wireless
 keyboard on
   embedded ARM platform.
  
   But, keyboard works fine on embedded ARM platform, in a text
  editor, or
   at command line.  So the custom Linux distro detect the USB
  dongle and
   keyboard works fine.  But only Pygame application on
 embedded ARM
   doesn't work with  this keyboard.
  
   Do you have any suggestion to help me debug this problem ?
   Thanks
  
  
   Pierre
  
  
 
  Hi
  This is event received on Pygame apps, runing on our embedded ARM
  plateform, when pressing key 1 to 9 on the wireless keyboard :
  Event(2-KeyDown {'key': 300, 'unicode': u'', 'mod': 0})
  Event(3-KeyUp {'key': 300, 'mod': 0

[pygame] Numeric keypad

2009-08-11 Thread pierrelafran...@sympatico.ca
Hi
I'm trying to get value from numeric keypad, but K_0 ... K_9 doesn't work.
Numeric value on alpha keybord works.

Can I use numeric keypad ?

ex:
if event.type == KEYDOWN and event.key == K_0 :
DoSomething()

Thanks

-- 
Pierre Lafrance
--



[pygame] Double buffer question

2009-06-13 Thread pierrelafran...@sympatico.ca
Hi
How can we explicitly use double buffer in an application using pygame ?
How can we release the double buffer when quiting application ?
Any example I can look at ?
We have a problem with that in our application and just don't know whats
happening
Thanks

-- 
Pierre Lafrance
--




Re: [pygame] Double buffer question

2009-06-13 Thread pierrelafran...@sympatico.ca
Hi
When application quit, display stay with last displayed image.  Linux is
running fine  (SSH works fine, we can reboot embedded computer) but
display is kind of freeze.  We use function pygame.display.flip() when
image need to be updated.  We dont use any flags for set_mode.  We tried
couples, but generates errors.

Thanks
Pierre

Ian Mallett wrote:
 Look at the flags for pygame.display.set_mode() here,
 http://www.pygame.org/docs/ref/display.html#pygame.display.set_mode,
 or tell us more about what the problem is specifically,
 Ian



Re: [pygame] Double buffer question

2009-06-13 Thread pierrelafran...@sympatico.ca
Hi
I'm using Pygames version 1.8.1. release.
Before debug PG source code, I would suggest you wait I debug mine ;-)
I'm farm from being the best programmer...
How do I delete the screen object ?
Any code example ?

Thanks,
Pierre

Tyler Laing wrote:
 Well, the flags that work would be dependent on your what your
 hardware supports. It sounds like you are not deleting the screen
 object before exiting the program. If I have the time, I'll take a
 look at the code later and see if I can identify the problem. What
 version of pygame are you using?

 -Tyler

 On Sat, Jun 13, 2009 at 12:23 PM, pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca pierrelafran...@sympatico.ca
 mailto:pierrelafran...@sympatico.ca wrote:

 Hi
 When application quit, display stay with last displayed image.
  Linux is
 running fine  (SSH works fine, we can reboot embedded computer) but
 display is kind of freeze.  We use function pygame.display.flip() when
 image need to be updated.  We dont use any flags for set_mode.  We
 tried
 couples, but generates errors.

 Thanks
 Pierre

 Ian Mallett wrote:
  Look at the flags for pygame.display.set_mode() here,
  http://www.pygame.org/docs/ref/display.html#pygame.display.set_mode,
  or tell us more about what the problem is specifically,
  Ian




 -- 
 Visit my blog at http://oddco.ca/zeroth/zblog