Re: [pygtk] python-gtk3 on windows, any progress?

2014-01-03 Thread John Stowers
Also see this for windows builds

http://opensourcepack.blogspot.fr/2013/01/mypaint-and-pygi.html

John


On Fri, Jan 3, 2014 at 12:16 PM, Timo  wrote:

> op 02-01-14 20:54, Giuseppe Penone schreef:
>
>  Hi, is there any progress for an all-in-one installer of python-gtk3 on
>> windows?
>> Thanks,
>> Giuseppe.
>>
> I don't know about any official installer, but here[1] you can find an
> unofficial package. It contains many (many!) GTK libraries and is updated
> frequently. I have no personal experiences with it though.
>
> Timo
>
> [1]  https://sourceforge.net/projects/pygobjectwin32/files
>
>>
>>
>> ___
>> pygtk mailing list   pygtk@daa.com.au
>> http://www.daa.com.au/mailman/listinfo/pygtk
>> Read the PyGTK FAQ: http://faq.pygtk.org/
>>
>
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] How to use GDK locking with pygtk3 ?

2013-12-27 Thread John Stowers
No gtk functions can be called from outside the gtk thread (unless you take
the lock - although that doesnt work on windows)

This is not specific to infobar.


On Fri, Dec 27, 2013 at 4:21 PM, Ronald Sayers  wrote:

> Solved it, it was caused by "infobar" which seems have some bugs
> combined with threaded function. Parent-> start new function in a
> thread and show the infobar -> process completes -> hide the infobar
> -> spawn a new dialog window.
>
> On 26/12/2013, Ronald Sayers  wrote:
> > Hello,
> >
> > I just added a infobar into my application -
> > https://github.com/wifiextender/pshot and the uploading processes is
> > started in a new thread -
> > thread.start_new_thread(self.on_upload_clicked,
> > ("start_in_new_thread", )) . Once it reaches the point - if
> > resp_json['success']: , I get the following message, not every time
> > but it happens and closes the whole application:
> >
> > (pshot.py:5016): Gdk-WARNING **: pshot.py: Fatal IO error 11 (Resource
> > temporarily unavailable) on X server :0.
> >
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] Turning the PyGTK+ brand into something more than it currently is

2012-11-17 Thread John Stowers
>
> I think we could do a lot more with the PyGTK+ name and
> http://www.pygtk.org/ to promote gobject-introspection as our new, exciting
> solution. If nothing else, it rolls off the tongue much easier. Say it a few
> times.
>
> Anybody have any other ideas here?
>

I think the stupidest mistake in recent times was calling it pygobject
and not inheriting the pygtk name (and I objected strongly at the time
too).

I think we can still change our mind here.

But more worryingly, I am not confident promoting pygobject as a
replacement for pygtk unless it (and gtk+g-i) is supported on windows.
In my experience, in the scientific computing sphere, people still use
pygtk/gtk2 because it works on windows, gtk3 gets destroyed by qt for
the same reason.

I don't really know what to do thought.

John


> --
>   Jasper
>
>
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] pygi - gtk drawingarea doesn't work?

2012-07-16 Thread John Stowers
Works for me. Ubuntu 12.04

I think your install is broken.

John

On Mon, Jul 16, 2012 at 10:37 AM, Giuseppe Penone  wrote:
> on a clean lubuntu 1204 installation (either 32 and 64 bit), ensured that
> python-gobject and gir1.2-gtk-3.0 are installed, the attached demo doesn't
> work.
> the event 'draw' is never called.
> no any feedback on the terminal.
> at my home I have still lubuntu 1204 but also gnome and unity installed and
> there it works fine.
> can anybody help me to understand what package I'm missing?
>
>
>
>
> On Sat, Jul 14, 2012 at 7:20 PM, Giuseppe Penone  wrote:
>>
>> On my home laptop it also works fine (lubuntu 1204 64bit running but also
>> gnome-shell installed).
>> I did check only for gir1.2-gtk-3.0 at my work pc (clean lubuntu 1204 64
>> bit), so I have to check for python-gobject too, many thanks.
>> Strange that the demo didn't give any feedback to the terminal anyway
>> about the missing package, just never called the draw event.
>> Regards,
>> Giuseppe.
>>
>>
>>
>> On Sat, Jul 14, 2012 at 12:50 AM, David Ripton  wrote:
>>>
>>> On 07/13/2012 12:16 PM, Giuseppe Penone wrote:

 Hi, running the demo
 http://git.gnome.org/browse/pygobject/tree/examples/cairo-demo.py
 about the drawing area produces on my lubuntu 12.04 an empty window.
 the 'draw' event is never called, is this a bug?
>>>
>>>
>>> That demo works fine on my Ubuntu 12.04 box, and my Lubuntu 11.10 box.
>>>
>>> 'draw' should get called when the window is first exposed, and again any
>>> time the window is damaged.
>>>
>>> You have python-gobject installed, right?
>>>
>>> --
>>> David Riptondrip...@ripton.net
>>> ___
>>> pygtk mailing list   pygtk@daa.com.au
>>> http://www.daa.com.au/mailman/listinfo/pygtk
>>> Read the PyGTK FAQ: http://faq.pygtk.org/
>>
>>
>
>
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] gtk.ProgressBar color

2012-07-02 Thread John Stowers
On Mon, Jul 2, 2012 at 8:15 PM, Robert Pinsky  wrote:
> John, I tried the modify_bg call as follows:
> self.pbar.modify_bg(gtk.STATE_PRELIGHT, 
> self.pbar.get_colormap().alloc_color("yellow"))
>
> It accepted the command, but did not actually change the color.  (I saw a 
> comment in q_use_statusicon.py file you sent me that says "This does not work 
> for certain gtk/gnome themes".  That sure is disappointing.  Is there a 
> setting change I can make to the theme to make it work?

Not really, otherwise theme authors would then request a setting to
always make their themes work... That is why it is best to write
widgets oneself, to guarantee the appearance.

>
> I have not heard of cairo.  Can you give me an example of cairo code?  
> Perhaps some code fragment that I can modify into a progress bar with text?

Here are two comprehensive examples

http://zetcode.com/gui/pygtk/customwidget/
http://www.pygtk.org/articles/cairo-pygtk-widgets/cairo-pygtk-widgets.htm

Such a widget shouldn't take you more than a few hours.

John
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] gtk.ProgressBar color

2012-07-02 Thread John Stowers
Please remember to reply to the list.

OK, 10.10 is old. Don't bother with a port.

One of the many things that changed in gtk3 was how themes and stuff
like this was handled.

IIRC modifying the gtk2 progressbar background color never really
worked that well search for modify_bg here

http://www.damtp.cam.ac.uk/internal/computing/docs/public/quota-status/OLD/q-use-statusicon.py

If I was you I would write my own simple progressbar using cairo, and
color it directly.

If you upgrade your distribution and are interested in porting, see
the following

The updated docs for pygobject+gtk3 live here
http://readthedocs.org/projects/python-gtk-3-tutorial/

and a porting guide is here

https://live.gnome.org/PyGObject/IntrospectionPorting

John

On Mon, Jul 2, 2012 at 6:29 PM, Robert Pinsky  wrote:
> This is the version of gtk that was previously setup by previous developers.  
> I am open to upgrading, but I am concerned about how long it would take to 
> verify that all of our legacy code still works.  I could try it.  If I 
> upgrade to version 3, do you think my legacy could would continue to work?  
> My system is running ubuntu 10.10.
>
> I assume you are asking me this question because there is support to do this 
> in version 3, but not in version 2?
>
> Thanks,
> Robert
>
>
>
> -Original Message-
> From: John Stowers [mailto:john.stowers.li...@gmail.com]
> Sent: Monday, July 02, 2012 9:11 AM
> To: Robert Pinsky
> Cc: pygtk@daa.com.au
> Subject: Re: [pygtk] gtk.ProgressBar color
>
> Firstly, is there any reason you are not using gtk+-3 and the new
> PyGObject bindings?
>
> Pygtk is not receiving any new features now.
>
> John
>
> On Mon, Jul 2, 2012 at 6:00 PM, Robert Pinsky  wrote:
>> Hi, I am new to working in gtk.  I have an application that displays several
>> progress bars.  My manager has asked me to change the progress bar's color
>> based upon if that specific step passed or failed.  It defaults to orange
>> and he wants it to be changed to green or red once it reaches 100% to
>> indicate success or failure.  These progress bars have text on them.
>>
>>
>>
>> Is there a way to change the color of the progress bar once it reaches 100%.
>>
>>
>>
>> My application is too large to attached, so I have attached a sample
>> progress bar test application to this email.  If you could talk to this
>> example, I am sure I can make it work in my application.
>>
>>
>>
>> Thanks for your help,
>>
>> Robert Pinsky
>>
>> The IMS Company
>>
>> 2929 Imperial Hwy
>>
>> Brea, CA  92821
>>
>> (714) 264-5201
>>
>>
>>
>>
>> 
>>
>>
>> This email and any files transmitted with it are confidential & proprietary
>> to Systems and Software Enterprises, Inc. (dba IMS). This information is
>> intended solely for the use of the individual or entity to which it is
>> addressed. Access or transmittal of the information contained in this
>> e-mail, in full or in part, to any other organization or persons is not
>> authorized.
>>
>> ___
>> pygtk mailing list   pygtk@daa.com.au
>> http://www.daa.com.au/mailman/listinfo/pygtk
>> Read the PyGTK FAQ: http://faq.pygtk.org/
>
> 
>
>
> This email and any files transmitted with it are confidential & proprietary 
> to Systems and Software Enterprises, Inc. (dba IMS). This information is 
> intended solely for the use of the individual or entity to which it is 
> addressed. Access or transmittal of the information contained in this e-mail, 
> in full or in part, to any other organization or persons is not authorized.
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] gtk.ProgressBar color

2012-07-02 Thread John Stowers
Firstly, is there any reason you are not using gtk+-3 and the new
PyGObject bindings?

Pygtk is not receiving any new features now.

John

On Mon, Jul 2, 2012 at 6:00 PM, Robert Pinsky  wrote:
> Hi, I am new to working in gtk.  I have an application that displays several
> progress bars.  My manager has asked me to change the progress bar's color
> based upon if that specific step passed or failed.  It defaults to orange
> and he wants it to be changed to green or red once it reaches 100% to
> indicate success or failure.  These progress bars have text on them.
>
>
>
> Is there a way to change the color of the progress bar once it reaches 100%.
>
>
>
> My application is too large to attached, so I have attached a sample
> progress bar test application to this email.  If you could talk to this
> example, I am sure I can make it work in my application.
>
>
>
> Thanks for your help,
>
> Robert Pinsky
>
> The IMS Company
>
> 2929 Imperial Hwy
>
> Brea, CA  92821
>
> (714) 264-5201
>
>
>
>
> 
>
>
> This email and any files transmitted with it are confidential & proprietary
> to Systems and Software Enterprises, Inc. (dba IMS). This information is
> intended solely for the use of the individual or entity to which it is
> addressed. Access or transmittal of the information contained in this
> e-mail, in full or in part, to any other organization or persons is not
> authorized.
>
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] PyGTK + OpenCV

2012-02-21 Thread John Stowers
IIRC opecv starts a mainloop when create window is called.

In general, don't use threads unless you have read the FAQ and
understand what you are doing.

John

2012/2/21 Joseph S. Alcântara :
> Even if I don't use, ie, if I comment the lines where NamedWindow, ShowImage
> and WaitKey appear it freezes too.
>
> Joseph Soares Alcântara
> Engenharia da Computação - 8º semestre
> Universidade Federal do Ceará - UFC
> Sobral - Ceará
>
> +--+
> .| - °v°...A liberdade não pode ser comprada e sim     |
> .| -/(_)\..conquistada. Conquiste a sua também use   |
> .| - ^^                  G N U / L I N U X                          |
> +------+
>
>
>
> 2012/2/21 John Stowers 
>>
>> GTK is not threadsafe.
>>
>> If opencv shows a gtk mainwindow in cv.ShowImage, and that occurs in a
>> different thread to the one running gtk_main, then unpredictable
>> crashes and odd behaviour will result.
>>
>> Please check the pygtk FAQ for how to use threading and pygtk.
>>
>> I suggest displaying the image yourself in by getting the data from
>> the IPL image and copying it into a GtkImage. Or be much more careful
>> with which operations you do in which thread (i.e. cv.ShowImage,
>> cv.WaitKey)
>>
>> John
>>
>> 2012/2/21 Joseph S. Alcântara :
>> > Hi, Thank you for response to me.
>> >
>> > See, can I sand you my program to you see what I am making? I've used
>> > Thread, but seems like is not working like I want.
>> >
>> > You must run from main.py
>> >
>> > Joseph Soares Alcântara
>> > Engenharia da Computação - 8º semestre
>> > Universidade Federal do Ceará - UFC
>> > Sobral - Ceará
>> >
>> >
>> > +--+
>> > .| - °v°...A liberdade não pode ser comprada e sim     |
>> > .| -/(_)\..conquistada. Conquiste a sua também use   |
>> > .| - ^^                  G N U / L I N U X                          |
>> >
>> > +--+
>> >
>> >
>> >
>> > 2012/2/19 Hart's Antler 
>> >>
>> >> Hi Joseph,
>> >> I got GTK and OpenCV working together using threads.  This example
>> >> works
>> >> with CPython2, CPython3 and PyPy, see my blog post.
>> >> http://pyppet.blogspot.com/2011/12/rpythonic-044.html
>> >>
>> >> -brett-
>> >>
>> >> 
>> >> From: Joseph S. Alcântara 
>> >> To: pygtk@daa.com.au
>> >> Sent: Sunday, February 19, 2012 9:46 AM
>> >> Subject: [pygtk] PyGTK + OpenCV
>> >>
>> >> hi, I'm writing a application that uses pygtk and opencv. and I had a
>> >> problem. When I run the program it shows a gui. So far so good. But,
>> >> when  I
>> >> click in a menuitem, it should call a functino that runs the famous
>> >> routine
>> >> to show a video from webcam. But in this moment, the app freezes. I
>> >> have
>> >> tried to use thread, but opencv gui runs just after I call
>> >> gtk.main_quit().
>> >> What could solve my problem? Thanks.
>> >>
>> >> Estou escrevendo um programa em python, usando pygtk e opencv. Quando
>> >> rodo
>> >> o programa, aparece uma janela e até aí, beleza. Mas quando eu clico em
>> >> um
>> >> menuitem, ele deve chamar uma função que roda a famosa rotina que exibe
>> >> um
>> >> vídeo a partir da webcam. No entanto, neste momento, o programa trava.
>> >> Então, eu tentei usar Thread, mas a parte do opencv só roda depois que
>> >> eu
>> >> fecho a janela, chamando gtk.main_quit(). O que poderia ser? Obrigado
>> >> desde
>> >> já.
>> >>
>> >> Joseph Soares Alcântara
>> >> Engenharia da Computação - 8º semestre
>> >> Universidade Federal do Ceará - UFC
>> >> Sobral - Ceará
>> >>
>> >>
>> >>
>> >> +--+
>> >> .| - °v°...A liberdade não pode ser comprada e sim     |
>> >> .| -/(_)\..conquistada. Conquiste a sua também use   |
>> >> .| - ^^                  G N U / L I N U X                          |
>> >>
>> >>
>> >> +--+
>> >>
>> >>
>> >> ___
>> >> pygtk mailing list  pygtk@daa.com.au
>> >> http://www.daa.com.au/mailman/listinfo/pygtk
>> >> Read the PyGTK FAQ: http://faq.pygtk.org/
>> >>
>> >
>> >
>> > ___
>> > pygtk mailing list   pygtk@daa.com.au
>> > http://www.daa.com.au/mailman/listinfo/pygtk
>> > Read the PyGTK FAQ: http://faq.pygtk.org/
>
>
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] PyGTK + OpenCV

2012-02-21 Thread John Stowers
GTK is not threadsafe.

If opencv shows a gtk mainwindow in cv.ShowImage, and that occurs in a
different thread to the one running gtk_main, then unpredictable
crashes and odd behaviour will result.

Please check the pygtk FAQ for how to use threading and pygtk.

I suggest displaying the image yourself in by getting the data from
the IPL image and copying it into a GtkImage. Or be much more careful
with which operations you do in which thread (i.e. cv.ShowImage,
cv.WaitKey)

John

2012/2/21 Joseph S. Alcântara :
> Hi, Thank you for response to me.
>
> See, can I sand you my program to you see what I am making? I've used
> Thread, but seems like is not working like I want.
>
> You must run from main.py
>
> Joseph Soares Alcântara
> Engenharia da Computação - 8º semestre
> Universidade Federal do Ceará - UFC
> Sobral - Ceará
>
> +--+
> .| - °v°...A liberdade não pode ser comprada e sim     |
> .| -/(_)\..conquistada. Conquiste a sua também use   |
> .| - ^^                  G N U / L I N U X                          |
> +--+
>
>
>
> 2012/2/19 Hart's Antler 
>>
>> Hi Joseph,
>> I got GTK and OpenCV working together using threads.  This example works
>> with CPython2, CPython3 and PyPy, see my blog post.
>> http://pyppet.blogspot.com/2011/12/rpythonic-044.html
>>
>> -brett-
>>
>> 
>> From: Joseph S. Alcântara 
>> To: pygtk@daa.com.au
>> Sent: Sunday, February 19, 2012 9:46 AM
>> Subject: [pygtk] PyGTK + OpenCV
>>
>> hi, I'm writing a application that uses pygtk and opencv. and I had a
>> problem. When I run the program it shows a gui. So far so good. But, when  I
>> click in a menuitem, it should call a functino that runs the famous routine
>> to show a video from webcam. But in this moment, the app freezes. I have
>> tried to use thread, but opencv gui runs just after I call gtk.main_quit().
>> What could solve my problem? Thanks.
>>
>> Estou escrevendo um programa em python, usando pygtk e opencv. Quando rodo
>> o programa, aparece uma janela e até aí, beleza. Mas quando eu clico em um
>> menuitem, ele deve chamar uma função que roda a famosa rotina que exibe um
>> vídeo a partir da webcam. No entanto, neste momento, o programa trava.
>> Então, eu tentei usar Thread, mas a parte do opencv só roda depois que eu
>> fecho a janela, chamando gtk.main_quit(). O que poderia ser? Obrigado desde
>> já.
>>
>> Joseph Soares Alcântara
>> Engenharia da Computação - 8º semestre
>> Universidade Federal do Ceará - UFC
>> Sobral - Ceará
>>
>>
>> +--+
>> .| - °v°...A liberdade não pode ser comprada e sim     |
>> .| -/(_)\..conquistada. Conquiste a sua também use   |
>> .| - ^^                  G N U / L I N U X                          |
>>
>> +--+
>>
>>
>> ___
>> pygtk mailing list  pygtk@daa.com.au
>> http://www.daa.com.au/mailman/listinfo/pygtk
>> Read the PyGTK FAQ: http://faq.pygtk.org/
>>
>
>
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Updated GTK+ 2.24.5 binaries (and bundle)

2011-07-13 Thread John Stowers
On Mon, 2011-07-11 at 22:22 +0200, Dieter Verfaillie wrote:
> Hi,
> 
> Some time ago I've asked Tor how his Windows build environment
> looked like and he shared everything to be able to recreate
> it (thanks again!). The various mails we exchanged and the
> resulting directory structure and scripts can be found here:
> https://www.github.com/dieterv/legacynativebuilds [1]

I wonder if there is general interest in putting some more of these
non-unix build tools or configurations on gnome git. 

Such a repository could hold your/Tors build scripts, I personally have
some python distutils/py2exe code that builds windows binaries and
installers [1], I know you do too [2]. IIRC similar code exists for Mono
(and there there is bockbuild? or similar)

Even if the tools don't get moved to gnome git it might be beneficial to
at least put examples of their use there, similar to gnome-hello.

What do other people think, does anyone else out there have similar
painfully crafted utilities / scripts? Both windows and Mac welcome.

John

[1] https://github.com/nzjrs/python-gtk-windows-deploy
[2] https://github.com/dieterv/pygtk2exe


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Is there a gnome keyring api for PyGi?

2011-06-09 Thread John Stowers
On Thu, 2011-06-09 at 18:26 +, Leon Bogaert wrote:
> Hi all,
> 
> Is there a Gnome Keyring api for pygi? I tried something like this:
>   >> from gi.repository import GnomeKeyring
> 
> But I can't find the module to load. Does someone know if/how I can access 
> the Gnome Keyring api with python gobject introspection? 

I dont know sorry. Check the configure.ac in libgnomekeyring to see if
it supports introspection

> Or should I just use the static gnomekeyring?
> 

You cannot mix static and gi bindings (to GObject libraries) in the same
application.

John


> Regards,
> Leon
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Enabling scroll adjustments in GI

2011-06-05 Thread John Stowers

> 
> 
> PS. As a side note: how is this supposed to work with GTK3, as there is not 
> set_scroll_adjustments_signal call there it seems?

This isn't really your question, but GTK2 via GI is not supported. The
annotations in GTK2 are not up to date.

John


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] gio.Mount.get_default_location()

2011-05-30 Thread John Stowers
On Mon, 2011-05-30 at 22:37 +, Leon Bogaert wrote:
> Thanks for the help. I think I fail to understand.

Well experiment, try all the options...

Gio.MountMountFlags.NONE

--> works

hint: dir(Gio.MountMountFlags)


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] gio.Mount.get_default_location()

2011-05-29 Thread John Stowers
On Sun, 2011-05-29 at 20:49 +, Leon Bogaert wrote:
> Could somebody try this code on their machine? http://pastebin.com/Q3UqQrND

You are reading the wrong docs. The pygobject docs which bind gio are
for pre gobject-introspection times.

For gobject-introspection you must refer to the C docs (and
unfortunately guess how they map to python).

Yes I know this sucks.

The following works

http://developer.gnome.org/gio/stable/GFile.html#g-file-mount-enclosing-volume


location.mount_enclosing_volume(0, mo, None, callbackz, None)

John



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] reserve screen space / prevent overlapping

2011-05-27 Thread John Stowers
Hi,

> The Gtk.Window().get_window() returns an object of type
> gi.types.gtk.gdk.X11window. Can i do something with that?

Nope.

> I tried to get_properties() on it, but i had to pass an argument and
> could not introspect to find out which, and i don't know if the
> set_property() method would help.

get/set_property are methods of GObject. Not what you want here.

> 
> Or is there a non-Gtk way to address X and reserve screen space?

You could mess around with ctypes and xlib directly if you really
wanted. There is also python-xlib and python-xcb that might let you poke
at what you want.

John

> 
> Thanks
> Benjamin


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] reserve screen space / prevent overlapping

2011-05-26 Thread John Stowers
On Wed, 2011-05-25 at 22:50 +0200, Benjamin Trias wrote:
> Hi list,
> 
> I am trying to port from Gtk+2 to Gtk+3 using Python (PyGobject Introspection)
> 
> I am trying to find the equivalent of:
> gtk.Window.get_toplevel().window.property_change("_NET_WM_STRUT",
> "CARDINAL", 32, gtk.gdk.PROP_MODE_REPLACE, [0,0,24,0])
> 
> which i used to reserve screen space (24 pix at bottom of screen).
> 
> In Gtk+3 the Gtk.Window() does not have a "window" attribute and
> nowhere do i find the gdk_property_change() method equivalent in the
> Gdk modules (which i would expect to be Gdk.property_change(), in fact
> the property_delete() and property_get() are listed).
> 
> How to change the Gdk window properties with PyGI to reserve screen space?
> Could a binding be missing? Or do i miss some library?
> Anyone has an idea?

PyGI has removed .attributes, so the replacement to get the GdkWindow)
would be get_widget_get_window() or Gtk.Widget.get_window() from g-i.

However, property_change is annotated with (skip) in the bindings
because of the nature of the data argument - unsigned char * + length
but callers should explicitly cast other property types (that are
greater than sizeof(char)).

Its a bit of an ugly C-api, and I played with the annotations a bit. The
best g-i could do was only accept n-values between 0 - 255 and format=8.

Based on the large amount of c-code in the pygtk override for this
function, I think it might be easier to just add multiple functions to
gdk3 to replace this one

property_change_8(... const guint8 *data ...)
property_change_16(... const guint16 *data ...)
property_change_32(... const guint32 *data ...)

I suggest filing a bug with gtk.

John

> Thanks.
> Benjamin
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] ANNOUNCE: PyGTK All-in-one Installer 2.24.0

2011-05-08 Thread John Stowers
On Mon, May 9, 2011 at 11:41 AM, Stephen George
 wrote:
> Hi Dieter,
>
> Just tried to download from pyGTK main download page
> http://www.pygtk.org/downloads.html
>
> Clicked the "all-in-one installer" and  link and was taken to
> http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.22/
> Can that be changed to 2.24 ?

OK I will look into this.

>
> Now my real question, .. if I want to start playing with GObject
> introspection, is this the right installer, or should I be installing
> something else?

Nope, introspection on windows is not enabled in the installer, nor is
is tested or supported yet.

Problems elsewhere in the stack must be fixed first - like getting
gobject-introspection working on windows, building the appropriate
gir/typelibs for the windows libraries, etc.

John

> If I need to install something else, does this install and the other install
> play nice with each other and can co-exist?
>
> Thanks
> Steve
>
> On 12/04/2011 4:08 AM, Dieter Verfaillie wrote:
>>
>> We are pleased to announce release 2.24.0 of the PyGTK All-in-one
>> installer for Windows.
>>
>> More information can be found in the README file at:
>>
>> http://download.gnome.org/binaries/win32/pygtk/2.24/pygtk-all-in-one.README
>
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Pygtk toggle hide show with time interval

2011-05-06 Thread John Stowers

> 
> 
> 
> Hey thats working,
> Thanx and can you please explain me why shall I use this flush.
> I just read that gtk.gdk.flush() creates output and wait until sll
> requests are processed
> what does that actually mean

Dont write code like this. 

1) time.sleep() blocks the mainloop and your program basically stops
(which is useless and not a good idea in the real world)
2) flush() forces the main loop to run until events are processed, thus
showing your window. But then it stops again during sleep. See #1

If you want to achieve delays in a gtk program use
glib/gobject.timeout_add

John

> 
> 
> 
> Regards.
> 
> Cristian
> 
> Regards
> 
> phanindra
> 
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] [ANNOUNCE] PyGTK 2.24.0

2011-04-01 Thread John Stowers
Hi All,

A new stable development release of the Python bindings
for GTK-2 has been released.

The new release is available from ftp.gnome.org and its mirrors
as soon as its synced correctly:

http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/

Note:
PyGTK 2.24 supports the GTK-2.24 API. New users wising to develop
Python applications using GTK are recommended to use the
GObject-Introspection features available in PyGObject.
Existing authors of PyGtk applications are also
recommended to port their applications to PyGObject
if they wish to take advantage of new features appearing
in GTK-3 and beyond. More information on PyGObject
and GObject-Introspection can be found at;

http://live.gnome.org/PyGObject

PyGTK-2.24 will be the final major release of PyGTK. Additional bug-fix releases
may appear when necessary to maintain compatibility and stability with the
GTK-2.24 series.

What's New:
New features since PyGtk-2.22.0
 * Wrap new API added in GTK/GDK 2.23/2.24
 * Many windows build fixes
 * Many documentation updates and improvements
 * Many bug fixes

Bug reports, as always, should go to Bugzilla; check out
http://pygtk.org/developer.html and http://pygtk.org/feedback.html for
links to posting and querying bug reports for PyGTK.

John Stowers
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] gtk from macport with or without x11 ?

2011-03-30 Thread John Stowers
On Wed, 2011-03-30 at 01:36 +0200, laguillaumie sylvain wrote:
> so
> 
> no success :(
> 
> i updated the Portfile of macport and i tried to build pygtk 2.23.1 and .2...

Please contact the macports or gtk-osx mailing list.

John


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] gtk from macport with or without x11 ?

2011-03-29 Thread John Stowers
On Wed, 2011-03-30 at 00:10 +0200, laguillaumie sylvain wrote:
> hi
> 

Please keep the mailing list CC'd

> so, i don t think it s defined...
> 
> grep GDK_WINDOWING_QUARTZ 
> /opt/local/var/macports/software/gtk2/2.24.3_0+no_x11+quartz/opt/local/lib/gtk-2.0/include/gdkconfig.h
> 
> return:
> #define GDK_WINDOWING_QUARTZ
> 
> ...
> 
> i ll search if i have a build arg to add or edit it directly...

I suggest you file a bug against gtk and email the gtk osx mailing list
directly.

John

> 
> Le 29 mars 2011 à 23:54, John Stowers a écrit :
> 
> > GDK_WINDOWING_QUARTZ
> 


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] gtk from macport with or without x11 ?

2011-03-29 Thread John Stowers
On Tue, 2011-03-29 at 01:36 +0200, laguillaumie sylvain wrote:
> hi
> 
> i reinstalled macport and rebuilded all gtk2, gstreamer... with no_x11 and 
> +quartz, this time the app start normally
> 
> but still the problem with the xid
> 
> i spend hours on google without finding help...
> 
> so, in linux i use the gtk.gdk.Window.xid
> on win 32 the handle (works fine too)
> 
> and osx, i tried the nsview but i get :
> 
> Traceback (most recent call last):
>   File "gmediafinder.py", line 1304, in on_drawingarea_realized
> self.sink.set_xwindow_id(self.movie_window.window.nsview)
> AttributeError: 'gtk.gdk.Window' object has no attribute 'nsview'

According to
http://git.gnome.org/browse/pygtk/tree/gtk/gdk.override#n894

This should work if GDK_WINDOWING_QUARTZ is defined. Perhaps there is a
problem with how this is built. Please investigate if
GDK_WINDOWING_QUARTZ is defined in the build process.

John


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] [ANNOUNCE] PyGTK 2.23.2

2011-03-24 Thread John Stowers
Hi All

A new unstable development release of the Python bindings
for GTK-2 has been released.

The new release is available from ftp.gnome.org and its mirrors
as soon as its synced correctly:

 http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.23/

Note:
PyGTK 2.24 will be the last release in the PyGTK series. It
will support the GTK-2.24 API. New users wising to develop
Python applications using GTK are recommended to use the
GObject-Introspection features available in PyGObject.
Existing authors of PyGtk applications are also
recommended to port their applications to PyGObject
if they wish to take advantage of new features appearing
in GTK-3.0 and beyond. More information on PyGObject
and the GObject-Introspection features can be found at;

http://live.gnome.org/PyGObject

What's New:
New features since PyGTK-2.23.1
 * Many more documentation improvements and updates (Dieter Verfaillie)
 * Glade support can be disabled at build time (optional, no change to
default behavior)
New features since PyGTK-2.23.0
 * Many many documentation improvements and updates (Dieter Verfaillie)
New features since PyGTK-2.22.0
 * Many windows build fixes (Dieter Verfaillie, #371317)
 * Fix mainloop hangs with signalfd (Philippe, Juha, Dieter, #638780, #640738)
 * Fix TypeError when running tests (Pacho, Gilles, Tomeu, Martin,
Dieter, #636589)
 * gtk.gdk.GC.set_clip_mask() should accept None (Dieter, #638994)
 * gtk.AboutDialog.set_program_name() should accept None (Dieter)
 * Add "import gtk; gtk.require('2.0')" statements to the examples (Dieter)
 * Add GTK-2.24 API (John Stowers)

Bug reports, as always, should go to Bugzilla; check out
http://pygtk.org/developer.html and http://pygtk.org/feedback.html for
links to posting and querying bug reports for PyGTK.

John Stowers
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Compiling Pango from git needs GTK-Doc which needs docbook DTD

2011-03-23 Thread John Stowers
On Thu, 2011-03-24 at 11:10 +1300, Greg Ewing wrote:
> It turns out that the currently released version of Pango
> is not quite up to snuff -- it's missing some annotations
> on method arguments that leads gobject introspection astray.
> 
> It looks like these have been fixed in the git repository,
> so I tried to check it out and compile it, and discovered
> that it wants GTK-Doc.
> 
> So I got GTK-Doc and tried to compile that, and it complained
> about not being able to find an XML DTD for DocBook.
> 
> What do I need to install to get that? The only thing I've
> been able to find for download called 'docbook' is just a
> zip file with no indication of where to install stuff.

Is this on Linux? If so I recommend just using JHbuild (from git, not
your distro packages) to take care of the dependencies for you...

On Linux the docbook package contains the docbook dtd that it is looking
for.

Looking at the gtk-doc configure and m4 files it looks for catalogues
via indirection through

/etc/xml/catalog

but it also looks like you can specify the path to these catalogues or
the dtd directly, via configure args.

At first I though you might have been missing

http://git.gnome.org/browse/gnome-common
http://git.gnome.org/browse/gnome-doc-utils/

but it looks like gtk-doc ships the gnome-doc-utils m4 file, so maybe
that isn't the problem after all.

John


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] How to get default colours in Gtk 3?

2011-03-22 Thread John Stowers
On Tue, 2011-03-22 at 19:29 +1300, Greg Ewing wrote:
> With Gtk 2 I was using the following technique to find out
> the default foreground and background colours for a selection:
> 
> from gtk import Style
> s = Style()
> foreground = s.fg[3]
> background = s.bg[3]
> 
> However, with Gtk 3 via gi, s.fg is coming up as an empty
> list.
> 
> Can anyone suggest an alternative way of going about this?

In Gtk-3 GtkStyle was replaced with GtkStyleContext

http://library.gnome.org/devel/gtk/stable/GtkStyle.html

But AFAIR some compatibility was retained, so I thought this should have
worked

I do remember something like this in past requiring the widget to first
be realized/shown before the style information was available

John

> 
> Thanks,
> Greg
> 
> 
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] How to call methods with output parameters using gobject introspection?

2011-03-22 Thread John Stowers
On Tue, 2011-03-22 at 21:28 +1300, Greg Ewing wrote:
> How are you supposed to call the PangoLayout.get_pixel_size()
> method using gobject introspection?
> 
> The C signature is
> 
> void pango_layout_get_pixel_size(
>PangoLayout *layout, int *width, int *height);
> 
> Using the old Python bindings, you called it with no parameters
> and it returned a 2-tuple.
> 
> But the gi version seems to expect 2 parameters and returns
> None. What's more, it seems to expect them to be *numbers*.
> 
> Since most numbers in Python are immutable, how the heck
> is this supposed to work?

In general we try to be compatible with PyGTK, if the syntax is
different to what used to work then it is a bug. But looking at

http://git.gnome.org/browse/pango/tree/pango/pango-layout.c#n2725

Shows the parameters, correctly, annotated with (out) which means that
it should just work. In some cases we do write python shims (overrides)
to make the introspection API identical to the old pygtk API, but it
looks like it was not necessary in this case

http://git.gnome.org/browse/pygobject/tree/gi/overrides/Pango.py#n40

So, no idea why it is not magically working for you. What versions of
everything are you using?

John

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] python and GTK+-3 - possible?

2011-03-15 Thread John Stowers
On Tue, 2011-03-15 at 22:31 -0400, John Lumby wrote:
> R Park wrote:
> >
> > From what I understand, pygobject can only provide GTK3 and pygtk can
> > only provide GTK2. So if your code includes 'import pygtk' then that
> > is by definition gtk2 you are using, and if instead you have 'from
> > gi.repository import Gtk' then that can only be Gtk3.

Almost, for the bulk of my answer see below. However, there is some
crusty subtlety when calling

>>> import pygtk

pygtk.py (what gets executed above) lives in pygobject. This, for
historical reasons lived there to help easy the pain of the pygtk-1 ->
pygtk-2 transition. This is why you see pygtk.require(2.0) at the top of
some programs (although this has not been necessary for some time).

pygtk.py does some things with sys.path to choose which native code gets
imported. We might start requiring people to call pygtk.require(2.0)
again in future, depending on the parallel installation capabilities of
the static parts of pygobject, however I think that discussion is
ongoing, and not something you should worry about (Dieter, J5, is that
correct, I have been AFK for a while)

> >
> 
> Many thanks.
> 
> Actually I think it's possible that
>  'from gi.repository import Gtk'
> may give you GTK+2;  I think it depends on which (version of) GTK
> was introspected into whichever gi repository your python finds.
> Not suggesting this is what you want - just my experience.

This is not correct. One can choose the version of the typelib to be
loaded; e.g.

>>> import gi
>>> gi.require_version("Gtk", "2.0")
>>> from gi.repository import Gtk
>>> Gtk.Switch
--> Fails

But the annotations are most up to date in the Gtk-3 overrides, so I
would suggest letting it choose the most recent typelib by default, that
is

>>> from gi.repository import Gtk
>>> Gtk.Switch
---> Works

And gives you gtk+-3. 

If you want to use gtk+-2 I suggest you stick with pygtk.

John

> 
> > Check the source to my app, it's gtk3 and uses some of the new gtk3
> > widgets (such as ComboBoxText for example):
> >
> > https://github.com/robru/gottengeography
> 
> Thanks again.That helped.   I got mine working now  (with a GTK+3 Light 
> Switch)
> 
> Cheers,  John
> 
> 
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] problems porting pygtk app to pygobject on Fed. 14

2011-03-14 Thread John Stowers

> from gi.repository import Gdk, Gtk, GObject
> ...
> class ToggleBut(Gtk.Window):
> def __init__(self, parent=None):
> self.mywindow = Gtk.Window.__init__(self)
> self.myobject = GObject.__init__() 

What idiom is this? Why are you constructing self.myobject that way? Why
are you not just super() or chaining up in __init__(self)?


> 
> After that, things fell into place.
> 
> Now I still need some help if poss:
> 
> I took this same python app unchanged to another system where I have built
> packages myself.It is python 2.6,  but all other packages are the
> latest versions as of very recently. 
> 
> The original pygtk form of the app works fine there, but this pygobject-form 
> fails like so:
> 
> ERROR:root:Could not find any typelib for Gdk
> ERROR:root:Could not find any typelib for Gtk
> Traceback (most recent call last):
>   File "/home/lumby/pythonapps/togglegobj.py", line 24, in 
> from gi.repository import Gdk, Gtk, GObject
> ImportError: cannot import name Gdk
> 
> 
> Any idea why it can't find Gdk and what I could look for to fix it?
> I have stared at install directories and can't see anything amiss  -
> e.g. the set of files in and under:
> F14's   /usr/lib/python2.7/site-packages/gtk-2.0/gi
> custom-sys's/usr/local/lib/python2.6/site-packages/gtk-2.0/gi
> appear to be the same (names,  not content)
>  except for a couple of libtool xxx.la's in the custom one.
> I can easily upgrade python to 2.7 if that might help but would prefer to have
> some idea what I am looking for.

No idea. Many many things could have gone wrong. Check where the
typelibs are installed and check if they can be found with the
GI_TYPELIB_PATH environment variable (IIRC). Poke about by
printing .__file__ of things which successfully import.

It feels like you are changing far too many things at once, and there is
many subtle ways the libraries could be interacting poorly.

I would start again, chuck everything is ~/bin/ and slowly make it work
one at a time by setting LD_LIBRARY_PATH, PYTHONPATH, GI_TYPELIB_PATH,
etc.

Or just use JHbuild to sandbox everything.

Good luck,

John


> 
> Cheers,John Lumby
> 


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] problems porting pygtk app to pygobject on Fed. 14

2011-03-13 Thread John Stowers
On Sun, 2011-03-13 at 18:34 -0400, John Lumby wrote:
> I am having trouble trying to port a pygtk/python2.6/linux-fedora-14
> application to use pygobject.
> 
> My first try was to convert using pygi-convert.sh, and when I ran that
> converted .py,  I got

Firstly, F-14 is probably too old. This pygobject+g-i has moved a lot in
the last few months.

pygi-convert is a hint only, it should not produce working code out of
the box.

With that said, my experiences are
* on F15/Natty pygobject/g+i works well
* use glib (i.e. static bindings) and GObject (from gi.repository import
GObject)
* callbacks and user_data optional parameters are the usual source of
pain
* use named arguments to constructors

Here is a new app written in pygobject+g-i

https://github.com/nzjrs/gnome-tweak-tool

John

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] [ANNOUNCE] PyGTK 2.23.1

2011-03-11 Thread John Stowers
Hi All

A new unstable development release of the Python bindings
for GTK-2 has been released.

The new release is available from ftp.gnome.org and its mirrors
as soon as its synced correctly:

 http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.23/

Note:
PyGTK 2.24 will be the last release in the PyGTK series. It
will support the GTK-2.24 API. New users wising to develop
Python applications using GTK are recommended to use the
GObject-Introspection features available in PyGObject.
Existing authors of PyGtk applications are also
recommended to port their applications to PyGObject
if they wish to take advantage of new features appearing
in GTK-3.0 and beyond. More information on PyGObject
and the GObject-Introspection features can be found at;

http://live.gnome.org/PyGObject

What's New:
New features since PyGTK-2.23.0
 * Many many documentation improvements and updates (Dieter Verfaillie)
New features since PyGTK-2.22.0
 * Many windows build fixes (Dieter Verfaillie, #371317)
 * Fix mainloop hangs with signalfd (Philippe, Juha, Dieter, #638780, #640738)
 * Fix TypeError when running tests (Pacho, Gilles, Tomeu, Martin,
Dieter, #636589)
 * gtk.gdk.GC.set_clip_mask() should accept None (Dieter, #638994)
 * gtk.AboutDialog.set_program_name() should accept None (Dieter)
 * Add "import gtk; gtk.require('2.0')" statements to the examples (Dieter)
 * Add GTK-2.24 API (John Stowers)

Bug reports, as always, should go to Bugzilla; check out
http://pygtk.org/developer.html and http://pygtk.org/feedback.html for
links to posting and querying bug reports for PyGTK.

John Stowers
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Gtk 3 will be stable?

2011-03-11 Thread John Stowers
On Fri, 2011-03-11 at 10:38 +0100, danieleisca wrote:
> Hi all,
> I saw that pygtk 2.22 do not solved problems with the native GdkPixbuf 
> loader since image loading time is too long on Windows. This is why 
> practically Gtk graphic software is not portable except that you use a 
> dated Gtk version. The bug is well known, but remains unsolved.
> Then I would ask you when we have a stable release?

I will do another 2.23.x beta today. Stable will be by April, along with
the rest of the GNOME stack.

What you describe is probably a gtk bug, not a pygtk one.

John

> 
> Regards!
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] gtk/pygobject api question

2011-03-04 Thread John Stowers
On Fri, 2011-03-04 at 21:32 +0100, Tom Cato Amundsen wrote:
> It is explained somewhere how the API will change from pygtk to
> gtk+pygobject? I'm trying to port GNU Solfege using python-gobject
> 2.27.91 and gobject-introspection 0.10.3 in ubuntu natty.
> 
> With pygtk I would do this:
>sizegroup = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
> 
> With gtk + pygobject it requires two lines:
>sizegroup = Gtk.SizeGroup()
>sizegroup.set_mode(Gtk.SizeGroupMode.HORIZONTAL)
> 
> I have had the impression that using python and pygobject would make
> the python api closer to C. On
> http://library.gnome.org/devel/gtk/stable/GtkSizeGroup.html I can see
> that gtk_size_group_new take one argument, the GtkSizeGroupMode, so I
> would expect I could set the direction (horizontal/vertical) in the
> constructor. But I can't.
> 
> Is the gtk+pygobject pretty stable now? Will it become closer to the
> pygtk api, or should I just port to what we have now? There are other
> changes too, like Box.pack_start that don't have optional arguments
> any more. Is this what it will be when it is final, or can I expect
> optional arguments in methods like in pygtk?

Maximizing compatibility with PyGTK is a goal, or minimizing the porting
effort where possible, so if this is missing please file bugs against
PyGObject (component: introspection)

I have also CC'd python-hackers mailing list as this is where discussion
relating to pygobject and gobject-introspection is preferred.

John

> 


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] PyGtk for Python 3?

2011-03-04 Thread John Stowers
On Fri, 2011-03-04 at 11:25 +1300, Greg Ewing wrote:
> jors wrote:
> 
> > There won't. You will have to use Python GObject Introspection instead.
> 
> Does this exist in a usable form yet?
> 
> The web site says "At this point we need documentation, stability
> and users!" which sounds like it's not ready for prime time yet.

I have been porting my software over for the last week and it does seem
to work well now. The pygi-convert.sh makes a number of the more boring
changes automatically.

In practice, the holdup is that PyGObject-2.28.X is not yet released nor
in any current distribution yet.

John

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] PyGtk for Python 3?

2011-03-04 Thread John Stowers
On Fri, 2011-03-04 at 13:29 +0100, Marko Tasic wrote:
> On Linux everything works as expected, but there is no Python 3.x
> build for Windows, so I'm forced to use ether Python 2.x build or
> "old" PyGtk.

Forced is a harsh word. We will get to windows support for
gobject-introspection in good time.

John


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] [ANNOUNCE] PyGTK 2.23.0

2011-02-21 Thread John Stowers
Hi All

A new unstable development release of the Python bindings
for GTK-2 has been released.

The new release is available from ftp.gnome.org and its mirrors
as soon as its synced correctly:

 http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.23/

Note:
PyGtk 2.24 will be the last release in the PyGtk series. It
will support the GTK-2.24 API. New users wising to develop
Python applications using GTK are recommended to use the
GObject-Introspection features available in PyGObject.
Existing authors of PyGtk applications are also
recommended to port their applications to PyGObject
if they wish to take advantage of new features appearing
in GTK-3.0 and beyond. More information on PyGObject
and the GObject-Introspection features can be found at;

http://live.gnome.org/PyGObject

What's New:
New features since PyGtk-2.22.0
 * Many windows build fixes (Dieter Verfaillie, #371317)
 * Fix mainloop hangs with signalfd (Philippe, Juha, Dieter, #638780, #640738)
 * Fix TypeError when running tests (Pacho, Gilles, Tomeu, Martin,
Dieter, #636589)
 * gtk.gdk.GC.set_clip_mask() should accept None (Dieter, #638994)
 * gtk.AboutDialog.set_program_name() should accept None (Dieter)
 * Add "import gtk; gtk.require('2.0')" statements to the examples (Dieter)
 * Add GTK-2.24 API (John Stowers)

Bug reports, as always, should go to Bugzilla; check out
http://pygtk.org/developer.html and http://pygtk.org/feedback.html for
links to posting and querying bug reports for PyGTK.

John Stowers
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] ANNOUNCE: PyGTK All-in-one Installer 2.22.6

2011-01-19 Thread John Stowers
On Wed, 2011-01-19 at 23:02 +0100, Tim Lebedkov wrote:
> Hello Dieter,
> 
> I am really sorry. I have formulated my question so that you have
> completely misunderstood it.
> I hope that at least your explanations could be useful for somebody else.
> 
> Let me explain my concerns in detail. In Npackd (package manager) I
> download packages from different
> locations like 
> http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
> To check that the download was OK, I compute the SHA1 checksum of the file.
> For this to work a file placed at a specific URL should never be changed.
> 
> So here is my plea: don't overwrite files, but put new installers
> under a different URL and don't delete old installers.
> Examples:
> http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
> http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-2.win32-py2.7.msi
> http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-3.win32-py2.7.msi

Old installers are *never* deleted nor silently replaced on the GNOME
site. In fact that was the reason for the creation of the -1 variant; to
fix packaging bugs in windows, no PyGObject code was changed so we didnt
think it necessary to make a new PyGObject release with a version bump.

I'm think Dieter misunderstood your question and offered an incorrect
reply. See below.

> 
> Thank You
> 
> --Tim
> 
> On Wed, Jan 19, 2011 at 10:01 PM, Dieter Verfaillie
>  wrote:
> > On 19/01/2011 20:52, Tim Lebedkov wrote:
> >> am I right that files like
> >> http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.26/pygobject-2.26.0-1.win32-py2.7.msi
> >> are just overwritten with a newer version of the installer?
> >
> > Correct. We do not (yet?) detect the presence of the separate pycairo,
> > pygobject, pygtk, pyrsvg, pygoocanvas and pygtksourceview2 packages.
> > Neither the .exe nor .msi installers.

We don't detect if these have been *installed* on the users system. But
that is orthogonal to your questions (I think). If the all-in-one
installer requires new versions of the component installers then this
will be noted in the release notes and the README.

As mentioned in the release notes, this installer only contains updated
gtk+ runtime, and updated glade installers. PyG* remain unchanged so no
installers were ever silently replaced on the GNOME servers.

So in conclusion, if the all-in-one installer requires newer component
installer for any other PyG* packages, those component installers will
be uploaded to the GNOME servers with a new filename, and the README and
release notes of the all-in-one installer will make this clear.

Hope that clears things up.

John



> This rather unfortunate behavior
> > is documented in the README [1] in the "Migrating from
> > PyGTK+PyGObject+PyCairo packages" section.
> >
> > I guess detecting the separate .exe installers could be done by checking
> > for either or both the "?-wininst.log"/"Remove?.exe" files in Python's
> > installation directory (this idea would need some serious testing though).
> > Detecting the separate .msi installers is a whole other matter: in this case
> > distutils' bdist_msi command does not create the "?-wininst.log" or
> > "Remove?.exe" files. Detection by windows installer product codes might
> > work for known previous releases but we simply can't predict every
> > future release that's going to be created. That and maintaining such a
> > table of product codes would be a maintenance nightmare...
> >
> > Even if the aio installer would grow such a detection method, we cannot
> > provide the same for the inverse situation without seriously hacking
> > about with distutils' bdist_wininst and bdist_msi commands. So it is
> > equally possible to overwrite the aio installers' files by executing
> > on of the separate .exe or .msi installer...
> >
> >> Would it be possible to leave the old installers at their place and
> >> put the new under other names?
> >
> > Not really, the all-in-one installer repackages the content of the separate
> > .msi installers exactly as they are. That's the whole point of the aio
> > installer exercise, really (and was the tedious part to get right).
> >
> > To clarify things, both 2.22.5 and 2.22.6 include the following
> > extension modules (replace the ? with 6 or 7):
> > pycairo-1.8.10.win32-py2.?.msi
> > pygobject-2.26.0-1.win32-py2.?.msi
> > pygtk-2.22.0-1.win32-py2.?.msi
> > pygtksourceview-2.10.1.win32-py2.?.msi
> > pygoocanvas-0.14.2.win32-py2.?.msi
> > pyrsvg-2.32.1.win32-py2.6.msi
> >
> > It is however true that the -1 revision part of the version string
> > for pygtk and pygobject did not show in the "Custom Setup" page when
> > installing. I've fixed that in the build description file [2] and
> > the next version will be more clear about what package versions are
> > included in the UI.
> >
> > Regards,
> > Dieter
> >
> > [1] https://github.com/dieterv/pygtk-inst

Re: [pygtk] ANNOUNCE: PyGTK All-in-one Installer 2.22.5

2010-12-27 Thread John Stowers
On Sun, 2010-12-26 at 22:56 +0100, Dieter Verfaillie wrote:
> On 26/12/2010 21:05, Shin Guey Wong wrote:
> > This all in one installer is great for developer. However, the installer
> > contains lots of development files(header, static library, docs..etc) which
> > doesn't need by a user who just want to install pygtk with gtk-runtime to
> > run pygtk application.
> 
> Ah, but in my opinion developers are the intended audience not only for
> the all-in-one installer but also for the per package pyg* installers,
> the gtk+ binaries (and bundle), any other python extension installer
> ever released as .exe, .msi, .egg or source code and yes, even the
> Python installer.

Fully agree with Dieter here. This all-in-one installer is intended for
developers. To distribute programs to users py2exe actually works very
well once you have it up and running, and I suggest people use that to
distribute their python applications.

Of course some things could be done to make py2exe'ing pyGTK
applications easier, and Dieter and I have discussed what tools or
utilities we could ship with PyGObject to accomplish this. Work is
ongoing, but I suspect now that we can assume developers will be
generating their py2exe installers via this new all-in-one installer we
can make some assumptions about file locations, etc, which will
streamline the process.

John

> 
> Viewing the Python interpreter windows installer as a development tool
> and not something an end user of our applications should ever need to
> touch might come as a surprise for many people and has for a long time
> been just a "feeling" for me. Until I discovered the following comment
> by Mark Hammond [1]:
> "My take is still that Python is a tool, not an app.  People
>  writing an app they with to distribute using Python should include
>  Python in their package (ie, not rely on an installed version) and
>  these apps should conform with the guidelines."
> 
> This comes from http://bugs.python.org/issue1284316, msg104384.
> 
> If Python is to be considered a development tool then by definition so
> are extension modules (like PyGTK). So now we have discovered why we
> have tools like py2exe. Distributing a py2exe'd application is a breeze
> (once you get the hang of it) and not only saves end users a lot of
> time, it potentially saves you a lot of support calls [2]. Remember,
> end users are rarely interested in investing time on the technical side
> of things. They just want to use our shiny applications :)
> 
> > For now, I will still use this to install on
> > development machine. But for deployment, I will recommend user to install
> > gtk-runtime from
> > http://gtk-win.sourceforge.net/home/index.php/Downloadswhich only
> > 7.46MB, then install pygtk/pycairo/pygobject which less than 2MB.
> > (10MB vs 32MB which is quite a big different. Honestly, I'm not that concern
> > on the installer size but the installing time for gtk with development files
> > take much longer. I have user asking me why it takes so long time to install
> > the gtk with development file)
> 
> Please continue to do whatever is required for your projects, the aio
> installer is offered simply as an alternative. I just wanted to clarify
> why it has been built the way it is :)
> 
> mvg,
> Dieter
> 
> [1] Yes, the same Mark Hammond that's praised on the last page of
> the Python installer: "Special Windows thanks to: Mark Hammond, without
> whose years of freely shared Windows expertise, Python for Windows
> would still be Python for DOS."
> 
> [2] For a start, simply look at the recent rise in problems with
> multiple gtk+ runtime versions on the PATH environment variable...
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] PyGTK for Python 3

2010-12-03 Thread John Stowers
On Fri, 2010-12-03 at 10:33 +0100, Davide Iosca wrote:
> Some News about PyGTK porting to Python 3.x ? 

I do not plan to do so. PyGTK will be maintained to work with gtk
+-2.22/24 and Python 2.X indefinitely.

PyGObject + gobject-introspection is the recommended way to develop
Python applications against gtk+-3.X and Python 3.x.

John
 
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] dynamic treestore

2010-11-27 Thread John Stowers
On Sun, 2010-11-28 at 00:48 -0600, alex goretoy wrote:
> This is essential what I am looking to do, but it doesn't work. I
> appreciate your response.

import gtk

ts = gtk.ListStore(object)
ts.append((["a","b"],))
ts.append((["c","d"],))

tv = gtk.TreeView(ts)

r = gtk.CellRendererText()
c = gtk.TreeViewColumn("0", r)
c.set_cell_data_func(r,
lambda col, cell, model, iter_: cell.set_property("text",
model.get_value(iter_, 0)[0])
)
tv.append_column(c)

r = gtk.CellRendererText()
c = gtk.TreeViewColumn("1", r)
c.set_cell_data_func(r,
lambda col, cell, model, iter_: cell.set_property("text",
model.get_value(iter_, 0)[1])
)
tv.append_column(c)

w = gtk.Window()
w.add(tv)
w.show_all()

gtk.main()

The lambdas are a bit ugly, I was in a hurry.

John

> 
> 
> >>> gtk.TreeStore( str * 5 )
> Traceback (most recent call last):
>   File "", line 1, in 
> TypeError: unsupported operand type(s) for *: 'type' and 'int'
> >>> gtk.TreeStore( [str] * 5 )
> Traceback (most recent call last):
>   File "", line 1, in 
> TypeError: could not get typecode from object
> >>> a = [str] * 5
> >>> a
> [, , , , ]
> >>> gtk.TreeStore( a )
> Traceback (most recent call last):
>   File "", line 1, in 
> TypeError: could not get typecode from object
> 
> 
> Thank you,
> -Alex Goretoy
> http://launchpad.net/~a1g
> 
> 
> On Sat, Nov 27, 2010 at 10:39 PM, John Stowers
>  wrote:
> On Sat, 2010-11-27 at 20:40 -0600, alex goretoy wrote:
> > Currently I am having to do this in my application to create
> dynamic
> > treestore; is the a better way to do this?
> 
> 
> You could do
> 
> treestore = gtk.TreeStore(object)
> 
> where obj contains the list of strings. However you would then
> have to
> write your own display functions [1] for the (presumed)
> treeview
> columns.
> 
> John
> 
> [1] see gtk.TreeViewColumn.set_cell_data_func
> 
> >
> >
> > def get_treestore(n):
> > if n == 0:
> > treestore = gtk.TreeStore(str);
> > elif n == 1:
> > treestore = gtk.TreeStore(str);
> > elif n == 2:
> > treestore = gtk.TreeStore(str, str);
> > elif n == 3:
> > treestore = gtk.TreeStore(str, str, str);
> > elif n == 4:
> > treestore = gtk.TreeStore(str, str, str,
> str);
> > else:
> > treestore = gtk.TreeStore(str);
> >
> >
> > return treestore
> >
> >
> >
> >
> > Thank you in advance,
> > -Alex Goretoy
> >
> 
> > ___
> > pygtk mailing list   pygtk@daa.com.au
> > http://www.daa.com.au/mailman/listinfo/pygtk
> > Read the PyGTK FAQ: http://faq.pygtk.org/
> 
> 
> 
> 


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] dynamic treestore

2010-11-27 Thread John Stowers
On Sat, 2010-11-27 at 20:40 -0600, alex goretoy wrote:
> Currently I am having to do this in my application to create dynamic
> treestore; is the a better way to do this?

You could do

treestore = gtk.TreeStore(object)

where obj contains the list of strings. However you would then have to
write your own display functions [1] for the (presumed) treeview
columns.

John

[1] see gtk.TreeViewColumn.set_cell_data_func

> 
> 
> def get_treestore(n):
> if n == 0:
> treestore = gtk.TreeStore(str);
> elif n == 1:
> treestore = gtk.TreeStore(str);
> elif n == 2:
> treestore = gtk.TreeStore(str, str);
> elif n == 3:
> treestore = gtk.TreeStore(str, str, str);
> elif n == 4:
> treestore = gtk.TreeStore(str, str, str, str);
> else:
> treestore = gtk.TreeStore(str);
> 
> 
> return treestore
> 
> 
> 
> 
> Thank you in advance,
> -Alex Goretoy
> 
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] I want to make a example app with two thread and events

2010-11-15 Thread John Stowers
On Mon, 2010-11-15 at 12:21 +0100, MD or MD wrote:
> Hi.
> 
> I am a spanish programmer and I start with pyGtk.
> 
> And I try to make a example that it is a simple window that blink a
> button with two colours, for test events and threads. But I don't know
> how to send custom event.

Calling GTK code from multiple threads will cause crashes. Don't do it
without protection. There are many solutions to this problem, Google
"pygtk threading" or see
http://faq.pygtk.org/index.py?req=show&file=faq20.006.htp


> 
> 
>   def mThread(self):
>   while True:
>   print "Thread"
>   #self.emit('custom_event')
>   time.sleep(5)
> 

This function runs in the thread you created. self.emit calls all signal
handlers immediately, which results in code being executed from *this*
thread, and not the main (gtk.main) one. This will cause crashes unless
the advice given at the start is taken (i.e. idle_add emission, take the
gdk lock, etc)

Although the main problem is that you are trying to send a GObject
signal, self.emit("signal"), but your object does not inherit from
GObject. See __gsignals__ in here

http://www.pygtk.org/articles/subclassing-gobject/sub-classing-gobject-in-python.htm

And a threaded signal example here

http://www.johnstowers.co.nz/blog/index.php/2007/03/12/threading-and-pygtk/

John

> 
> 
> if __name__ == "__main__":
>   test = test()
>   test.main()
> 
> 
> Bye and thanks.
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] PyGtk and gtk-3.0 compatibility

2010-11-07 Thread John Stowers

> > > 
> > > John
> > > 
> > > [1] http://github.com/nzjrs/pygtk/commits/gtk-3.0
> > > [2] http://github.com/nzjrs/pygobject/tree/gtk-3.0
> 
> What's the status of this now? Is there every likely to be a pygtk
> release for GTK+ 3?
> 

I suspended the work during the large round of gtk+ breakage (rendering
cleanup mainly) and have not had the time to return to it.

My original goal was to do this in a backwards compatible way. With the
recent API changes to gtk+-3.0 this is no longer possible, things like
the expose/draw transition will be too hard to manage in PyGtk.
GtkApplication making use of GVariant are also going to be difficult to
wrap, minimally, the old way.

That said, I did receive some negative feedback about the idea.
PyGObject is the recommended way in future, and keeping PyGtk alive
might actually hold the platform back. There is certainly some truth in
that argument. In short, I am not sure what do do.

I suspect the whole job will be in the order of a full week of work, and
pragmatically I think this is actually a worthwhile week, given the
*huge* amount of PyGtk applications out there. Of course this argument
is a little weaker now that any PyGtk-3.0 port won't be backwards
compatible anymore.

I don't know what I plan to do. Thoughts appreciated.

Regards,

John

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] ANNOUNCE: PyGTK 2.22 (and Friends) Windows Installers

2010-11-06 Thread John Stowers
On Sat, 2010-11-06 at 23:50 +0100, Alessandro Dentella wrote:
> On Fri, Nov 05, 2010 at 12:17:00AM +1300, John Stowers wrote:
> > Hi All,
> > 
> > I have updated the official Windows installers for Pycairo, PyGObject and 
> > PyGTK.
> > 
> > These installers have been tested on XP, Vista and Windows 7. Versions
> > supporting Python 2.6 and Python 2.7 are provided. The installers can
> > be downloaded from
> 
> Thanks John. May I ask why you produce and upload to ftp.gnome.org only .exe
> installers rather than .msi that are considered the best ones even by
> distutils docs [1]:

Hi,

I created .msi installers too, but have been unable to test them (they
crash on wine, my native windows PC is on loan) and don't like putting
untested things on GNOME.org.

The MSI installers can be found here

PyGObject 2.26 (for glib-2.26.0)
http://www.johnstowers.co.nz/files/win32/pygobject-2.26.0.win32-py2.6.msi 
http://www.johnstowers.co.nz/files/win32/pygobject-2.26.0.win32-py2.7.msi

Pycairo 1.8.10
http://www.johnstowers.co.nz/files/win32/pycairo-1.8.10.win32-py2.6.msi
http://www.johnstowers.co.nz/files/win32/pycairo-1.8.10.win32-py2.7.exe
 
PyGTK 2.22 (for gtk+-2.22.0)
http://www.johnstowers.co.nz/files/win32/pygtk-2.22.0.win32-py2.6.msi
http://www.johnstowers.co.nz/files/win32/pygtk-2.22.0.win32-py2.7.msi

If they also get good testing and feedback then I could put them on
GNOME [1]

John

[1] Although AIUI msi installers don't do postinstall scripts, which
until recently contributed by Dieter, was a necessary step in the exe
installers.

> 
>In most cases, the bdist_msi installer is a better choice than the
>bdist_wininst installer, because it provides better support for Win64
>platforms, allows administrators to perform non-interactive installations,
>and allows installation through group policies.
> 
> That would also go towards the possibility to create a batch
> installation. By the way Dieter Verfaillie has already produced them and
> posted the URL for these to this list [2]
> 
> 
> sandro
> *:-)
> 
> 
> [1] 
> http://docs.python.org/distutils/apiref.html#module-distutils.command.bdist
> [2] http://www.optionexplicit.be/projects/gnome-windows/20101102/
> 
> 


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] ANNOUNCE: PyGTK 2.22 (and Friends) Windows Installers

2010-11-04 Thread John Stowers
Hi All,

I have updated the official Windows installers for Pycairo, PyGObject and PyGTK.

These installers have been tested on XP, Vista and Windows 7. Versions
supporting Python 2.6 and Python 2.7 are provided. The installers can
be downloaded from

PyGObject 2.26 (for glib-2.26.0)
http://ftp.gnome.org/pub/gnome/binaries/win32/pygobject/2.26/pygobject-2.26.0.win32-py2.6.exe
http://ftp.gnome.org/pub/gnome/binaries/win32/pygobject/2.26/pygobject-2.26.0.win32-py2.7.exe

Pycairo 1.8.10
http://ftp.gnome.org/pub/gnome/binaries/win32/pycairo/1.8/pycairo-1.8.10.win32-py2.6.exe
http://ftp.gnome.org/pub/gnome/binaries/win32/pycairo/1.8/pycairo-1.8.10.win32-py2.7.exe

PyGTK 2.22 (for gtk+-2.22.0)
http://ftp.gnome.org/pub/gnome/binaries/win32/pygtk/2.22/pygtk-2.22.0.win32-py2.6.exe
http://ftp.gnome.org/pub/gnome/binaries/win32/pygtk/2.22/pygtk-2.22.0.win32-py2.7.exe

They require the installation of the appropriate GTK+ dependencies and
have been tested to work with the gtk+-2.22 bundle (recommended), the
gtkmm installer and the gtk-win installer. Please install one as
appropriate, respectively

http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.0-20101016_win32.zip
http://ftp.gnome.org/pub/GNOME/binaries/win32/gtkmm/
http://gtk-win.sourceforge.net/home/index.php/Downloads

Thanks to all those who helped.

John Stowers
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Call For Testing: Updated PyGObject, Pycairo and PyGTK for Windows

2010-11-02 Thread John Stowers
On Thu, 2010-10-28 at 11:52 +1300, John Stowers wrote:
> On Sat, 2010-10-16 at 20:00 +1300, John Stowers wrote:
> > Hi All,
> > 
> > I spent some time updating the windows installers for PyGObject, PyGTK
> > and Pycairo.
> > 
> 
> Hi All,
> 
> Thanks for your feedback and testing. I updated the installers again to
> hopefully correct the bug some were seeing on install. I also generated
> installers for Python2.7.
> 
> Can those who got an error on install please test these to ensure that
> this is no longer present.
> 
> PyGObject 2.26 (for glib-2.26.0)
> http://www.johnstowers.co.nz/files/win32/pygobject-2.26.0.win32-py2.6.exe
> http://www.johnstowers.co.nz/files/win32/pygobject-2.26.0.win32-py2.7.exe
> 
> Pycairo 1.8.10
> http://www.johnstowers.co.nz/files/win32/pycairo-1.8.10.win32-py2.6.exe
> http://www.johnstowers.co.nz/files/win32/pycairo-1.8.10.win32-py2.7.exe
> 
> PyGTK 2.22 (for gtk+-2.22.0)
> http://www.johnstowers.co.nz/files/win32/pygtk-2.22.0.win32-py2.6.exe
> http://www.johnstowers.co.nz/files/win32/pygtk-2.22.0.win32-py2.7.exe

Final attempt. The only change is that these were built with
--user-access-control=auto

Can those that saw errors during install on vista/7 please test.

Once someone confirms they work I'll put them on GNOME FTP

Cheers,

John


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Call For Testing: Updated PyGObject, Pycairo and PyGTK for Windows

2010-10-28 Thread John Stowers
On Thu, 2010-10-28 at 09:59 +0200, Yann Leboulanger wrote:
> On 10/28/2010 12:52 AM, John Stowers wrote:
> > On Sat, 2010-10-16 at 20:00 +1300, John Stowers wrote:
> >> Hi All,
> >>
> >> I spent some time updating the windows installers for PyGObject, PyGTK
> >> and Pycairo.
> >>
> >
> > Hi All,
> >
> > Thanks for your feedback and testing. I updated the installers again to
> > hopefully correct the bug some were seeing on install. I also generated
> > installers for Python2.7.
> >
> > Can those who got an error on install please test these to ensure that
> > this is no longer present.
> 
> I still have the same error when installing pygobject and pygtk:
> 
> "close failed in file object destructor:
> Error in sys.excepthook:
> 
> Original exception was:"
> 
> And I still have the problem with styles, but that's probably not due to 
> windows installers.

Yeah, styles is something different. Can you please run the installer
from the console and see if it prints anything else of interest please?

What is your target system, etc?

Does anyone else have any ideas on this?

John

> 
> Thanks for your work


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Call For Testing: Updated PyGObject, Pycairo and PyGTK for Windows

2010-10-27 Thread John Stowers
On Sat, 2010-10-16 at 20:00 +1300, John Stowers wrote:
> Hi All,
> 
> I spent some time updating the windows installers for PyGObject, PyGTK
> and Pycairo.
> 

Hi All,

Thanks for your feedback and testing. I updated the installers again to
hopefully correct the bug some were seeing on install. I also generated
installers for Python2.7.

Can those who got an error on install please test these to ensure that
this is no longer present.

PyGObject 2.26 (for glib-2.26.0)
http://www.johnstowers.co.nz/files/win32/pygobject-2.26.0.win32-py2.6.exe
http://www.johnstowers.co.nz/files/win32/pygobject-2.26.0.win32-py2.7.exe

Pycairo 1.8.10
http://www.johnstowers.co.nz/files/win32/pycairo-1.8.10.win32-py2.6.exe
http://www.johnstowers.co.nz/files/win32/pycairo-1.8.10.win32-py2.7.exe

PyGTK 2.22 (for gtk+-2.22.0)
http://www.johnstowers.co.nz/files/win32/pygtk-2.22.0.win32-py2.6.exe
http://www.johnstowers.co.nz/files/win32/pygtk-2.22.0.win32-py2.7.exe

These are to be used with the all in one gtk bundle

http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.22/gtk
+-bundle_2.22.0-20101016_win32.zip

The script used for building the installers has also been updated
http://gist.github.com/629505

Thanks,

John


> 
> These require the installation of the appropriate dependencies.
> However, to make this step easier, and until Tor updates the gtk+
> bundle, Armin Burgmeier provided me with an interim gtk+ bundle [1].
> This can be downloaded from the following address,
> http://www.johnstowers.co.nz/files/win32/gtk
> +-bundle-win32-devel-2.22.zip
> Once extracted to C:\GTK (for example), you will need to add C:\GTK\bin
> to your path.
> 
> The installers and dependencies will be removed from my site
> and moved to the GNOME servers once verified that they work.
> 
> Some technical details about the installers
> * Built against Python 2.6.6
> * Source code comes from the 'windows' branch of each project
>   (on git.gnome.org)
> * They were built using wine-1.2+MinGW on Ubuntu 10.04
>   as my laptop with a windows install is on loan. This means they
>   have not been tested on a real windows install yet...
> * Yes, this actually works.
> * The script to generate the installers lives at
>   http://gist.github.com/629505
> * MinGW with GCC-4.5.0 was used for the compilation.
> * gtk+-2.22 sees the return of the windows theme! Please test
>   this by setting adding the following line to 
>   C:\GTK\etc\gtk-2.0\gtkrc (for example)
> 
>   gtk-theme-name = "MS-Windows"
> 
> Happy testing and good luck,
> 
> John
> 
> [1] Extracted from the well polished gtkmm windows installer
> http://live.gnome.org/gtkmm/MSWindows
> 


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] Call For Testing: Updated PyGObject, Pycairo and PyGTK for Windows

2010-10-16 Thread John Stowers
Hi All,

I spent some time updating the windows installers for PyGObject, PyGTK
and Pycairo.

I would appreciate it if those interested tested these installers before
they go on the official GNOME servers. The installers are

* PyGObject 2.26 (for glib-2.26.0)
http://www.johnstowers.co.nz/files/win32/pygobject-2.26.0.win32-py2.6.exe
* Pycairo 1.8.10
http://www.johnstowers.co.nz/files/win32/pycairo-1.8.10.win32-py2.6.exe
* PyGTK 2.22 (for gtk+-2.22.0)
http://www.johnstowers.co.nz/files/win32/pygtk-2.22.0.win32-py2.6.exe

These require the installation of the appropriate dependencies.
However, to make this step easier, and until Tor updates the gtk+
bundle, Armin Burgmeier provided me with an interim gtk+ bundle [1].
This can be downloaded from the following address,
http://www.johnstowers.co.nz/files/win32/gtk
+-bundle-win32-devel-2.22.zip
Once extracted to C:\GTK (for example), you will need to add C:\GTK\bin
to your path.

The installers and dependencies will be removed from my site
and moved to the GNOME servers once verified that they work.

Some technical details about the installers
* Built against Python 2.6.6
* Source code comes from the 'windows' branch of each project
  (on git.gnome.org)
* They were built using wine-1.2+MinGW on Ubuntu 10.04
  as my laptop with a windows install is on loan. This means they
  have not been tested on a real windows install yet...
* Yes, this actually works.
* The script to generate the installers lives at
  http://gist.github.com/629505
* MinGW with GCC-4.5.0 was used for the compilation.
* gtk+-2.22 sees the return of the windows theme! Please test
  this by setting adding the following line to 
  C:\GTK\etc\gtk-2.0\gtkrc (for example)

  gtk-theme-name = "MS-Windows"

Happy testing and good luck,

John

[1] Extracted from the well polished gtkmm windows installer
http://live.gnome.org/gtkmm/MSWindows

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] AttributeError: 'module' object has no attribute 'DrawingArea'

2010-10-11 Thread John Stowers
On Mon, 2010-10-11 at 19:42 +1300, Rob Brown-Bayliss wrote:
> Hi
> 
> Does any one know why am I getting this error in the attached file?
> Why can't I use DrawingArea in gtk?

Because the attached file is called cairo.py; it calls "import gtk",
which during import I presume calls "import cairo", which resolves to
the cairo.py file instead of the system library.

The old mutual import / include problem

Rename the file and it works fine.

John

> 
> File "/home/rob/cairo.py", line 9, in 
>   import gtk
> File "/usr/lib/pymodules/python2.6/gtk-2.0/gtk/__init__.py", line 40,
> in 
>   from gtk import _gtk
> File "/home/rob/cairo.py", line 12, in 
>   class EggClockFace(gtk.DrawingArea):
> 
> 
> 
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Windows installer - all in one

2010-10-01 Thread John Stowers
On Fri, 2010-10-01 at 12:03 +0200, Dieter Verfaillie wrote:
> Hi,
> 
> I accidentally "replied to sender" yesterday, so here's the same
> message to the list...
> 
> Quoting "Stephen George" :
> >> "GTK+ 2.16 is an old but in some sense more reliable branch. 2.20
> >> is the current maintained version. Choose the one which works
> >> better for you."
> > They question is, which one is best for the installer 2.16 or 2.20
> > ?, is there a preference?
> 
> For starters, everything more recent than 2.16 has serious problems
> drawing xp themed widgets, and then there's a whole bunch of
> bugs/regressions introduced by the client-side windows work done in
> 2.18. If you don't need newer widgets, better stick with 2.16 for now...

Agree. Personally I use 2.20, with PyGTK 2.16 (just without the xp
theme)

There have been a heap of bug fixes in the xp theme that made it into
gtk 2.22, so I expect the combination of PyGTK 2.22 and GTK 2.22 to be a
really solid base. 

I'm just waiting on a gtk 2.22 bundle for windows, then I will make the
PyGTK 2.22 installer.

John


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] PyGTK Bugzilla Permissions

2010-09-26 Thread John Stowers
Hi,

Could one of the PyGTK developers listed here [1] please give me the
appropriate permissions / add me to the pygtk developers group on
bugzilla?

Regards,

John

[1] https://bugzilla.gnome.org/browse.cgi?product=pygtk

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] pygobject matching glib version numbers

2010-09-26 Thread John Stowers

> Yes, we agreed on synchronizing with the glib version number but we
> have not done any release since then.
> 
> On monday we'll be releasing 2.26.0, will bump it now in git.

I see this has been done now, thanks a lot!

Sorry to pester,

John

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] [ANNOUNCE] PyGTK 2.22.0

2010-09-25 Thread John Stowers
Hi All,

A new stable development release of the Python bindings
for GTK-2 has been released.

The new release is available from ftp.gnome.org and its mirrors
as soon as its synced correctly:

http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.22/

Note:
PyGtk 2.22 supports the GTK-2.22 API. New users wising to develop
Python applications using GTK are recommended to use the
GObject-Introspection features available in PyGObject.
Existing authors of PyGtk applications are also
recommended to port their applications to PyGObject
if they wish to take advantage of new features appearing
in GTK-3 and beyond. More information on PyGObject
and GObject-Introspection can be found at;

http://live.gnome.org/PyGObject

I had originally envisioned that PyGtk-2.22 would be the final 
PyGTK release, coinciding with the final GTK-2 release. However
now that GTK-2.24 is planned, I will also make a matching 
PyGTK-2.24 at that time.

What's New:
New features since PyGtk-2.17.0 (2.18.0 was never released) include
 * Wrap new API added in GTK/GDK 2.21/2.22
 * Wrap new API added in GTK/GDK 2.20
 * Add forgotten API from GTK/GDK 2.12/14/16/18/20
 * Windows build and compatibility fixes
 * Many bug fixes

Bug reports, as always, should go to Bugzilla; check out
http://pygtk.org/developer.html and http://pygtk.org/feedback.html for
links to posting and querying bug reports for PyGTK.

John Stowers 

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] pygobject matching glib version numbers

2010-09-25 Thread John Stowers
On Wed, 2010-08-11 at 10:07 +0200, Tomeu Vizoso wrote:
> Hi,
> 
> John Stowers has proposed that PyGObject changes it's version
> numbering to match that of glib. This means that the next stable
> version will be 2.26 instead of 2.22.
> 
> The rationale is that it will help people a bit to know what to expect
> from a given PyGObject release. He's already numbering his PyGtk
> releases matching Gtk+ versions.
> 
> If nobody has good reasons against, the next unstable release of
> PyGObject will be 2.25.1.

Hi,

I noticed that this hasn't been done yet despite agreement. Would it be
OK if you or John P. bumped the version before release?

John

> 
> Regards,
> 
> Tomeu
> ___
> python-hackers-list mailing list
> python-hackers-l...@gnome.org
> http://mail.gnome.org/mailman/listinfo/python-hackers-list


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Windows installer components

2010-09-24 Thread John Stowers

> 
> 
> So for each version of python that we decided to support (and using
> python 2.6.5 in this example) the pygtk installer needs to install: 
> - PyGObject 
> - PyCairo 

This sounds good, a worthwhile improvement would certainly be to include
all the necessary python installers together.

So as far as my understanding goes, the installer would include the
others, and call them silently...?

A full 'all in one' installer that also includes the gtk bundle could
then be handled at a later time.

John




___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Silent installation

2010-09-19 Thread John Stowers
On Sun, 2010-09-19 at 20:07 +0200, Tim Lebedkov wrote:
> Hello John,
> 
> do the installers support a command line parameter for silent
> installation? Something like /S?
> If no, is there a ZIP-download?
> 
> What does the installer do? Can it be expressed in a batch file?

The installers are generated by the python distutils machinery, so I am
not sure if they support /S.

I suspect they could *almost* be expressed as a batch file and a ZIP
download, as most of the work is copying files to the correct location.
The one exception is the postinstall script which has to fix the
pkg-config files to point to the install directory.

John

> 
> Regards
> --Tim
> 
> On Sun, Sep 19, 2010 at 11:57 AM, John Stowers
>  wrote:
> > On Sun, 2010-09-19 at 09:28 +0430, Saeed Rasooli wrote:
> >> I think there is lake of a Package Manager (like apt-get) in windows
> >> to contoll complex dependency structure of libraries and their needing
> >> versions. Thats because fully installation of PyGTK (including python,
> >> python-gtk, libgtk, libcairo, lib* ...) was ALYAWS A PROBLEM. I
> >> usually use Linux, but every time I try to install PyGTK and many
> >> other GTK-based programs (like Pidgin and GIMP) inside windows, I find
> >> it too hard and I sense this structure is not built for windows. Qt is
> >> more successful in windows maybe because it collects everything in one
> >> place!
> >
> > Hi,
> >
> > I generate the PyGtk installers for windows.
> >
> > Every few months someone wishes for an all in one installer, but no one
> > ever includes any concrete suggestions for how one would be compiled, or
> > what exactly it would contain.
> >
> > So basically, if you are interested in an all in one installer for the
> > PyGtk stack on windows, make one as a prototype, we can then all test
> > it, then I will be happy to get it hosted on GNOME servers and maintain
> > it into the future.
> >
> > John
> >
> >>
> >> On Sat, Sep 18, 2010 at 10:22 PM, Tim Lebedkov
> >>  wrote:
> >> Hello,
> >>
> >> is there a way to install PyGTK silently (without user
> >> interaction)?
> >>
> >> Regards
> >> --Tim
> >> ___
> >> pygtk mailing list   pygtk@daa.com.au
> >> http://www.daa.com.au/mailman/listinfo/pygtk
> >> Read the PyGTK FAQ: http://faq.pygtk.org/
> >>
> >> ___
> >> pygtk mailing list   pygtk@daa.com.au
> >> http://www.daa.com.au/mailman/listinfo/pygtk
> >> Read the PyGTK FAQ: http://faq.pygtk.org/
> >
> >
> >


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Silent installation

2010-09-19 Thread John Stowers
On Sun, 2010-09-19 at 09:28 +0430, Saeed Rasooli wrote:
> I think there is lake of a Package Manager (like apt-get) in windows
> to contoll complex dependency structure of libraries and their needing
> versions. Thats because fully installation of PyGTK (including python,
> python-gtk, libgtk, libcairo, lib* ...) was ALYAWS A PROBLEM. I
> usually use Linux, but every time I try to install PyGTK and many
> other GTK-based programs (like Pidgin and GIMP) inside windows, I find
> it too hard and I sense this structure is not built for windows. Qt is
> more successful in windows maybe because it collects everything in one
> place!

Hi,

I generate the PyGtk installers for windows.

Every few months someone wishes for an all in one installer, but no one
ever includes any concrete suggestions for how one would be compiled, or
what exactly it would contain.

So basically, if you are interested in an all in one installer for the
PyGtk stack on windows, make one as a prototype, we can then all test
it, then I will be happy to get it hosted on GNOME servers and maintain
it into the future.

John

> 
> On Sat, Sep 18, 2010 at 10:22 PM, Tim Lebedkov
>  wrote:
> Hello,
> 
> is there a way to install PyGTK silently (without user
> interaction)?
> 
> Regards
> --Tim
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
> 
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] List admin - info on mpsupport emails

2010-09-07 Thread John Stowers
On Tue, 2010-09-07 at 23:04 +0800, Jason Heeris wrote:
> Hi,
> 
> Sorry for the noise, but could a PyGTK list admin please get in touch
> with me privately regarding the mpsupport.com bounces?

Can you fix them?

I have already complained on the list about them. No response. I don't
know if the list admin still reads the list. Perhaps you could email the
admin directly?

John

> 
> Cheers,
> Jason
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] eventbox and ugly look

2010-09-01 Thread John Stowers
On Tue, 2010-08-31 at 18:56 +0200, Alessandro Dentella wrote:
> Hi,
> 
> in order to get tooltips in the header of a TreViewColumn I add a Label to
> en EventBox. 

Is this eventbox hack necessary with the new gtk.Tooltip API? (not
gtk.Tooltips)

See the example code in pygtk-demo

John

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] moving some stuff from pygobject to pygtk

2010-08-25 Thread John Stowers
On Wed, Aug 25, 2010 at 9:08 PM, Tomeu Vizoso
 wrote:
> On Sat, Aug 21, 2010 at 22:37, John Palmieri  wrote:
>> Hmm, seems my original e-mail never made it to the list.  Thanks for posting 
>> this Tomeu.
>>
>> - "John Stowers"  wrote:
>>
>>> On Fri, 2010-08-20 at 17:54 +0200, Tomeu Vizoso wrote:
>>> > Hi all,
>>> >
>>> > as you may know J5 is working on the Python3 port of PyGObject and
>>> he
>>> > has found that porting the gio static bindings is a lot of work and
>>> > somewhat useless as the rest of the static bindings aren't likely
>>> to
>>> > be ported to Python 3 at all.
>>> >
>>> > I would like to put for consideration the idea of moving gio from
>>> > pygobject to pygtk, so it is not destabilized by pygobject's port
>>> to
>>> > Python 3. The code generator is in the same situation, so it could
>>> > also be moved to pygtk.
>>>
>>> Would it be easier to put the static gio bindings in their own
>>> repository/package?
>>
>> Easier isn't the word but a one time pain of setting up a new project and 
>> creating a new autotools build shouldn't be too bad.
>
> Ok, we need now a volunteer :)

If this is the consensus then I could do it.

However, any idea who I would have to poke to create a new repository
that also preserves the gio git history?

John
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] moving some stuff from pygobject to pygtk

2010-08-20 Thread John Stowers
On Fri, 2010-08-20 at 17:54 +0200, Tomeu Vizoso wrote:
> Hi all,
> 
> as you may know J5 is working on the Python3 port of PyGObject and he
> has found that porting the gio static bindings is a lot of work and
> somewhat useless as the rest of the static bindings aren't likely to
> be ported to Python 3 at all.
> 
> I would like to put for consideration the idea of moving gio from
> pygobject to pygtk, so it is not destabilized by pygobject's port to
> Python 3. The code generator is in the same situation, so it could
> also be moved to pygtk.

Would it be easier to put the static gio bindings in their own
repository/package? How do we imagine this playing out with
dependencies? Does the distributor build two binary packages from the
PyGObject sources (one against Python-2, one against Python-3)?

PyGtk -deps-> PyGIO + PyGObject(2) -> Python-2
and
gir-packages -> PyGObject(3) -> Python-3

I don't think they belong in pygtk.

As for the code generator, it was quite a pain when it moved from pygtk
to pygobject wrt. build setups. What is the problem with it staying in
PyGObject if the GIO stuff moves out?


> I know that pygtk doesn't have an excess of maintainers right now, but
> these modules should be relatively mature already.

Agree. I was one of the first large-scale users of the GIO bindings, and
they took at least 2 cycles to get to a stable state.

Finally, I would be saddened if the port to Python3 destabilised
PyGObject very much. PyGObject is stable software, and backward
compatibility breakages should be unacceptable (but deprecations
welcomed).

> 
> There's also the question of what to do with the Gtk and Gdk overrides
> in http://git.gnome.org/browse/pygobject/tree/gi/overrides and their
> tests, which don't really belong to pygobject.

I can't comment on this one sorry.

Regards,

John

> 
> Any ideas?
> 
> Thanks,
> 
> Tomeu
> ___
> python-hackers-list mailing list
> python-hackers-l...@gnome.org
> http://mail.gnome.org/mailman/listinfo/python-hackers-list


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] pygobject matching glib version numbers

2010-08-11 Thread John Stowers
On Wed, 2010-08-11 at 11:44 +0200, Simon van der Linden wrote:
> On Wed, 2010-08-11 at 11:08 +0200, Tomeu Vizoso wrote:
> > On Wed, Aug 11, 2010 at 10:57, Simon van der Linden  
> > wrote:
> > > On Wed, 2010-08-11 at 10:07 +0200, Tomeu Vizoso wrote:
> > >> The rationale is that it will help people a bit to know what to expect
> > >> from a given PyGObject release. He's already numbering his PyGtk
> > >> releases matching Gtk+ versions.
> > >
> > > I wonder whether it makes sense for PyGObject, which is not, to my
> > > knowledge, a set of static binding for GLib. We don't exactly ensure
> > > that all the features available in the matching GLib version is
> > > available to Python developers, do we?
> > 
> > I think that's something we should aim for. I also consider g-i to be
> > a logical part of GLib even if it hasn't been merged yet.
> 
> I'm neither in favor nor against this change. I think it will not bring
> anything. 

I have lost track of the number of times I have had to explain the
versions of Gtk, PyGtk, Glib and PyGObject to people trying to get stuff
to work on windows, and every time noted that the version mismatches
were unhelpful, confusing and often resulted in them trying
build/runtime combinations that did not work.

This is less the case on linux where your distribution/package manager
hides it from you.

John

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] [ANNOUNCE] PyGTK 2.21.0

2010-08-10 Thread John Stowers
Hi,

Please remember to keep the list in CC

> Is there a pygobject with introspection available on Windows yet? 

Nope, not that I am aware.

> My
> test environment is not suited for building from source but I could
> easily start testing if there are suitable win32 binaries made
> available somewhere.
> 
> Or is that part of the PyGTK package you will be creating later this week?

I will be building PyGObject in addition to PyGTK, but likely without
introspection support.

John


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] [ANNOUNCE] PyGTK 2.21.0

2010-08-10 Thread John Stowers
On Tue, 2010-08-10 at 23:43 +1200, Mark Schafer wrote:
> Thanks John,
> For windows users - can you comment on whether we should use the 
> PyGObject interface as you recommend for Gnome users ?

For windows users, I will get a PyGtk binary up some time in the next
week (or else you can follow the build instructions in README.win32). I
recommend sticking with GTK2 and PyGTK on windows for a while yet. On
linux I expect things to mature faster.

Personally, I don't like being the *first* person to use new software.
I'm pretty pragmatic about this sort of thing, and if you wanted to use
PyGObject + GObject introspection + GTK3 + Windows you would be in a
very small set of people and I would not be confident that it would
work.

> Also any notes on what else we have to load besides the GTK+ binary to 
> get it all working. e.g. pycairo

See README.win32 in the source directory, but basically, GTK+Glib
+PyGObject+PyCairo+Python

John

> 
> Thanks. MarkS...
> 
> 
> On 8/8/2010 11:42 PM, John Stowers wrote:
> > Hi All
> >
> > A new unstable development release of the Python bindings
> > for GTK-2 has been released.
> >
> > The new release is available from ftp.gnome.org and its mirrors
> > as soon as its synced correctly:
> >
> >   http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.21/
> >
> > Note:
> > PyGtk 2.22 will be the last release in the PyGtk series. It
> > will support the GTK-2.22 API. New users wising to develop
> > Python applications using GTK are recommended to use the
> > GObject-Introspection features available in PyGObject.
> > Existing authors of PyGtk applications are also
> > recommended to port their applications to PyGObject
> > if they wish to take advantage of new features appearing
> > in GTK-3.0 and beyond. More information on PyGObject
> > and the GObject-Introspection features can be found at;
> >
> > http://live.gnome.org/PyGObject
> >
> > Additionally, the version number of PyGtk has been incremented to
> > 2.21.0. The final stable PyGtk release will be 2.22.0, aligned with
> > the GTK-2.22.0 release.
> >
> > What's New:
> > New features since PyGtk-2.17.0 (2.18.0 was never released) include
> >   * Wrap new API added in GTK/GDK 2.21/2.22
> >   * Wrap new API added in GTK/GDK 2.20
> >   * Add forgotten API from GTK/GDK 2.12/14/16/18/20
> >   * Windows build and compatibility fixes
> >   * Many bug fixes
> >
> > Bug reports, as always, should go to Bugzilla; check out
> > http://pygtk.org/developer.html and http://pygtk.org/feedback.html for
> > links to posting and querying bug reports for PyGTK.
> >
> > John Stowers
> > ___
> > pygtk mailing list   pygtk@daa.com.au
> > http://www.daa.com.au/mailman/listinfo/pygtk
> > Read the PyGTK FAQ: http://faq.pygtk.org/
> >
> >
> 


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] How About a PyGtk Stable Release?

2010-08-08 Thread John Stowers
On Wed, 2010-08-04 at 01:58 +1200, John Stowers wrote:
> On Tue, 2010-07-06 at 01:30 +1200, John Stowers wrote:
> > Hi All,
> > 
> > It would be great if we could do a PyGtk stable release to align with
> > the last gtk-2.0 release. I am happy to do this if no-one else wants to.
> 
> Ping?
> 
> Anyone feel like doing this? Can I do it?

This has now been done. While writing the release email I struggled to
come up with a short concise summary of PyGObject GObject-Introspection.

Suggestions would be appreciated.

John


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] [ANNOUNCE] PyGTK 2.21.0

2010-08-08 Thread John Stowers
Hi All

A new unstable development release of the Python bindings
for GTK-2 has been released.

The new release is available from ftp.gnome.org and its mirrors
as soon as its synced correctly:

 http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.21/

Note:
PyGtk 2.22 will be the last release in the PyGtk series. It
will support the GTK-2.22 API. New users wising to develop
Python applications using GTK are recommended to use the
GObject-Introspection features available in PyGObject.
Existing authors of PyGtk applications are also
recommended to port their applications to PyGObject
if they wish to take advantage of new features appearing
in GTK-3.0 and beyond. More information on PyGObject
and the GObject-Introspection features can be found at;

http://live.gnome.org/PyGObject

Additionally, the version number of PyGtk has been incremented to
2.21.0. The final stable PyGtk release will be 2.22.0, aligned with
the GTK-2.22.0 release.

What's New:
New features since PyGtk-2.17.0 (2.18.0 was never released) include
 * Wrap new API added in GTK/GDK 2.21/2.22
 * Wrap new API added in GTK/GDK 2.20
 * Add forgotten API from GTK/GDK 2.12/14/16/18/20
 * Windows build and compatibility fixes
 * Many bug fixes

Bug reports, as always, should go to Bugzilla; check out
http://pygtk.org/developer.html and http://pygtk.org/feedback.html for
links to posting and querying bug reports for PyGTK.

John Stowers
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] use minigtk as backend for Win32

2010-08-08 Thread John Stowers
On Sun, Aug 8, 2010 at 9:44 PM, est  wrote:
> Hi guys,
>
> I've found a great feature about XChat: the gtk lib is so small.
>
> It's minigtk
>
> http://xchat.org/files/binary/win32/mini-src/
>
> Anyone plans using minigtk as pygtk backend for Windows? This would
> reduce final app size, provide better i18n support and faster text
> rendering.

I don't see why it would have better i18n support, or faster text
rendering, but instructions on how to build your own custom PyGtk can
be found at

http://git.gnome.org/browse/pygtk/tree/README.win32

John

> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Notice on pygtk.org and pygtk gnome wiki about PyGObject dynamic bindings?

2010-08-06 Thread John Stowers
On Fri, 2010-08-06 at 10:45 -0700, Smartboy wrote:
> Hello,
> 
> I came across the PyGObject bindings today through the fedora mail
> which was linked to on this list, and since have been wondering why it
> isn't mentioned anywhere else. I think that a notice should be put
> somewhere on the PyGTK site that there are now PyGObject bindings for
> GTK which can be used as an alternative to the PyGTK bindings
> themselves. They don't seem exactly ready yet but are still enough to
> get started on testing it seems, and the more people that know about
> it, the more people that will test it. So, does anyone know how has
> the ability to edit the site? What do you all think?

Hi Smartboy,

Yes, the developer story here is a bit of a mindf**k. The mailing list
for the gobject-introspection based bindings is here [1]. You should
also read the thread on ddl here [2].

John

[1] http://mail.gnome.org/mailman/listinfo/python-hackers-list
[2]
http://mail.gnome.org/archives/desktop-devel-list/2010-August/msg00035.html

> 
> Smartboy
> 
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] How About a PyGtk Stable Release?

2010-08-06 Thread John Stowers
On Fri, 2010-08-06 at 10:01 +0200, Tomeu Vizoso wrote:
> On Fri, Aug 6, 2010 at 09:56, Andrew Steele  wrote:
> > On 3 August 2010 14:58, John Stowers  wrote:
> >>
> >> Ping?
> >>
> >> Anyone feel like doing this? Can I do it?
> >>
> >> John
> >
> > Looks like you should go for it.
> >
> > A release now would be useful for end-users so its in the next bunch of
> > distributions which are released in October / November.
> 
> +1 from me, FWIW

OK cool. I will try and do one this weekend.

> 
> Though Fedora has started to drop static bindings:
> 
> http://lists.fedoraproject.org/pipermail/desktop/2010-August/006407.html

Ha, classic. I expect they will stop shipping pygtk around the same time
they stop shipping gtk-2.X

Fedora, or GTFO! 

John

> 
> Thanks,
> 
> Tomeu
> 
> > ___
> > pygtk mailing list   pygtk@daa.com.au
> > http://www.daa.com.au/mailman/listinfo/pygtk
> > Read the PyGTK FAQ: http://faq.pygtk.org/
> >
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] How About a PyGtk Stable Release?

2010-08-03 Thread John Stowers
On Tue, 2010-07-06 at 01:30 +1200, John Stowers wrote:
> Hi All,
> 
> It would be great if we could do a PyGtk stable release to align with
> the last gtk-2.0 release. I am happy to do this if no-one else wants to.

Ping?

Anyone feel like doing this? Can I do it?

John

> 
> Also, would it be worth numbering this release as pygtk-2.22? It would
> be nice if the version numbers matched again. Although this might not be
> worth the effort if the pygobject version number != the glib version
> number.
> 
> John
> 


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Pygtk question

2010-07-27 Thread John Stowers
On Wed, Jul 28, 2010 at 5:29 AM, packet  wrote:
> How long does it take to install PyGTK with pip and here the message i get
> not sure if it is installing or not.

I was not aware installing PyGTK using
pip/setuptools/distutils/easy_install was even supported...

John

>
>
> Downloading/unpacking PyGTK
>   Running setup.py egg_info for package PyGTK
>
>
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Installing PyGTK on Windows?

2010-07-27 Thread John Stowers
On Tue, 2010-07-27 at 11:26 -0700, Smartboy wrote:
> Hello,
> 
> Has anyone here ever successfully installed a recent version of PyGTK
> on Windows successfully? 

Yes. I regularly install on windows to test the installers I also
generate. 

Please provide *much* more information including the complete versions
of all packages you have installed, where you obtained them, your
architecture, and your windows version.

John

> I've been trying, along with a friend, to get
> it installed, but we keep getting "import dll" errors. I've tried
> importing pygtk and then importing gtk, and also tried importing pygtk
> as gtk, but neither works. If anyone else has gotten around this, then
> would you mind putting the steps you used since I can't find any other
> ways to get it working.
> 
> Thanks,
> Smartboy
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] PyGtk and gtk-3.0 compatibility

2010-07-16 Thread John Stowers
On Tue, 2010-07-06 at 01:48 +1200, John Stowers wrote:
> Hi,
> 
> First of all, PyGI and GObject introspection is the way forward.
> 
> Now, that being said, it seems a little silly to spend all this effort
> porting C apps in GNOME to gtk-3.0 only to see the first PyGtk app drag
> back in the gtk-2.0 libraries with "import gtk".
> 
> So I spent a little time trying to get PyGtk to build with GSEAL. Turns
> out it wasn't that hard [1][2].

This has reached a reasonable state of working, I have run the same
python applications against a GSEALED G_DISABLE_DEPRECATED branch of
2.21 and against master (although for that you will also need this
branch [0])

If you are interested in playing 
 * Check out the gtk-3.0 branches of PyGObject and PyGtk [1][2]
 * Build against a Gtk 2.21.x release with the appropriate GSEAL and
DISABLE_DEPRECATED CFLAGS

The remaining work is 
 * When needed, fix the override files to not call deprecated functions
 * If an object has beer wrapped with the (fields (...)) attribute
   then you need to either
   1) Add a (getter-funcname "foo") or (getter-propname "bar")
  attribute to he appropriate defs file
   2) Remove the field wrapping (or possible override), which
  will break compatibility

Behind the scenes, a modified PyGObject codegen is needed because of how
field access on GObjects (ie GtkWidget.window) is now handled. Access is
now delegated to either a getter function (ie gtk_widget_get_window) or
to a GObject property (ie g_object_get(widget, "window", &window))
depending on whether you added the getter-funcname of getter-propname to
the defs file. To see remaining fields that need to be emulated grep for
FIXME-FIELD in the generated code, or watch for DepreciationError
runtime warnings.

So depending on how many fields can be annotated in this way, and how
the GDK sealing / GDKDevice cleanup goes, I am confident that with a
little luck and some work, that PyGtk apps should be able to run against
gtk-3.0 with no code changes (providing you were not using very old
deprecated stuff, and that fields are now accessible with accessor
functions). 

John

[0] http://github.com/nzjrs/pygtk/tree/build-against-gtk-3.0
[1] http://git.gnome.org/browse/pygobject/log/?h=gtk-3.0
[2] http://git.gnome.org/browse/pygtk/log/?h=gtk-3.0

p.s. Branches will likely be rebased in future

> 
> Only a few accessors were missing
>   * GtkWindow.has_user_ref_count
>   * GtkInvisible.has_user_ref_count
> These both are used in the sink funcs, and seem to be a synonym
> for checking the object has not been destroyed. 
>   * gtk_menu_get_position_func{,_data}
> 
> So, what is the opinion on this? Is it worth me continuing? My idea
> would be to make *only one* PyGtk release that builds against gtk-3.0,
> it would see no new features.
> 
> John
> 
> [1] http://github.com/nzjrs/pygtk/commits/gtk-3.0
> [2] http://github.com/nzjrs/pygobject/tree/gtk-3.0
> 


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] How About a PyGtk Stable Release?

2010-07-12 Thread John Stowers
On Mon, 2010-07-12 at 11:37 +0200, Tomeu Vizoso wrote:
> On Sun, Jul 11, 2010 at 05:46, John Stowers
>  wrote:
> > On Fri, 2010-07-09 at 15:32 +1200, John Stowers wrote:
> >> On Thu, 2010-07-08 at 09:57 +0200, Tomeu Vizoso wrote:
> >> > On Mon, Jul 5, 2010 at 15:30, John Stowers 
> >> >  wrote:
> >> > > Hi All,
> >> > >
> >> > > It would be great if we could do a PyGtk stable release to align with
> >> > > the last gtk-2.0 release. I am happy to do this if no-one else wants 
> >> > > to.
> >> >
> >> > I guess you should go for it.
> >>
> >> OK great. It would be appreciated if someone could review this branch
> >>
> >> http://github.com/nzjrs/pygtk/compare/master...add-gtk-2.20-api
> >>
> >> It is the API additions for Gtk-2.20. It should be uncontroversial.
> >>
> >> I will push this in the next few days if no-one objects.
> >
> > This has now been pushed.
> >
> >>
> >> >
> >> > > Also, would it be worth numbering this release as pygtk-2.22? It would
> >> > > be nice if the version numbers matched again. Although this might not 
> >> > > be
> >> > > worth the effort if the pygobject version number != the glib version
> >> > > number.
> >> >
> >> > I'm open to changing pygobject's versioning scheme if it helps.
> >>
> >> OK cool. I will wait to see if anyone else voices an opinion first.
> >
> > I think it would be good if the version numbers were aligned again - it
> > would certainly then be clear that PyGtk 2.22 was to be used with Gtk
> > +-2.22, i.e. the last releases in the 2.X series.
> >
> > In making this change would it also be a good opportunity to make the
> > PyGObject version number match.
> >
> > The developer story for the next 12 months of python+gtk development is
> > already hard to explain, small improvements like version number
> > alignment could go some way to improving that.
> 
> So the next GNOME stable (2.32) release will have PyGtk 2.22 and PyGObject 
> 2.22?

Not quite, I was talking about making the next stable releases in the
2.x series match;

PyGtk-2.22 = Gtk-2.22
PyGObject 2.26 = GLib 2.26

I am not concerned with PyGObject version != PyGtk version because Gtk
and Glib versions don't match. I also don't think it necessary to have
either the same version as the GNOME version number because the GNOME
version number will change with GNOME 3, and so will Gtk.

John

> 
> Regards,
> 
> Tomeu
> 
> > John
> >
> >>
> >> John
> >>
> >> >
> >> > Regards,
> >> >
> >> > Tomeu
> >> >
> >> > > John
> >> > >
> >> > > ___
> >> > > python-hackers-list mailing list
> >> > > python-hackers-l...@gnome.org
> >> > > http://mail.gnome.org/mailman/listinfo/python-hackers-list
> >> > >
> >>
> >>
> >
> >
> >


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] How About a PyGtk Stable Release?

2010-07-10 Thread John Stowers
On Fri, 2010-07-09 at 15:32 +1200, John Stowers wrote:
> On Thu, 2010-07-08 at 09:57 +0200, Tomeu Vizoso wrote:
> > On Mon, Jul 5, 2010 at 15:30, John Stowers  
> > wrote:
> > > Hi All,
> > >
> > > It would be great if we could do a PyGtk stable release to align with
> > > the last gtk-2.0 release. I am happy to do this if no-one else wants to.
> > 
> > I guess you should go for it.
> 
> OK great. It would be appreciated if someone could review this branch
> 
> http://github.com/nzjrs/pygtk/compare/master...add-gtk-2.20-api
> 
> It is the API additions for Gtk-2.20. It should be uncontroversial.
> 
> I will push this in the next few days if no-one objects.

This has now been pushed.

> 
> > 
> > > Also, would it be worth numbering this release as pygtk-2.22? It would
> > > be nice if the version numbers matched again. Although this might not be
> > > worth the effort if the pygobject version number != the glib version
> > > number.
> > 
> > I'm open to changing pygobject's versioning scheme if it helps.
> 
> OK cool. I will wait to see if anyone else voices an opinion first.

I think it would be good if the version numbers were aligned again - it
would certainly then be clear that PyGtk 2.22 was to be used with Gtk
+-2.22, i.e. the last releases in the 2.X series.

In making this change would it also be a good opportunity to make the
PyGObject version number match. 

The developer story for the next 12 months of python+gtk development is
already hard to explain, small improvements like version number
alignment could go some way to improving that.

John

> 
> John
> 
> > 
> > Regards,
> > 
> > Tomeu
> > 
> > > John
> > >
> > > ___
> > > python-hackers-list mailing list
> > > python-hackers-l...@gnome.org
> > > http://mail.gnome.org/mailman/listinfo/python-hackers-list
> > >
> 
> 


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] How About a PyGtk Stable Release?

2010-07-08 Thread John Stowers
On Thu, 2010-07-08 at 09:57 +0200, Tomeu Vizoso wrote:
> On Mon, Jul 5, 2010 at 15:30, John Stowers  
> wrote:
> > Hi All,
> >
> > It would be great if we could do a PyGtk stable release to align with
> > the last gtk-2.0 release. I am happy to do this if no-one else wants to.
> 
> I guess you should go for it.

OK great. It would be appreciated if someone could review this branch

http://github.com/nzjrs/pygtk/compare/master...add-gtk-2.20-api

It is the API additions for Gtk-2.20. It should be uncontroversial.

I will push this in the next few days if no-one objects.

> 
> > Also, would it be worth numbering this release as pygtk-2.22? It would
> > be nice if the version numbers matched again. Although this might not be
> > worth the effort if the pygobject version number != the glib version
> > number.
> 
> I'm open to changing pygobject's versioning scheme if it helps.

OK cool. I will wait to see if anyone else voices an opinion first.

John

> 
> Regards,
> 
> Tomeu
> 
> > John
> >
> > ___
> > python-hackers-list mailing list
> > python-hackers-l...@gnome.org
> > http://mail.gnome.org/mailman/listinfo/python-hackers-list
> >


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] idle_add vs. threads_enter/threads_leave

2010-07-07 Thread John Stowers
On Wed, 2010-07-07 at 08:00 +0800, Jason Heeris wrote:
> Antoine Martin wrote:
> 
> > It means that most of your code is not using threads at all, only the
> > bits that are *slow*
> 
> Those are the only bits that use threads anyway.
> 
> > I've lost track of your particular issue though, so maybe this is not
> > suitable for your use-case? How much slow work do you do compared to the
> > rest? (how many code paths, rather than raw amount)
> 
> I have two kinds of long-blocking work: reading a large file and 
> processing it to get a single result, and communication over a serial 
> port (send command, await response, times about a hundred).

In the serial port case, I use glib.io_add_watch on the file descriptor.
Check out my UAV ground station software which does a *lot* of serial
comms, and works perfectly in windows and linux [1]

I also have a little helper lib that makes working with gobject and
python-libserial a little nicer [2]

John

[1] http://github.com/nzjrs/wasp
[2] http://github.com/nzjrs/libserial

> 
> — Jason
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] idle_add vs. threads_enter/threads_leave

2010-07-07 Thread John Stowers
On Wed, 2010-07-07 at 09:26 +0800, Jason Heeris wrote:
> Tim Evans wrote:
> > GTK+ 2.14.4
> > PyGObject 2.14.2
> > PyGTK 2.12.1
> 
> Mine is
> 
> GTK+ 2.20
> PyGObject 2.21.2
> PyGTK 2.17.1
> 
> A few things about your changes confused me -
> 
> 1. You call glib.idle_add, but never called glib.threads_init - won't
> this break on Linux?
> 2. You use BOTH gtk.gdk.lock and glib.idle_add - but surely one of
> these is superfluous, since glib.idle_add executes the function in the
> main loop, where the lock is already acquired?
> 
> Anyway, I came up with a different, simpler way, but I don't know
> enough to say if it will never fail. I can't push to github from here,
> but basically it's the same as my first example[1] but with this main
> block for controller.py:
> 
> 
> if __name__ == "__main__":
> 
> import glib
> import gtk.gdk
> gtk.gdk.threads_init()
> glib.threads_init()
> 
> view = MyView()
> model = MyModel()
> controller = MyController(model, view)
> 
> with gtk.gdk.lock:
> LaunchUI(view)
> 
> 
> Works on both win32 and linux, using glib.idle_add throughout. I was a
> bit worried that trying to acquire the gtk.gdk.lock from the main
> thread would cause problems under linux as per [2], but it works fine.

This is more or less my approach to. On both windows and linux I
successfully use this idiom as follows

glib.threads_init()
gtk.gdk.threads_init()

class App:
  .. do ui stuff, start worker thread/s ..
  def main()
if is_windows: gtk.gdk.threads_enter()
gtk.main()
if is_windows: gtk.gdk.threads_leave()
  def frobnicate(self, foo):
return False

class ThreadWorker(threading.Thread)
  def run()
while self.running:
  if something_interesting():
 gobject.idle_add(self.app.frobnicate, foo,
priority=gobject.PRIORITY_HIGHEST)

or I use the idiom described here;
http://www.johnstowers.co.nz/blog/index.php/2007/03/12/threading-and-pygtk/

Which is basically the same, except ThreadWorker is also a GObject and
signal emission is done in idle_add, hence all connected signal callbacs
get called in the gtk.main thread

John
  
> 
> Lessons learnt:
> 
> 1. Call gtk.gdk.threads_init() BEFORE glib.threads_init() (otherwise
> glib.idle_add won't work)
> 2. Call them both before you do anything else
> 3. Start the main loop in the gtk.gdk.lock context manager or
> surrounded by gtk.gdk.threads_enter/leave()
> 
> Thanks for everyone's patience - I rarely have to develop under win32,
> so I'm not really aware of these gotchas.
> 
> - Jason
> 
> [1] http://github.com/detly/gtk-async-test
> [2] http://faq.pygtk.org/index.py?req=show&file=faq20.015.htp
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] What is "gobject.TYPE_BOXED"?

2010-07-07 Thread John Stowers
On Thu, Jul 8, 2010 at 2:48 PM, Jason Heeris  wrote:
> Looking through the PyGTK gobject type constants[1], I noticed the
> gobject.TYPE_BOXED constant. What is it, exactly? Does it have a use
> in Python not already filled by simply using PYOBJECT?

It is used to represent the GBoxed type, which wraps structures like
GdkRectangle or GtkColor (IIRC).

I can't think of a use outside of PyGObject, I think wrapped objects
are promoted to PyObjects when storing in things like a gtk.ListStore.
I suspect it is enumerated for completeness, you don't need to worry
about it.

John

>
> — Jason
>
> [1] 
> http://library.gnome.org/devel/pygobject/stable/gobject-constants.html#gobject-type-constants
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] PyGtk and gtk-3.0 compatibility

2010-07-05 Thread John Stowers
Hi,

First of all, PyGI and GObject introspection is the way forward.

Now, that being said, it seems a little silly to spend all this effort
porting C apps in GNOME to gtk-3.0 only to see the first PyGtk app drag
back in the gtk-2.0 libraries with "import gtk".

So I spent a little time trying to get PyGtk to build with GSEAL. Turns
out it wasn't that hard [1][2].

Only a few accessors were missing
  * GtkWindow.has_user_ref_count
  * GtkInvisible.has_user_ref_count
These both are used in the sink funcs, and seem to be a synonym
for checking the object has not been destroyed. 
  * gtk_menu_get_position_func{,_data}

So, what is the opinion on this? Is it worth me continuing? My idea
would be to make *only one* PyGtk release that builds against gtk-3.0,
it would see no new features.

John

[1] http://github.com/nzjrs/pygtk/commits/gtk-3.0
[2] http://github.com/nzjrs/pygobject/tree/gtk-3.0

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] How About a PyGtk Stable Release?

2010-07-05 Thread John Stowers
Hi All,

It would be great if we could do a PyGtk stable release to align with
the last gtk-2.0 release. I am happy to do this if no-one else wants to.

Also, would it be worth numbering this release as pygtk-2.22? It would
be nice if the version numbers matched again. Although this might not be
worth the effort if the pygobject version number != the glib version
number.

John

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] PyGObject and introspection concerns (was Re: PyGTK 2.17 for Windows)

2010-07-05 Thread John Stowers

> 
> This seems a little soft. Please do not take offence, but can this
> please be treated with similar stability guarantees and respect as gtk+
> - if your commit breaks backwards compatibility with no warning then it
> will be reverted.

Sorry,

s/will/should

I'm not the boss!

John

> 
> Regards,
> 
> John
> 
> 
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] PyGObject and introspection concerns (was Re: PyGTK 2.17 for Windows)

2010-07-05 Thread John Stowers

> > I just sent a mail to the python-hackers list with some of my queries.
> 
> Replying here as well as application authors will be interested.

Cool.

> 
> > But my concerns are basically
> >
> > * What is the state of the more advanced GObject features in PyGI
> >- _gsignals_, interface implementation, signal overrides, etc?
> 
> Interface implementation and vfunc override have been implemented. 
> Signals are handled by the good old code in PyGObject, but there are 
> plans to extend it to use also introspection information so we can write 
> a handler for a signal with GList parameters, for example. Same with 
> properties. Introspection classes use a metaclass that inherits from the 
> one in pygobject.

Ok, so the syntax for these remains the same?

> 
>  > * Are properties mapped to object.props.foo automatically?
> 
> Yup.
> 
>  > * Are the PyGtk helpers like GenericTreeModel supported?
> 
> J5 did some work to implement it as an override in Python, but I don't 
> know the status of it.
> 
> > * Has PyGI been used to port any non-trivial PyGtk apps yet?
> 
> There have been reports of non-trivial apps having been ported. One of 
> those:
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=621207#c3

That is encouraging then.

> 
> > * People who wrote plugins for GEdit, Totem, or anyone copying that
> >plugin implementation are now out in the cold. The upgrade path for
> >such plugins is "rewrite them to use PyGI"
> 
> I'm not sure I understand exactly how those people are left out in the 
> cold, but there are several people in the IRC channel working on plugins 
> support for GEdit.

AIUI the python plugin loader for libpeas is PyGI based, which links to
gtk-3.0, which means there is no upgrade path for those plugins except
to port to PyGI (i.e. import gtk brings in gtk-2.0, only one runtime per
process allowed...)

This does not seem developer friendly to me.

> 
> As a PyGObject maintainer, I would like to keep compatibility with older 
> stable releases but my own time to devote to that is limited. I would 
> like to encourage anybody interested on this to contribute by filing 
> bugs, helping triage, send patches and maybe helping with maintenance in 
> general.
> 
> This means that people interested in keep using the old static bindings 
> should be able to do so with future releases of PyGObject, but I warn 
> them that those static bindings represent lots of lines of code that 
> very little people want to maintain. And of course, new APIs are not 
> likely to be added.

This seems a little soft. Please do not take offence, but can this
please be treated with similar stability guarantees and respect as gtk+
- if your commit breaks backwards compatibility with no warning then it
will be reverted.

Regards,

John


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] PyGTK 2.17 for Windows

2010-07-02 Thread John Stowers
On Thu, 2010-07-01 at 15:33 +0200, Tomeu Vizoso wrote:
> On Thu, Jul 1, 2010 at 15:13, John Stowers  
> wrote:
> > On Thu, Jul 1, 2010 at 6:52 PM, Jason Heeris  wrote:
> >> I'm trying to get a PyGTK app going on a Windows XP installation. It
> >> requires PyGTK 2.17. I have Python 2.6 and GTK 2.18 set up just fine,
> >> but of course there's no binary installer for PyGTK 2.17. So I grabbed
> >> the source from FTP[1], along with PyGObject, intending to build it
> >> under MinGW.
> >>
> >> But it turns out I need PyGI to build PyGObject, and PyGI requires
> >> "Python development tools" to build, and searching the web for that
> >> problem yields nothing useful.
> >>
> >> So before I embark on some odyssey of pain trying to get this all to
> >> work, my question is: is there an easier way? A binary installer for
> >> PyGI for Windows? A binary installer for PyGTK 2.17?
> >
> > Hi,
> >
> > I have been generating the python installers for windows.
> >
> > It really is a shame that there was not a stable release of PyGobject
> > and PyGtk for so long, so now we are in this situation where the last
> > non-pygi release of PyGObject was technically an unstable one. I would
> > not like predict we will see a PyGtk release before/around the time of
> > the last stable Gtk+-2.0 series.
> >
> > This, and the fact that PyGtk has effectively been deprecated an
> > replaced with PyGI makes me nervous.
> 
> Which are the concerns?

I just sent a mail to the python-hackers list with some of my queries.
But my concerns are basically

* What is the state of the more advanced GObject features in PyGI
  - _gsignals_, interface implementation, signal overrides, etc?
* Has PyGI been used to port any non-trivial PyGtk apps yet?
* People who wrote plugins for GEdit, Totem, or anyone copying that
  plugin implementation are now out in the cold. The upgrade path for
  such plugins is "rewrite them to use PyGI"
* Support for MacOSX and Windows

John


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] PyGTK 2.17 for Windows

2010-07-01 Thread John Stowers
On Fri, Jul 2, 2010 at 3:27 PM, Jason Heeris  wrote:
> On 2 July 2010 10:54, Jason Heeris  wrote:
>> AFAIK, this is part of pygtk... so do I need PyGTK already installed
>> to build a new PyGTK? Or have a missed something?
>
> No, apparently a reboot was required after uninstalling PyGTK (certain
> files were scheduled for removal that could not be immediately
> removed). Now I can import all of the other modules fine...
>
> 
> $ python
> Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] 
> on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
 import gobject
 import glib
 import pango
 import cairo
 import atk
 ^Z
> 
>
> Now I get:
>
> $ python setup.py build --compiler=mingw32 --enable-threading 
> --yes-i-know-its-
> not-supported bdist_wininst
> c:\Python26\lib\site-packages\gtk-2.0\dsextras.py:354: DeprecationWarning: 
> objec
> t.__new__() takes no parameters
>  return object.__new__(cls,*args, **kwds)
> * numpy module could not be found, will build without numpy support.
> * libglade-2.0.pc could not be found, bindings for gtk.glade will not be 
> built.
> running build
> running build_py
> running build_ext
> using MinGW GCC version 3.4.5 with -mms-bitfields option
> building 'atk' extension
> writing build\temp.win32-2.6\Release\atk.def
> C:\MinGW\bin\gcc.exe -mno-cygwin -shared -s 
> build\temp.win32-2.6\Release\atkmodu
> le.o build\temp.win32-2.6\Release\atk.o build\temp.win32-2.6\Release\atk.def 
> -Lc
> :/GTK/lib -Lc:/GTK/lib -Lc:\Python26\libs -Lc:\Python26\PCbuild -latk-1.0 
> -lgobj
> ect-2.0 -lgthread-2.0 -lglib-2.0 -lintl -lgobject-2.0 -lgthread-2.0 
> -lglib-2.0 -
> lintl -lgthread-2.0 -lglib-2.0 -lintl -lpython26 -lmsvcr90 -o 
> build\lib.win32-2.
> 6\atk.pyd
> build\temp.win32-2.6\Release\atk.o:atk.c:(.text+0xfa6f): undefined reference 
> to
> `atk_hyperlink_impl_get_type'
> build\temp.win32-2.6\Release\atk.o:atk.c:(.text+0xfa89): undefined reference 
> to
> `atk_hyperlink_impl_get_hyperlink'
> build\temp.win32-2.6\Release\atk.o:atk.c:(.text+0xfadd): undefined reference 
> to
> `atk_hyperlink_impl_get_type'
> build\temp.win32-2.6\Release\atk.o:atk.c:(.text+0xfb2d): undefined reference 
> to
> `atk_hyperlink_impl_get_type'
> build\temp.win32-2.6\Release\atk.o:atk.c:(.text+0x13643): undefined reference 
> to
>  `atk_streamable_content_get_uri'
> build\temp.win32-2.6\Release\atk.o:atk.c:(.text+0x21421): undefined reference 
> to
>  `atk_hyperlink_impl_get_type'
> build\temp.win32-2.6\Release\atk.o:atk.c:(.text+0x21445): undefined reference 
> to
>  `atk_hyperlink_impl_get_type'
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
>
> Presumably ATK is the wrong version. But since I can't get PyGObject
> 2.21 to build (neither flag that Tomeu Vizoso mentioned is actually
> recognised by setup.py), can I just disable or ignore ATK?

This looks like you are building from the master branch. Please build
from the windows branch. I should update the instructions to make that
clear.

This branch contains a few fixes, like disabling parts of the bindings
that fail to build on windows.

John

>
> - Jason
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] PyGTK 2.17 for Windows

2010-07-01 Thread John Stowers
On Fri, Jul 2, 2010 at 2:54 PM, Jason Heeris  wrote:
> So I decided to start this whole thing over, since I went down the
> wrong path before. I uninstalled pygtk, but kept pycairo 1.8.6 and
> pygobject 2.20.0. Then I brought up a mingw console and followed the
> win32 build instructions[1].
>
> I get this error:
>
> $ python setup.py build --compiler=mingw32 --enable-threading
> --yes-i-know-its-not-supported bdist_wininst
> Traceback (most recent call last):
>  File "setup.py", line 22, in 
>    from dsextras import get_m4_define, getoutput, have_pkgconfig, \
> ImportError: No module named dsextras
>
> AFAIK, this is part of pygtk... so do I need PyGTK already installed
> to build a new PyGTK? Or have a missed something?

dsextras lives in PyGObject, which you must have installed first.

John

>
> - Jason
>
> [1] http://git.gnome.org/browse/pygtk/tree/README.win32
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] STUPID MPCUSTOMER.COM EMAIL AUTO-RESPONDER

2010-07-01 Thread John Stowers
Hi,

Excuse the yelling. Does anyone else get these annoying auto-responses
from supp...@mpcustomer.com when they reply to the list?

Can a list admin please take this email adress out behind a shed and shoot it?

Cheers,

John
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] PyGTK 2.17 for Windows

2010-07-01 Thread John Stowers
On Thu, Jul 1, 2010 at 6:52 PM, Jason Heeris  wrote:
> I'm trying to get a PyGTK app going on a Windows XP installation. It
> requires PyGTK 2.17. I have Python 2.6 and GTK 2.18 set up just fine,
> but of course there's no binary installer for PyGTK 2.17. So I grabbed
> the source from FTP[1], along with PyGObject, intending to build it
> under MinGW.
>
> But it turns out I need PyGI to build PyGObject, and PyGI requires
> "Python development tools" to build, and searching the web for that
> problem yields nothing useful.
>
> So before I embark on some odyssey of pain trying to get this all to
> work, my question is: is there an easier way? A binary installer for
> PyGI for Windows? A binary installer for PyGTK 2.17?

Hi,

I have been generating the python installers for windows.

It really is a shame that there was not a stable release of PyGobject
and PyGtk for so long, so now we are in this situation where the last
non-pygi release of PyGObject was technically an unstable one. I would
not like predict we will see a PyGtk release before/around the time of
the last stable Gtk+-2.0 series.

This, and the fact that PyGtk has effectively been deprecated an
replaced with PyGI makes me nervous.

Anyway, the windows installers are built from the windows branch. I
update this branch when I have managed to build a new installer. I
have not yet succeeded in buildinga PyGI based on on windows. I need
to update setup.py to add the necessary first.

I will try to get to this over the next week but no promises.

>
> Please keep me CCd on replies.
>
> Cheers,
> Jason Heeris
>
> PS. By the way, I usually work on a Debian Squeeze/Sid system, with
> PyGTK 2.17.0 (installed from Debian repo). I thought maybe I could
> take the 2.17 tarball and build it somewhere in my home dir, but:
>
> ~/Projects/python-virt2/pygobject-2.21.4$ ../bin/python setup.py build
> --compiler=mingw32 --enable-threading --yes-i-know-its-not-supported
> bdist_wininst
> Error: distutils build only supported on windows

Yip. I build the windows installers on windows. It looks like you are
building on linux. If you want me to remove this restriction then
convince me that it works - I am not interested in supporting
configurations I cannot test.

John

>
> Nuts.
>
> [1] http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.17/
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Error installing some required pyGTK componants

2010-06-13 Thread John Stowers
On Mon, Jun 14, 2010 at 12:24 PM, Anthony Papillion  wrote:
> SYSTEM ENVIROMENT: Microsoft Windows Vista Business
>
> PYTHON VERSION: 2.6
>
>
>
> I’m developing my very first Python GUI application and I’ve run into some
> problems. I’m trying to install pyCairo and pygObject which is required for
> creating GTK programs and get the following error at the end of both
> installs:

Hi,

Could you please post the exact versions of the software you tried to
install [1]

John

[1] In particulare the last point release in the Python 2.6 series
changed how extensions were linked against the VC dll AFAIUI

>
>
>
> close failed in file object destructor:
>
> Error in sys.excepthook:
>
>
>
> Original exception was:
>
>
>
> Notice, the ‘original exception; is blank. Always is.
>
>
>
> I know that this isn’t the pyCairo or pynObject lists but I’m hoping someone
> can help me get past this so I can move forward.
>
>
>
> Thanks!
>
> Anthony
>
>
>
> -
>
> Anthony Papillion
>
> Software Developer/IT Consultant
>
> Advanced Data Concepts, Inc.
>
>
>
> Phone:  (918) 320-9968
>
> Twitter:  www.twitter.com/cajuntechie
>
> Facebook:  www.facebook.com/cajuntechie
>
>
>
>
>
>
>
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] [jeenuv.otherinbox.com] Re: Drawing and signals

2010-06-09 Thread John Stowers
On Wed, 2010-06-09 at 22:15 +0530, Jeenu V wrote:
> On Wed, Jun 9, 2010 at 9:23 PM, Timo  wrote:
> > It is definatly possible with PyGTK. Use a gtk.Drawingarea to draw on
> > using Cairo.
> >
> > But if you do not like to write this all by yourself, someone else has
> > done a pretty good job already here: http://notmyname.github.com/pygtkChart/
> 
> Well, mine isn't exactly a graph. But I think I can refer pygtkChart
> as a starting point. Thanks for pointing out.

If you are looking for general drawing, click handling, etc then it
sounds like you should use a canvas. Check out goocanvas (and its python
bindings - http://live.gnome.org/PyGoocanvas)

John


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Which is the active radiobutton?

2010-06-03 Thread John Stowers
On Thu, Jun 3, 2010 at 8:05 PM, Timo  wrote:
> On 03-06-10 03:38, Brian Rowlands (Greymouth High School) wrote:
>>
>> Hi Guys
>>
>> Just a newbie using Python & Glade and have the code below:
>>
>> The GUI contains 4 radio buttons [ I'll call them four, three, two,
>> one  ] in a group called four. My research came across:
>>
>> radio = [r for r in cbc['four'].get_group() if r.get_active()]
>>
>> which gets me the active button with print radio giving me:
>>
>> []
>>
>> My question: how do i get the 'name' of the button which is active?
>>
> Every widget has the get_name() method. You could try that.

This is very likely not what you want, for example get_name() on a
gtk.Dialog returns "GtkDialog"

What I suspect happened was you did this

radio = [r for r in cbc['four'].get_group() if r.get_active()]
radio.get_label()

Which fails because radio is a list (not a gtk radiobutton). You
probably want something like

radio[0].get_label().get_text()

John
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] [jeenuv.otherinbox.com] Re: Import problem for PyGtk on Windows

2010-05-28 Thread John Stowers

> 
> Now that we have GtBuilder support, and libglade is effectively
> deprecated, I wanted to setup things so that I could distribute builds
> of Gtk+ that included Glade, and builds that did not (i.e. vanilla
^
I meant to say PyGtk

John

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] [jeenuv.otherinbox.com] Re: Import problem for PyGtk on Windows

2010-05-28 Thread John Stowers
On Fri, 2010-05-28 at 13:13 +0200, Rafael Villar Burke (Pachi) wrote:
> On 28/05/2010 12:06, John Stowers wrote:
> > I'm not sure if it is interesting enough for the average user, but what
> > do you think about putting the build instructions up on the website.
> >
> > I test the build every time something changes and update README.win32
> > accordingly. Perhaps the contents of this file could be incorporated
> > somehow?
> Indeed, I find it a really a good idea, John. IMHO, adding distutils 
> support for building the extensions is a really great feature. Thanks a 
> lot for working on it!
> 
> I've added a new section after the Get the sources! one with a link to 
> the README and README.win32 files.

Thanks a lot!

> 
> After reading the build instructions, I have some doubts that could be 
> clarified in the README[.win32] files:
> 
> - The title mentions setuptools builds, but AFAICT, just bare distutils 
> is used.

Hmm, you are correct. I often find myself mixing these terms
incorrectly.

> - Numpy and libglade support are mentioned in the git repository log, 
> but there's no information on how to enable/disable that support. 
> AFAICS, it's added if the modules/libraries are installed, but I can 
> imagine that disabling them may be useful.

Well it always struck me as odd that libglade support lived inside
PyGtk, i.e. import gtk.glade. 

Now that we have GtBuilder support, and libglade is effectively
deprecated, I wanted to setup things so that I could distribute builds
of Gtk+ that included Glade, and builds that did not (i.e. vanilla
PyGtk).

I should clarify that on the build instructions.

Anyway, I have some other enhancements (to dsutils.py) that I am almost
ready to merge that make it easy to create PyGtk apps that play nicely
with py2exe. These make it trivial to create executable pygtk apps for
windows.

> - What features does numpy bring to PyGTK?

Umm, no idea, I just kept the support there when I fixed up setup.py.

Can anyone else answer this?

John

> 
> Regards,
> 
> Pachi


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] [jeenuv.otherinbox.com] Re: Import problem for PyGtk on Windows

2010-05-28 Thread John Stowers
On Thu, 2010-05-27 at 11:37 +0200, Rafael Villar Burke (Pachi) wrote:
> 
> On 27/05/2010 11:03, Jeenu V wrote:
> > I'd suggest replacing the initial part (until glade) with this:
> >
> > Inorder to get PyGTK on Windows, you'd need:
> >* Python interpreter for Windows (for example, see
> >  http://www.activestate.com/activepython/downloads)
> >* GTK+ runtime. We recommend to install the GTK+ runtime using the 
> > official
> >  GTK+ bundle (gtk+-bundle*.zip
> >    files). To fully
> >  install this bundle you need to uncompress its contents in a folder and
> >  manually add the bin subfolder to the system path.
> >* PyGTK, PyCairo, PyGObject (available from this site - follow links 
> > above).
> >  When downloading those files you must make sure that the PyCairo,
> >  PyGobject and PyGTK versions fit the corresponding Python interpreter
> >  version and you have a recent enough GTK+ runtime.
> >
> Very nice. I've added a slightly modified version and will show up soon 
> on the website.
> Please, keep commenting on potential improvements like this to the 
> website. They're very welcome :).

I'm not sure if it is interesting enough for the average user, but what
do you think about putting the build instructions up on the website.

I test the build every time something changes and update README.win32
accordingly. Perhaps the contents of this file could be incorporated
somehow?

Regards,

John

> 
> Regards,
> 
> -Pachi
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Import problem for PyGtk on Windows

2010-05-20 Thread John Stowers
>
> 2) If you get to the point where you can import pygtk fine, but have
> trouble with 'import gtk', then I suggest you look at some Microsoft C
> runtime's, I have often found one of these (not sure which one) helps me
> on WinXP
>
> The Microsoft Visual C++ 2008 Redistributable Package (x86) installs
> runtime components of Visual C++ Libraries required to run applications
> developed with Visual C++ on a computer that does not have Visual C++
> 2008 installed.
> http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en
>
> The Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) installs
> runtime components of Visual C++ Libraries required to run applications
> developed with Visual C++ SP1 on a computer that does not have Visual
> C++ 2008 SP1 installed.
> http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en

Because I am never sure of the correct way to resolve these stupid
errors with runtime incompatibilities (which I think was in part due
to a bug in python 2.6.4) it is also really easy to build your own
installers for pygtk and pygobject.

Check out the windows branch (of pygtk and pygobject) from git and
follow the instructions in README.win32

This seems to circumvent all the runtime incompatibilities (because
then your built installer uses the runtime you had when you built the
installer AFAIK...). The instructions are very up to date - I check
they still work every few weeks.

Total build time is about 10 mins (including downloading and unzipping
all the dependencies etc)

John
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Packaging pygtk and friends as eggs

2010-04-26 Thread John Stowers
>
>
> Not sure if I missed something, .. but what do you mean by an all in one
> installer?
>
> I read it as you download one package from http://www.pygtk.org and you
> would get pyGTK, pyCairo, pyGObject installed as one monolithic package.
>
> I ask as I have previously put an NSIS wapper around GTK runtime, pyGTK,
> pyCario, pyGObject installers before, so the one setup.exe package fires
> off  4 separate installers, you still get 4 installation processes
> happening (and 4 sets of confirmation screens) within the bundle, but I
> don't think that is what your talking about when you say all-in-one
> installer.
>

Well I would be satisfied with that initially, an installer that just go and
executes the other installers in turn. Considering only this meta-installer
there is still room for improvement from the basic "install the runtime +
pygtk etc". For example, this meta-installer should consider
 * is there already GTK in the path, and what version
 * should it install python too
 * what if the user already has pygtk etc installed
 * possible more...

However, we both recognise that there is much else that could be done, I
dont know if anyone else has investigated how much work it is to get rid of
the 4 confirmation screens (does setuptools create installers that can be
run with no user intervention?) or to combine them all into one in another
safer manner.

What are your thoughts?

John


> - Steve
>
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/
>
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] Packaging pygtk and friends as eggs

2010-04-24 Thread John Stowers
On Sun, 2010-04-25 at 09:39 +1200, Mark Schafer wrote:
> if someone can give me a few pointers about where to begin (I assume 
> innosetup ?)
> I'll have a go at an all in one installer for windows

I have CC'd Alberto on this mail, as he created the first all in one
installer. He should be able to provide you with some more information.

John

> 
> On 4/24/2010 10:38 PM, John Stowers wrote:
> > Hi Thomas,
> >
> > Personally I prefer the package management system of my distro over that
> > of python eggs for many of the reasons others have mentioned.
> >
> >
> >> The problem here is that there aren't enough people working on easy
> >> installation of GTK+ and PyGTK on windows or OS X, so I'd say that any
> >> effort in that direction is very welcome.
> >>  
> > Agree with that. Now that I fixed up the setup.py for windows it is
> > pretty trivial to generate installers for PyGtk and PyGObject
> > (instructions in README.win32).
> >
> > At least in the windows case, I would appreciate if someone would go
> > ahead and create an all in one installer for PyGtk and , or at least
> > document the process.
> >
> > John
> >
> >
> >> Regards,
> >>
> >> Rafael Villar Burke
> >>
> >>
> >> ___
> >> pygtk mailing list   pygtk@daa.com.au
> >> http://www.daa.com.au/mailman/listinfo/pygtk
> >> Read the PyGTK FAQ: http://faq.pygtk.org/
> >>  
> >
> > ___
> > pygtk mailing list   pygtk@daa.com.au
> > http://www.daa.com.au/mailman/listinfo/pygtk
> > Read the PyGTK FAQ: http://faq.pygtk.org/
> >
> >
> >
> 
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] Packaging pygtk and friends as eggs

2010-04-24 Thread John Stowers
Hi Thomas,

Personally I prefer the package management system of my distro over that
of python eggs for many of the reasons others have mentioned.

> 
> The problem here is that there aren't enough people working on easy 
> installation of GTK+ and PyGTK on windows or OS X, so I'd say that any 
> effort in that direction is very welcome.

Agree with that. Now that I fixed up the setup.py for windows it is
pretty trivial to generate installers for PyGtk and PyGObject
(instructions in README.win32).

At least in the windows case, I would appreciate if someone would go
ahead and create an all in one installer for PyGtk and , or at least
document the process.

John

> 
> Regards,
> 
> Rafael Villar Burke
> 
> 
> ___
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] PyGtk Windows Build and Installers (again)

2010-04-16 Thread John Stowers
Hi All,

I have committed all the necessary work to make PyGtk/PyGObject
buildable on windows again (bug #589671). 

Windows installers will be built from the windows branch of the
respective libraries. The only difference between the windows branch and
master is the former has a few defs commented out that break the build.

I would appreciate any additional testing of this work. The plan is to
build some updated unstable installers soon, but more importantly,
everything is now in place to build and release working windows
installers at the same time, and corresponding to, the next stable PyGtk
and PyGObject releases.

John

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] pygtk Digest, Vol 86, Issue 11

2010-04-15 Thread John Stowers
On Thu, 2010-04-15 at 09:32 +0530, satheesh danda wrote:
> hello friends,
>   i have a doubt regarding the pygtk and glade.how to
> generate a manual code using glade file in pygtk.please provide the
> solution to me as soon as possible.

Hi,

I'm sorry I do not understand your question. If you are talking about
using glade to generate python code then dont!

If you are referring to using glade to design your UI then load it using
GtkBuilder then please check out the PyGtk docs, tutorial or

http://www.micahcarrick.com/12-24-2007/gtk-glade-tutorial-part-1.html

John

p.s. Please do not reply to digest mails


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


  1   2   3   >