Re: Installing scratchbox on Fedora 8: PERMISSION PROBLEMS

2008-10-24 Thread Darren Enns
Eero Tamminen wrote:
 HI,

 ext Darren Enns wrote:
 Hello!  I have just sent a reply to my previous reply :)  I have 
 gotten
 a bit further by 'cheating', but since you are a Fedora user, can you
 confirm to me the things that I did (on my own) to 'fix' my problems?
 e.g. what were/are *your* permissions on the '/tmp' directory?  Did 
 you
 have to 'zap' the '/proc/sys/vm/mmap_min_addr' file too?

 BTW, I do have the i386 targets installed/configured (as per the 
 docs).
 Oh, the hoops that us non-Debian people have to jump through! :)
 
 Which version of maemo are you running?

 In the latest one you get useful messages telling you that you need to
 modify mmap_min_addr and vdso if needed.

 I haven't had any issues in Fedora 9 with Diablo.

   
 Thanks for your response (and from the others as well!).  You 
 mentioned those two issues, but what about the problem I had with 
 permissions on '/tmp'?

 I wonder whether your Scratchbox is properly set up.
 For example on my (Debian Etch) machine:
 --- outside sbox -
 $ mount |grep tmp|grep scratch
 /tmp on /home/scratchbox/users/sbuser/tmp type none (rw,bind)

 $ ls -ld /tmp/
 drwxrwxrwt 18 root root 20480 2008-10-24 15:36 /tmp/
  inside sbox -
 [sbox-maemo4-armv5: ~]  ls -ld /tmp/
 drwxrwxrwt  18 root root 20480 Oct 24 15:36 /tmp/
 --

 Is your Scratchbox /tmp bind-mounted from the system /tmp?

 (This is normally done by the Scratchbox init script at bootup)


 - Eero

Well, taking note that I had already 'manually' fixed my '/tmp' problem 
-- leaving it more of a mystery now than anything else -- to answer your 
question: yes, it does appear as though it was being mounted properly:

/tmp on /mnt/sda3/maemo/scratchbox/users/dmenns/tmp type none (rw,bind)

Thanks

Dare
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Installing scratchbox on Fedora 8: PERMISSION PROBLEMS

2008-10-23 Thread Darren Enns
Hello folks:

Today, I determined to 'once again' try to install 'scratchbox' on my 
Fedora 8 machine.  I have now tried to do so twice today, with the same 
final disappointing result when trying to run 'python2.5' (after needing 
to install it with 'apt-get'):

[sbox-N800: ~]  python2.5
/scratchbox/tools/bin/misc_runner: /tmp/cputransp_dmenns.log: Permission 
denied

Can anyone help?

Thanks

Dare
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Installing scratchbox on Fedora 8: PERMISSION PROBLEMS

2008-10-23 Thread Darren Enns
Fred wrote:
 Eero Tamminen a écrit :
 Hi,

 ext Darren Enns wrote:
 Today, I determined to 'once again' try to install 'scratchbox' on 
 my Fedora 8 machine.  I have now tried to do so twice today, with 
 the same final disappointing result when trying to run 'python2.5' 
 (after needing to install it with 'apt-get'):

 [sbox-N800: ~]  python2.5
 /scratchbox/tools/bin/misc_runner: /tmp/cputransp_dmenns.log: 
 Permission denied

 Is this file writable by you?


 - Eero
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

 Do you have SELinux enabled ?

 Fred
Hmmm...no, on my machine 'SELinux' appears to be disabled, but would 
that even have an effect 'inside' scratchbox while running the 'arm' 
emulator?

Thanks

Dare
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Installing scratchbox on Fedora 8: PERMISSION PROBLEMS

2008-10-23 Thread Darren Enns
Fred wrote:
 Darren Enns a écrit :
 Fred wrote:
 Eero Tamminen a écrit :
 Hi,

 ext Darren Enns wrote:
 Today, I determined to 'once again' try to install 'scratchbox' on 
 my Fedora 8 machine.  I have now tried to do so twice today, with 
 the same final disappointing result when trying to run 'python2.5' 
 (after needing to install it with 'apt-get'):

 [sbox-N800: ~]  python2.5
 /scratchbox/tools/bin/misc_runner: /tmp/cputransp_dmenns.log: 
 Permission denied
 Is this file writable by you?


 - Eero
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers
 Do you have SELinux enabled ?

 Fred
 Hmmm...no, on my machine 'SELinux' appears to be disabled, but would 
 that even have an effect 'inside' scratchbox while running the 'arm' 
 emulator?

 Thanks

 Dare
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

 Your error shows a path outside of scratchbox ...
 I know I have a load of hair pulled out because of SELinux so ...
 But if SELinux is disabled ...

 Fred
You probably know better than me, but I think that the 'appearance' of a 
referral to a path outside scratchbox is just an illusion i.e. 
/scratchbox doesn't actually exist at the root level on my 'real' box 
as this appears.

It is interesting that on my Debian-based 'scratchbox' environment (on a 
different PC), the '/tmp' directory does have different (more 
permissive) permissions:

sbox-CHINOOK_ARMEL: ~  ls -ld /tmp
drwxrwxrwt  7 root root 4096 Oct 23 12:16 /tmp

If there were some way for me to *really* sign into scratchbox as 
'root', maybe I could try to repair my Fedora operation.  However, I 
would imagine that there are lots of other people out there running 
scratchbox on Fedora, and can (hopefully) tell me what I have done wrong 
(or what they did to fix this).  Are you running Fedora yourself?  Can 
you check your '/tmp' permissions for me?

Thanks

Dare

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Installing scratchbox on Fedora 8: PERMISSION PROBLEMS

2008-10-23 Thread Darren Enns
Darren Enns wrote:
 Fred wrote:
 Darren Enns a écrit :
 Fred wrote:
 Eero Tamminen a écrit :
 Hi,

 ext Darren Enns wrote:
 Today, I determined to 'once again' try to install 'scratchbox' 
 on my Fedora 8 machine.  I have now tried to do so twice today, 
 with the same final disappointing result when trying to run 
 'python2.5' (after needing to install it with 'apt-get'):

 [sbox-N800: ~]  python2.5
 /scratchbox/tools/bin/misc_runner: /tmp/cputransp_dmenns.log: 
 Permission denied
 Is this file writable by you?


 - Eero
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers
 Do you have SELinux enabled ?

 Fred
 Hmmm...no, on my machine 'SELinux' appears to be disabled, but would 
 that even have an effect 'inside' scratchbox while running the 'arm' 
 emulator?

 Thanks

 Dare
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers

 Your error shows a path outside of scratchbox ...
 I know I have a load of hair pulled out because of SELinux so ...
 But if SELinux is disabled ...

 Fred
 You probably know better than me, but I think that the 'appearance' of 
 a referral to a path outside scratchbox is just an illusion i.e. 
 /scratchbox doesn't actually exist at the root level on my 'real' 
 box as this appears.

 It is interesting that on my Debian-based 'scratchbox' environment (on 
 a different PC), the '/tmp' directory does have different (more 
 permissive) permissions:

 sbox-CHINOOK_ARMEL: ~  ls -ld /tmp
 drwxrwxrwt  7 root root 4096 Oct 23 12:16 /tmp

 If there were some way for me to *really* sign into scratchbox as 
 'root', maybe I could try to repair my Fedora operation.  However, I 
 would imagine that there are lots of other people out there running 
 scratchbox on Fedora, and can (hopefully) tell me what I have done 
 wrong (or what they did to fix this).  Are you running Fedora 
 yourself?  Can you check your '/tmp' permissions for me?

 Thanks

 Dare

Followup, I decided to 'cheat' to see what I could accomplish:

1) Outside of 'scratchbox', I modified the permissions on my 'tmp' 
directory:

[EMAIL PROTECTED] dmenns]# chmod 777 /mnt/sda3/maemo/scratchbox/users/dmenns/tmp

This then allowed me (inside 'scratchbox', while signed on as a user, to 
create/modify files inside '/tmp')

2) I then ran into another problem:

mmap: permission denied (while trying to run 'python2.5')

I found this:

http://suppressingfire.livejournal.com/35277.html

So, again, outside of 'scratchbox' I did this:

echo 4096 | sudo tee /proc/sys/vm/mmap_min_addr

This now lets me run 'python2.5'!  I don't know if this is the end of my 
problems, but I am getting further!

Dare


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Installing scratchbox on Fedora 8: PERMISSION PROBLEMS

2008-10-23 Thread Darren Enns
Eero Tamminen wrote:
 Hi,

 ext Darren Enns wrote:
 Today, I determined to 'once again' try to install 'scratchbox' on my 
 Fedora 8 machine.  I have now tried to do so twice today, with the 
 same final disappointing result when trying to run 'python2.5' (after 
 needing to install it with 'apt-get'):

 [sbox-N800: ~]  python2.5
 /scratchbox/tools/bin/misc_runner: /tmp/cputransp_dmenns.log: 
 Permission denied

 Is this file writable by you?


 - Eero
Actually, it looks to me like the '/tmp' directory is the problem:

[sbox-N800: ~]  ls -ld /tmp
drwxr-xr-x  66 root root 20480 Oct 23 10:55 /tmp

[sbox-N800: ~]  touch /tmp/junk
touch: cannot touch `/tmp/junk': Permission denied

[sbox-N800: ~]  sb-conf select N800  
Traceback (most recent call last):
  File /scratchbox/tools/bin/sb-conf, line 7, in ?
exec('import %s' % p.basename(sys.argv[0]).replace('-','_'))
  File string, line 1, in ?
  File /scratchbox/tools/bin/sb_conf.py, line 155, in ?
config.select(parse_target())
  File /scratchbox/tools/lib/python2.3/sb/config.py, line 600, in select
file(restart, w).close()
IOError: [Errno 13] Permission denied: '/tmp/scratchbox-restart.dmenns'

It looks to me like errors/messages want to get 'logged' to the '/tmp' 
directory, but the configured user has no access to do so!

Dare
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Installing scratchbox on Fedora 8: PERMISSION PROBLEMS

2008-10-23 Thread Darren Enns
Vladislav Grinchenko wrote:
 Looks like you need to install targets in addition to scratchbox itself.
 You need at least i386, but most likely would need ARMEL to build native
 binaries. If you have them installed, run 'sb-menu' and select a target.
 Selecting a target configures scratchbox by making a number of symbolic
 links. 

 I run maemo SDK on Fedoras since day one with no problems so far.

 If you have any more questions, feel free to ask.

 --Vlad


 On Thu, 2008-10-23 at 12:25 -0500, Darren Enns wrote:
   
 Fred wrote:
 
 Darren Enns a écrit :
   
 Fred wrote:
 
 Eero Tamminen a écrit :
   
 Hi,

 ext Darren Enns wrote:
 
 Today, I determined to 'once again' try to install 'scratchbox' on 
 my Fedora 8 machine.  I have now tried to do so twice today, with 
 the same final disappointing result when trying to run 'python2.5' 
 (after needing to install it with 'apt-get'):

 [sbox-N800: ~]  python2.5
 /scratchbox/tools/bin/misc_runner: /tmp/cputransp_dmenns.log: 
 Permission denied
   
 Is this file writable by you?


 - Eero
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 Do you have SELinux enabled ?

 Fred
   
 Hmmm...no, on my machine 'SELinux' appears to be disabled, but would 
 that even have an effect 'inside' scratchbox while running the 'arm' 
 emulator?

 Thanks

 Dare
 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers
 
 Your error shows a path outside of scratchbox ...
 I know I have a load of hair pulled out because of SELinux so ...
 But if SELinux is disabled ...

 Fred
   
 You probably know better than me, but I think that the 'appearance' of a 
 referral to a path outside scratchbox is just an illusion i.e. 
 /scratchbox doesn't actually exist at the root level on my 'real' box 
 as this appears.

 It is interesting that on my Debian-based 'scratchbox' environment (on a 
 different PC), the '/tmp' directory does have different (more 
 permissive) permissions:

 sbox-CHINOOK_ARMEL: ~  ls -ld /tmp
 drwxrwxrwt  7 root root 4096 Oct 23 12:16 /tmp

 If there were some way for me to *really* sign into scratchbox as 
 'root', maybe I could try to repair my Fedora operation.  However, I 
 would imagine that there are lots of other people out there running 
 scratchbox on Fedora, and can (hopefully) tell me what I have done wrong 
 (or what they did to fix this).  Are you running Fedora yourself?  Can 
 you check your '/tmp' permissions for me?

 Thanks

 Dare

 ___
 maemo-developers mailing list
 maemo-developers@maemo.org
 https://lists.maemo.org/mailman/listinfo/maemo-developers
 

   
Hello!  I have just sent a reply to my previous reply :)  I have gotten 
a bit further by 'cheating', but since you are a Fedora user, can you 
confirm to me the things that I did (on my own) to 'fix' my problems?  
e.g. what were/are *your* permissions on the '/tmp' directory?  Did you 
have to 'zap' the '/proc/sys/vm/mmap_min_addr' file too?

BTW, I do have the i386 targets installed/configured (as per the docs).  
Oh, the hoops that us non-Debian people have to jump through! :)

Dare

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Installing scratchbox on Fedora 8: PERMISSION PROBLEMS

2008-10-23 Thread Darren Enns
Felipe Contreras wrote:
 On Thu, Oct 23, 2008 at 8:40 PM, Darren Enns [EMAIL PROTECTED] wrote:
   
 Hello!  I have just sent a reply to my previous reply :)  I have gotten
 a bit further by 'cheating', but since you are a Fedora user, can you
 confirm to me the things that I did (on my own) to 'fix' my problems?
 e.g. what were/are *your* permissions on the '/tmp' directory?  Did you
 have to 'zap' the '/proc/sys/vm/mmap_min_addr' file too?

 BTW, I do have the i386 targets installed/configured (as per the docs).
 Oh, the hoops that us non-Debian people have to jump through! :)
 

 Which version of maemo are you running?

 In the latest one you get useful messages telling you that you need to
 modify mmap_min_addr and vdso if needed.

 I haven't had any issues in Fedora 9 with Diablo.

   
Thanks for your response (and from the others as well!).  You mentioned 
those two issues, but what about the problem I had with permissions on 
'/tmp'?

Hmmm...I believe that I am running the newest version (4.1.1?).  To be 
honest with you, I don't recall seeing messages to that effect, but they 
could have been there -- I was almost totally relying on the 
'INSTALL.TXT' that I found on the website where I was reading how to 
install this -- and it did not mention these 'gotchas'.

Oddly, even though I made progress, I eventually hit a brick wall.  I 
was able to install Python2.5, but I was not able to compile a python 
library (i.e. PyEphem) for it -- on both the 'ARM' and 'i386' side.  I 
was forced to return to my (awkward) Debian PC installation (Kubuntu) 
and got further there (although I had 'fun' there as well).  In the end, 
though, I did not accomplish my final goal -- I was able to start the 
Xephyr desktop in scratchbox, but in doing so the graphics (window) 
totally covered my CLI -- so I was not able to see the 'error messages' 
that I was hoping to see.

As well, the 'default' Python invoked is 2.3, and I was not sure how to 
make sure that 2.5 was the one being used when I ran Python programs on 
the Xephyr desktop emulator.

Anyone have any thoughts on these other issues?

Thanks

Dare
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Help with hildon.NumberEditor: IN PYTHON

2008-04-02 Thread Darren Enns

Help please!

I am slowly learning OOP-style PyGTK code, and have recently discovered 
how 'nasty' gtk.Spinbutton looks on Maemo :(


OK, so I was just going to make some quick changed to my Python code to 
use 'hildon.NumberEditor' instead, but it is not as much a 
'drop-in-replacement' as a newbie like me requires...


 subclass the gtk.Digalog() class to create a new dialog window 
class spin_window(gtk.Dialog) :  
   value = [0] * SPIN_BUTTON_COUNT


   def hildon_set_value(self,widget,index):
  self.value[index] = widget.get_value()
  return

   # a callback to remember the values of the spin buttons.
   # the 'index' is setup when connecting the callback
   def set_value(self,widget,index):
  self.value[index] = widget.get_value_as_int()
  return

   def __init__(self,window):
   # init the parent class to create the dialog
   super(spin_window, self).__init__(set spin values, window,
   gtk.DIALOG_DESTROY_WITH_PARENT | 
gtk.DIALOG_MODAL,

   (gtk.STOCK_OK, gtk.RESPONSE_OK))

   number_editor = hildon.NumberEditor(-90,90)
   #number_editor.connect(changed,self.set_value, 0)
   #number_editor.connect(notify::value,self.set_value, 0)
   
number_editor.connect(notify::value,self.hildon_set_value,0)

   number_editor.set_value(0)
   self.vbox.pack_start(number_editor)
   self.value[0] = 0
   number_editor.show()

   label = gtk.Label('Latitude Degrees:')
   self.vbox.pack_start(label)
   #label.modify_font(pango.FontDescription(sans 30))
   label.show()

   adjustment = gtk.Adjustment(0, -90, 90, 1, 1, 1)
   spinbutton = gtk.SpinButton(adjustment,0,0)
   spinbutton.connect(changed,self.set_value, 1)
   self.vbox.pack_start(spinbutton)
   self.value[1] = 0
   spinbutton.show()
...

Notice my feeble attempts to add 'special' code for the numbereditor -- 
but the code above does not work:


TypeError: hildon_set_value() takes exactly 3 arguments (4 given)

So I am getting all confused!  It *looks* like I am using the correct 
signal value, and passing three parameters...


There are very few Python examples out on Google for me to learn the 
solution with.


Thanks

Dare
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Help with hildon.NumberEditor: IN PYTHON

2008-04-02 Thread Darren Enns
Lauro Moura wrote:
 On Wed, Apr 2, 2008 at 4:28 PM, Darren Enns [EMAIL PROTECTED] wrote:
   
  Help please!

  I am slowly learning OOP-style PyGTK code, and have recently discovered how
 'nasty' gtk.Spinbutton looks on Maemo :(

  OK, so I was just going to make some quick changed to my Python code to use
 'hildon.NumberEditor' instead, but it is not as much a 'drop-in-replacement'
 as a newbie like me requires...

   subclass the gtk.Digalog() class to create a new dialog window 
  class spin_window(gtk.Dialog) :
  value = [0] * SPIN_BUTTON_COUNT

  def hildon_set_value(self,widget,index):
 self.value[index] = widget.get_value()
 return

  # a callback to remember the values of the spin buttons.
  # the 'index' is setup when connecting the callback
  def set_value(self,widget,index):
 self.value[index] = widget.get_value_as_int()
 return

  def __init__(self,window):
  # init the parent class to create the dialog
  super(spin_window, self).__init__(set spin values,
 window,
  gtk.DIALOG_DESTROY_WITH_PARENT |
 gtk.DIALOG_MODAL,
  (gtk.STOCK_OK, gtk.RESPONSE_OK))

  number_editor = hildon.NumberEditor(-90,90)
  #number_editor.connect(changed,self.set_value, 0)
  #number_editor.connect(notify::value,self.set_value, 0)

 number_editor.connect(notify::value,self.hildon_set_value,0)
  number_editor.set_value(0)
  self.vbox.pack_start(number_editor)
  self.value[0] = 0
  number_editor.show()

  label = gtk.Label('Latitude Degrees:')
  self.vbox.pack_start(label)
  #label.modify_font(pango.FontDescription(sans 30))
  label.show()

  adjustment = gtk.Adjustment(0, -90, 90, 1, 1, 1)
  spinbutton = gtk.SpinButton(adjustment,0,0)
  spinbutton.connect(changed,self.set_value, 1)
  self.vbox.pack_start(spinbutton)
  self.value[1] = 0
  spinbutton.show()
  ...

  Notice my feeble attempts to add 'special' code for the numbereditor -- but
 the code above does not work:

  TypeError: hildon_set_value() takes exactly 3 arguments (4 given)

  So I am getting all confused!  It *looks* like I am using the correct
 signal value, and passing three parameters...

  There are very few Python examples out on Google for me to learn the
 solution with.

 

 Try replacing the argument list on the callback to

 def set_value(self, widget, index, data=None)

 Now data will take the extra data passed when the signal is received.

 Thanks for the suggestion!  It got me a bit further, but my parameter offsets 
 must be wrong.  This is what my 'hildon' callback looks like now:
   

def hildon_set_value(self, widget, index, data=None):

When I use it that way, I get complaints that 'index' is not an integer 
(which of course it is):

Traceback (most recent call last):
  File mephemeris.22.py, line 2480, in hildon_set_value
self.value[index] = widget.get_value()
TypeError: list indices must be integers

This suggests to me that I have the correct number of parameters, but 
not in the position I am expecting them in.

Dare
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


hildon widget source code: For 'hildon.TimePicker'?

2008-03-20 Thread Darren Enns
I am writing an application (PyGTK) which requires user input of 
latitude and longitude on my N800.

I suppose that I could struggle to create my own module using 
'gtk.Entry', but (perhaps) it would be a lot easier if I modified the 
source of 'hildon.TimePicker' to allow the range of values possible for 
latitude and longitude instead?

On a related note, I have had a difficult time finding *simple* generic 
PyGTK widgets for 'calendar' and 'time' picking out there.  I found a 
very long and complex piece for 'calendar' but nothing at all for 'time'.

Thanks

Dare
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Packaging Python Applications for Maemo: python-setuptools/eggs or PyPackager/debian?

2008-03-17 Thread Darren Enns
Forgive my likely confusion-of-terminology used in this email title :)

Long story short: I have ported some python libraries to the Armel/maemo 
platform, and had successfully used 'PyPackager' to create a nice 
Debian-package for those to install with.

When I asked the original coder for an opinion on this, he suggested 
making an 'easy_install' (python-setuptools/egg?) instead.

I am extremely ignorant about all of this stuff, and was quite content 
to use 'PyPackager' to solve all of my problems -- plus, however 
'consistent' it may be in the Python world to use 'eggs' and stuff like 
that, it seems to me that Debian packages allows people to install with 
a GUI interface rather than a command-line one.

Am I full of beans?  Could anyone clarify these issues for me?

Thanks

Dare
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: PyGame with GStreamer: HELP?

2008-02-25 Thread Darren Enns
Kees Jongenburger wrote:
 On Mon, Feb 25, 2008 at 3:27 AM, Darren Enns [EMAIL PROTECTED] wrote:
   
 Forgive my poor terminology, but I am writing a PyGame python program
  for my N800, and I would like to integrate some GStreamer video-playback
  ability as well (looks like the OLPC have already done this just fine).
  I want to be able to control the size/location of where the video from
  GStreamer plays on the PyGame surface -- but I have not seen any
  examples for this yet.

  Any advise?
 
 Have you seen this tutorial(it is outdated but it looks like a good
 start for you)?
 http://maemo.org/development/documentation/how-tos/3-x/howto_camera_api_bora.html
   
Thanks, yes, I had noted that link briefly, but my eyes quickly glazed 
over :)

Actually, writing a Python application to play a video is easily done in 
10 lines or less of code, so I am not sure what that tutorial is all 
about, except perhaps for providing a better GUI interface, etc..  In my 
case, I merely want to extend some minimal gstreamer code into a 
'pygame' context.  I think I will post my request in the 'pygame-users' 
mailing list too, just in case.

Dare
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


PyGame with GStreamer: HELP?

2008-02-24 Thread Darren Enns
Forgive my poor terminology, but I am writing a PyGame python program 
for my N800, and I would like to integrate some GStreamer video-playback 
ability as well (looks like the OLPC have already done this just fine).  
I want to be able to control the size/location of where the video from 
GStreamer plays on the PyGame surface -- but I have not seen any 
examples for this yet.

Any advise?

Thanks

P.S. In a perfect scenerio, it would be nice to write a PyGame program 
to *record* video from the N800 camera, and then *playback* the video in 
the same PyGame program!
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: hildon.TimePicker: HOW TO SET INITIAL TIME?

2008-02-21 Thread Darren Enns
Daniel Martin Yerga wrote:
 It means you need to use something like this:

 time_picker = hildon.Timepicker(parent)
 time_picker.set_time(hours, minutes)
   
 In the docs, it may not be easy to understand the hildon.Class.set...,
 especially if you are learning python, as in your case.
Thanks Daniel!  You are correct that this stuff is tricky for a Python 
beginner -- which I why I am usually forced to Google for an answer from 
people that have already encountered the issue/question.  However, in 
this case, Google had *no links* for anyone on this issue -- except for 
the 'syntax' page that I mentioned :(

Dare

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: PyGTK/Hildon: CLOSING CHILD WINDOW PROPERLY?

2008-02-20 Thread Darren Enns
Chris Lord wrote:
 [snip]
   
window2.connect(destroy, gtk.main_quit)
 
 [snip]

 Get rid of that line :)

 --Chris


   
Thanks, Chris!  As you say, removing the line entirely seems to work 
best of all! :)

Dare
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


hildon.TimePicker: HOW TO SET INITIAL TIME?

2008-02-20 Thread Darren Enns
OK, my ignorance is showing again...

http://maemo.org/development/documentation/apis/3-x/python-maemo-3.x/pyhildon_timepicker.html

I know how to call 'hildon.Timepicker', but the widget starts up with 
'06:00' as the initial value.  From the docs, it *looks* like I should 
be able to override this with my own initial values for 'hour' and 
'minute', but I don't know enough about Python (yet) to understand how 
to do this (from simply reading the docs and not having an example to use).

It would appear (from the docs) that I should use something like this in 
my code:

|hildon.Class.set_time(hours, minutes)

|The 'hildon.CalendarPopup' is more intuitive to me, since setting the 
initial year/month/day is part of the call to the function itself.

Thanks
|
|
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


PyGTK/Hildon: CLOSING CHILD WINDOW PROPERLY?

2008-02-19 Thread Darren Enns
I am trying to convert my command-line Python program into a 
PyGTK/Hildonized version for my Nokia N800.

I am *very new* at doing this, so the best that I can do is look for 
examples that other people have written, and this is what I have been 
using for my 'child' window, but it does not work -- since when I close 
the window my entire application ends:

def button_clicked(widget, data):
   window2 = hildon.Window()
   window2.connect(destroy, gtk.main_quit)
   label = gtk.Label(blah)
   label.set_text(You clicked on button +data+!!!)
   label.show()

   window2.add(label)
   window2.show()
   return

Can anyone tell me the 'trick' of being able to close a 'child' window 
without the entire application shutting down? 

Thanks!

Dare
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: PyGTK/Hildon: CLOSING CHILD WINDOW PROPERLY?

2008-02-19 Thread Darren Enns
Daniel Martin Yerga wrote:
 Try changing the line:
 window2.connect(destroy, gtk.main_quit)

 with:
 window2.connect(destroy, window2.destroy)

 You have more information about gtk.main_quit function in:
 http://pygtk.org/docs/pygtk/gtk-functions.html#function-gtk--main-quit

   
Yippee doodle! :)  Thanks for that!

I had been on the page that you referenced, convinced that I should not 
really be doing a 'gtk.main_quit', but I didn't see any syntax/examples 
like 'window.destroy' as you mentioned.

I would really like more tutorials written at my level of understanding :)

Dare
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers