[issue436103] Compiling pygtk

2022-04-10 Thread admin


Change by admin :


--
github: None -> 34665

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Replacement for pygtk?

2020-09-07 Thread Pete Forman
Akkana Peck  writes:

> Grant Edwards writes:
>>  * PyQt -- I run Gtk-centric Linux systems, and the second you try to
>>use one Qt widget, it always seems to pull in hundreds of packages
>>that take a week to build.
>
> I haven't generally found that about PyQt. Most KDE apps do pull in
> hundreds of packages, but I haven't had to install that many just to
> use PyQt.

Once you have one Qt app in a Gtk DE, or vice versa, then you have taken
most of the hit for packages. I doubt that many people run pure versions
of either.

-- 
Pete Forman
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Replacement for pygtk?

2020-09-06 Thread Grant Edwards
On 2020-09-06, Michael Torrie  wrote:
> On 9/4/20 3:24 PM, Grant Edwards wrote:
>> I assume that difference is because pygtk was hand-written and gi is
>> built auto-magically using SWIG or something like that?
>
> Essentially, yes.  Although pygobject does not use a tool like swig to
> generate static wrappers. Rather it uses the GTK introspection API to
> ask gobject's for their methods and attributes, and then marshalls and
> calls them at runtime.

I was wondering about that.  Some of the error messages you get when
you mistype something hinted that the "wrapping" is being done
on-the-fly.

> So you can use pygobject with any GObject-based binary library, not
> just GTK+.  Hope that makes sense.

Yes, I think so. I can see how it would be far less work that
maintaining something like pygtk.

--
Grant

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Replacement for pygtk?

2020-09-06 Thread Liste guru

Il 06/09/2020 06:20, Michael Torrie ha scritto:

On 9/4/20 3:24 PM, Grant Edwards wrote:

I assume that difference is because pygtk was hand-written and gi is
built auto-magically using SWIG or something like that?

Essentially, yes.  Although pygobject does not use a tool like swig to
generate static wrappers. Rather it uses the GTK introspection API to
ask gobject's for their methods and attributes, and then marshalls and
calls them at runtime. So you can use pygobject with any GObject-based
binary library, not just GTK+.  Hope that makes sense.


    AFAIK, from the source code / include files a .gir file is 
generated (an xml with all the functions, parameters and info).


    For example for a simple rectangle_int(x. y. width, height) in 
cairo you have:


    
  
    
  
  
    
  
  
    
  
  
    
  
    

    From this file a .typelib is generated (a binary, compact 
representation of the data) and the gi library, using this file and the 
.dll/.so, creates the correct bindings and function for the language you 
use (at runtime).


    Switching from Gtk 3.22 to Gtk 3.24 (or a new 3.26) is only a 
matter of using the new .typelib/.dll with your version of gi, at least 
until the gi folks puts the handling of the default values for parameters :)


    So with the gi package for your python (say 3.5.10) you can use all 
the Gtk versions, you don't have to recompile for example Gtk 3.24.13 
for your python/gi version.


    To have all the Gtk works with python 3.8 you have only to port / 
build the gi part (and on windows make some magic to handle the new path 
handling for the .dll search/load location, but this is another story).


    With best regards

        Daniele Forghieri




--
https://mail.python.org/mailman/listinfo/python-list


Re: Replacement for pygtk?

2020-09-05 Thread Michael Torrie
On 9/4/20 3:24 PM, Grant Edwards wrote:
> I assume that difference is because pygtk was hand-written and gi is
> built auto-magically using SWIG or something like that?

Essentially, yes.  Although pygobject does not use a tool like swig to
generate static wrappers. Rather it uses the GTK introspection API to
ask gobject's for their methods and attributes, and then marshalls and
calls them at runtime. So you can use pygobject with any GObject-based
binary library, not just GTK+.  Hope that makes sense.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Replacement for pygtk?

2020-09-05 Thread Akkana Peck
Grant Edwards writes:
> Is pygobject the replacement for pygtk?

The easiest way to use it, if you want a quick port with the
fewest code changes, is:

from gi import pygtkcompat
pygtkcompat.enable()
pygtkcompat.enable_gtk(version='3.0')

I don't know if pygtkcompat is going to be supported forever, or
will eventually be deprecated, but it does make porting very easy.
The harder way,

from gi.repository import Gtk

(plus Gdk, GdkPixbuf, Pango, PangoCairo etc.) might be more
future-proof but requires more porting effort.

Grant Edwards writes:
> I assume that difference is because pygtk was hand-written and gi is
> built auto-magically using SWIG or something like that?

Right. Which also has the unfortunate side effect that gi-imported
libraries usually have no built-in documentation -- you can't learn
much by typing help(object) or help(classname) in the Python console.
So you usually have to use the C documentation and guess at the
Python signatures.

> For native Linux apps I definitely prefer Gtk.  The other choices are
>extra complexity doesn't ever seem to buy me anything except
>MS-Windows compatibility [which did matter for a few of the apps I
>used to maintain].  The last time I looked into Gtk on Windows, it
>didn't sound usable, but that was many years ago.

A few years ago, pip install pygtk worked on Windows for gtk2 (in
fact, it *only* worked on Windows; it didn't work on Mac or Linux).
I suspect you can install the new gi version of GTK3 etc. via pip3,
but I haven't actually verified that.

On Mac, python-gtk2 was extremely difficult to install. I hope
python3/gi/GTK3 is easier. You can install these packages via pip
now on Linux, so I'd hope that's true on Mac as well.

>  * PyQt -- I run Gtk-centric Linux systems, and the second you try to
>use one Qt widget, it always seems to pull in hundreds of packages
>that take a week to build.

I haven't generally found that about PyQt. Most KDE apps do pull in
hundreds of packages, but I haven't had to install that many just to
use PyQt. I usually prefer GTK, but there are a few things PyQt
offers that aren't available in GTK any more, like an HTML
browser/viewer: python-webkit was only available for Python2
and there seems to be no GTK web viewer option now, whereas
PyQt5.QtWebEngineWidgets allow for a reasonably functional, if not
particularly well documented or configurable, HTML viewer.

>  * WxPython ­- It's bigger and far more complex than pygtk/gi and
>  [ ... ]
>  * Tkinter -- It's ugly on Linux (yea, I know there are supposed to be

TkInter and WxPython are fine for bringing up a quick window, but
when I've tried to use them for more complex apps, I usually
hit limitations in low-level areas like event handling or window
management. Though admittedly it's been years since I tried to write
anything nontrivial in either one, and they may have matured.

Grant Edwards writes:
> I'm still trying to figure out to "freeze" the size of a button so
> that when I change its contained label text on-the-fly it doesn't
> resize and shift everying else slightly.  I don't remember that
> happening with gtk2 (which I can no longer run), but I've no idea
> why...

If you figure that out, let me know: I have a couple of apps that
have that problem as well, and I've just been putting up with it.

...Akkana
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Replacement for pygtk?

2020-09-05 Thread Chris Green
Grant Edwards  wrote:
> > The nice thing about the gi module is it can wrap any gobject-based
> > library, not just GTK+ proper.  So if someone made a custom widget
> > in Vala, for example, you could access it via gi.  It's a neat
> > idea. My only problem with it is the resulting Python API is not
> > always as pythonic as pygtk code was.
> 
> I noticed that right away.  In pygtk, most methods (e.g. .pack_start)
> had named arguments with well chosen defaults. The vast majority of
> the time, I only supplied one argument for the pack_start() call.
> With gi's implementation of pack_start, there are no named parameters:
> they're all positional. You have to specify all four of them every
> time, even if the last three are False,False,0 95% of the time.  And
> the lack of names makes it impossible to figure out from reading the
> application source code what those last three actually mean.  [The
> first argument is obvious in context.]
> 
> I assume that difference is because pygtk was hand-written and gi is
> built auto-magically using SWIG or something like that?
> 
In my case a couple of constants/enums changed their names and of
course gtk becomes Gtk in many places.

-- 
Chris Green
·
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Replacement for pygtk?

2020-09-04 Thread Grant Edwards
On 2020-09-03, Michael Torrie  wrote:
> On 9/3/20 1:17 PM, Grant Edwards wrote:
>> On 2020-09-03, Grant Edwards  wrote:
>>> [...]
>>>
>>> Is pygobject the replacement for pygtk?
>> 
>> It seems to be.  I've started porting my pygtk app, and it's going
>> pretty smoothly.  I've already got my two custom widgets working.
>> Oddly, the main module provided by the gobject package is called "gi".
>
> It stands for "gobject introspection."

That's what I (later) suspected.

> The nice thing about the gi module is it can wrap any gobject-based
> library, not just GTK+ proper.  So if someone made a custom widget
> in Vala, for example, you could access it via gi.  It's a neat
> idea. My only problem with it is the resulting Python API is not
> always as pythonic as pygtk code was.

I noticed that right away.  In pygtk, most methods (e.g. .pack_start)
had named arguments with well chosen defaults. The vast majority of
the time, I only supplied one argument for the pack_start() call.
With gi's implementation of pack_start, there are no named parameters:
they're all positional. You have to specify all four of them every
time, even if the last three are False,False,0 95% of the time.  And
the lack of names makes it impossible to figure out from reading the
application source code what those last three actually mean.  [The
first argument is obvious in context.]

I assume that difference is because pygtk was hand-written and gi is
built auto-magically using SWIG or something like that?

> I can't think of any specific examples at the moment, however.  It's
> pretty much good enough to not care too much.

For native Linux apps I definitely prefer Gtk.  The other choices are

 * WxPython ­- It's bigger and far more complex than pygtk/gi and the
   extra complexity doesn't ever seem to buy me anything except
   MS-Windows compatibility [which did matter for a few of the apps I
   used to maintain].  The last time I looked into Gtk on Windows, it
   didn't sound usable, but that was many years ago.

 * PyQt -- I run Gtk-centric Linux systems, and the second you try to
   use one Qt widget, it always seems to pull in hundreds of packages
   that take a week to build.

 * Tkinter -- It's ugly on Linux (yea, I know there are supposed to be
   ways to fix that, but they never seem to work for me).  All of the
   tkinter apps I maintain all seem to have one or two widgets with
   behavior that's counter-intuitive.  When you bundle a trivial
   tkinter app (e.g. with cx-freeze), it ends up huge unless you put
   in a great deal of work manually excluding stuff you don't need.

Back when there was a gtk version of Wireshark, I usually didn't have
any Qt stuff installed at all. I'm still trying to get _that_ knife
pulled out of my back.  How dare somebody give me (for free) something
tremendously valuable and useful in a slightly different flavor than I
would prefer. ;)

> Similar arguments can be made against PyQt as well.  Especially with
> PyQt the end result feels a bit like writing C++ with a python
> syntax.

--
Grant

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Replacement for pygtk?

2020-09-04 Thread Grant Edwards
On 2020-09-04, Chris Green  wrote:
> Grant Edwards  wrote:
>> On 2020-09-03, Grant Edwards  wrote:
>> > [...]
>> >
>> > Is pygobject the replacement for pygtk?
>> 
>> It seems to be.  I've started porting my pygtk app, and it's going
>> pretty smoothly.  I've already got my two custom widgets working.
>> Oddly, the main module provided by the gobject package is called "gi".
>> 
> I think the 'i' is for instrospection - GTK Introspection.
>
> FWIW I ported some Python 2 GTK code to Python 3 and it wasn't *too*
> painful.  Run 2to3 on the code and then fix the odd syntax errors that
> remain.

The 2 -> 3 part is usually trivial except for bytes.  I work a lot
with raw data from serial ports and network sockets, and trying to
write programs that worked in both py2 and py3 was painful.  I've
started to abandon py2 support, and that makes it a lot easier.

The only part of the gtk code that didn't translate directly (or
almost so) was some pixbuf stuff.

I'm still trying to figure out to "freeze" the size of a button so
that when I change its contained label text on-the-fly it doesn't
resize and shift everying else slightly.  I don't remember that
happening with gtk2 (which I can no longer run), but I've no idea
why...

--
Grant


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Replacement for pygtk?

2020-09-04 Thread Chris Green
Grant Edwards  wrote:
> On 2020-09-03, Grant Edwards  wrote:
> > [...]
> >
> > Is pygobject the replacement for pygtk?
> 
> It seems to be.  I've started porting my pygtk app, and it's going
> pretty smoothly.  I've already got my two custom widgets working.
> Oddly, the main module provided by the gobject package is called "gi".
> 
I think the 'i' is for instrospection - GTK Introspection.

FWIW I ported some Python 2 GTK code to Python 3 and it wasn't *too*
painful.  Run 2to3 on the code and then fix the odd syntax errors that
remain.

-- 
Chris Green
·
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Replacement for pygtk?

2020-09-03 Thread Michael Torrie
On 9/3/20 1:17 PM, Grant Edwards wrote:
> On 2020-09-03, Grant Edwards  wrote:
>> [...]
>>
>> Is pygobject the replacement for pygtk?
> 
> It seems to be.  I've started porting my pygtk app, and it's going
> pretty smoothly.  I've already got my two custom widgets working.
> Oddly, the main module provided by the gobject package is called "gi".

It stands for "gobject introspection." The nice thing about the gi
module is it can wrap any gobject-based library, not just GTK+ proper.
So if someone made a custom widget in Vala, for example, you could
access it via gi.  It's a neat idea. My only problem with it is the
resulting Python API is not always as pythonic as pygtk code was.  I
can't think of any specific examples at the moment, however.  It's
pretty much good enough to not care too much.  Similar arguments can be
made against PyQt as well.  Especially with PyQt the end result feels a
bit like writing C++ with a python syntax.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Replacement for pygtk?

2020-09-03 Thread Grant Edwards
On 2020-09-03, Grant Edwards  wrote:
> [...]
>
> Is pygobject the replacement for pygtk?

It seems to be.  I've started porting my pygtk app, and it's going
pretty smoothly.  I've already got my two custom widgets working.
Oddly, the main module provided by the gobject package is called "gi".


-- 
https://mail.python.org/mailman/listinfo/python-list


Replacement for pygtk?

2020-09-03 Thread Grant Edwards
Many years ago I wrote an app that uses pygtk for it's GUI.  I still
use the app occasionally, and would like to keep it alive.  Emerge
informs me that dev-python/pygtk is scheduled for removal.

Is pygobject the replacement for pygtk?

--
Grant


-- 
https://mail.python.org/mailman/listinfo/python-list


[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2018-07-28 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2018-07-28 Thread Steve Dower

Steve Dower  added the comment:


New changeset 0041d721a6f6b312ef762838d390fc4d64cf5e3a by Steve Dower (Andrés 
Delfino) in branch '3.6':
[3.6] bpo-5978: Document that profiling needs cmd/function to return (GH-8515)
https://github.com/python/cpython/commit/0041d721a6f6b312ef762838d390fc4d64cf5e3a


--
nosy: +steve.dower

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2018-07-28 Thread miss-islington


miss-islington  added the comment:


New changeset c6801b48a1964d87a77f1303e0c6ddf31f54259b by Miss Islington (bot) 
in branch '3.7':
bpo-5978: Document that profiling needs cmd/function to return (GH-7938)
https://github.com/python/cpython/commit/c6801b48a1964d87a77f1303e0c6ddf31f54259b


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2018-07-28 Thread Andrés Delfino

Change by Andrés Delfino :


--
pull_requests: +8032

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2018-07-28 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8029

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2018-07-28 Thread Christian Heimes

Christian Heimes  added the comment:


New changeset 937fb55d35373fd2701078251840b6be0465a6e1 by Christian Heimes 
(Andrés Delfino) in branch 'master':
bpo-5978: Document that profiling needs cmd/function to return (GH-7938)
https://github.com/python/cpython/commit/937fb55d35373fd2701078251840b6be0465a6e1


--
nosy: +christian.heimes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2018-06-26 Thread Andrés Delfino

Change by Andrés Delfino :


--
nosy: +adelfino
versions: +Python 2.7, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2018-06-26 Thread Andrés Delfino

Change by Andrés Delfino :


--
keywords: +patch
pull_requests: +7548
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2018-02-11 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
keywords: +easy
stage:  -> needs patch
type: behavior -> enhancement
versions: +Python 3.8 -Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Python 3 pyGtk graphical curve and surface fitter

2016-07-23 Thread zunzun . com
I created a Python 3 pyGtk graphical curve and surface fitting application, the 
URL in GitHub is:

https://github.com/zunzun/pyGtkFit

James Phillips
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Re: pygtk button right/middle click

2016-03-30 Thread Wildman via Python-list
On Wed, 30 Mar 2016 19:23:35 +, Grant Edwards wrote:

> On 2016-03-30, Grant Edwards <invalid@invalid.invalid> wrote:
>> On 2016-03-30, Wildman <best_...@yahoo.com> wrote:
>>
>>>> Is the gtk button widget really incapable of handling left or middle
>>>> mouse buttons or shift/ctrl/alt modifiers?
>>>
>>> This might help...
>>>
>>> http://faq.pygtk.org/index.py?req=show=faq05.004.htp
>>
>> Yep, I found that.  I'm just missing the clues required to use those
>> two pieces.
> 
> FWIW, I've decided to give up on this.  Since it took only a few lines
> of code to handle the "left" click, I assumed that like some other
> toolkits, it would be similarly easy to handle "right" and "middle".
> 
> I don't have the time to re-invent the wheel at the moment, so this
> project will have to be postponed.

I'm sorry to say I have no experience using pygtk.  My only gui
experience is with Tkinter.  In Tk you would do something like
this to trap a right-click.

# create the popup menu and add commands as needed
self.menu = tk.Menu(self, tearoff=0)
self.menu.add_command(label="Whatever",
  command=self.do_whatever)

# bind the button with mouse right-click
self.button.bind("", self.popup)

# define the handler for the menu
def do_whatever(self):
# do whatever

# define the popup handler, this displays the menu
def popup(self, event):
self.menu.post(event.x_root, event.y_root)

I posted this on the off chance there might be a way to translate
this to gtk code.

-- 
 GNU/Linux user #557453
"The Constitution only gives people the right to
pursue happiness. You have to catch it yourself."
  -Benjamin Franklin
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pygtk button right/middle click

2016-03-30 Thread Grant Edwards
On 2016-03-30, Grant Edwards  wrote:
> On 2016-03-30, Wildman  wrote:
>
>>> Is the gtk button widget really incapable of handling left or middle
>>> mouse buttons or shift/ctrl/alt modifiers?
>>
>> This might help...
>>
>> http://faq.pygtk.org/index.py?req=show=faq05.004.htp
>
> Yep, I found that.  I'm just missing the clues required to use those
> two pieces.

FWIW, I've decided to give up on this.  Since it took only a few lines
of code to handle the "left" click, I assumed that like some other
toolkits, it would be similarly easy to handle "right" and "middle".

I don't have the time to re-invent the wheel at the moment, so this
project will have to be postponed.

-- 
Grant Edwards   grant.b.edwardsYow! I want to mail a
  at   bronzed artichoke to
  gmail.comNicaragua!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pygtk button right/middle click

2016-03-30 Thread Grant Edwards
On 2016-03-30, Wildman  wrote:

>> Is the gtk button widget really incapable of handling left or middle
>> mouse buttons or shift/ctrl/alt modifiers?
>
> This might help...
>
> http://faq.pygtk.org/index.py?req=show=faq05.004.htp

Yep, I found that.  I'm just missing the clues required to use those
two pieces.

-- 
Grant Edwards   grant.b.edwardsYow! My face is new, my
  at   license is expired, and I'm
  gmail.comunder a doctor's care
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pygtk button right/middle click

2016-03-30 Thread Wildman via Python-list
On Wed, 30 Mar 2016 15:36:12 +, Grant Edwards wrote:

> I'm trying to figure out how to get a pygtk button respond to
> somehting other than just a simple "left click".  With a standard
> 3-button mouse, X11 provides at least 9 different "click" types, but
> the pygtk button only seems to support one of them.
> 
> [Yes, I know there are left-handled mouse configurations -- by "left"
> click I'm using the common term to mean the primary mouse button.]
> 
> After googling for some time, I haven't found any good answers.  Some
> people just say things like "use the button_release_event signal of
> the button widget".
> 
> But, that signal is depricated (and AFAICT still doesn't make the
> button actually respond to the left/middle click by "depressing" the
> way it should).
> 
> Other answers are things like "you'll have to write you own button
> class in C, not C++".
> 
> Is the gtk button widget really incapable of handling left or middle
> mouse buttons or shift/ctrl/alt modifiers?

This might help...

http://faq.pygtk.org/index.py?req=show=faq05.004.htp

-- 
 GNU/Linux user #557453
May the Source be with you.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pygtk button right/middle click

2016-03-30 Thread Grant Edwards
On 2016-03-30, Chris Angelico <ros...@gmail.com> wrote:
> On Thu, Mar 31, 2016 at 2:36 AM, Grant Edwards <invalid@invalid.invalid> 
> wrote:
>> I'm trying to figure out how to get a pygtk button respond to
>> somehting other than just a simple "left click".  With a standard
>> 3-button mouse, X11 provides at least 9 different "click" types, but
>> the pygtk button only seems to support one of them.
>
> You're looking at a couple of different, but related, things. The
> clicked() event means "the button was activated", which might have
> been caused by a mouse event, or possibly a keyboard or other
> activation.

Right.

> What you want is to react to other forms of mouse event. For that,
> you should be able to hook the generic widget handling...

So I've got to re-implement all the low-level stuff that the button
already does for the "left" button (changing appearance on
button-press and restoring it on button-release), calling the handler,
etc.  I sure seems like the batteries are missing...

-- 
Grant Edwards   grant.b.edwardsYow! Hmmm ... A hash-singer
  at   and a cross-eyed guy were
  gmail.comSLEEPING on a deserted
   island, when ...
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pygtk button right/middle click

2016-03-30 Thread Chris Angelico
On Thu, Mar 31, 2016 at 2:36 AM, Grant Edwards <invalid@invalid.invalid> wrote:
> I'm trying to figure out how to get a pygtk button respond to
> somehting other than just a simple "left click".  With a standard
> 3-button mouse, X11 provides at least 9 different "click" types, but
> the pygtk button only seems to support one of them.

You're looking at a couple of different, but related, things. The
clicked() event means "the button was activated", which might have
been caused by a mouse event, or possibly a keyboard or other
activation.

What you want is to react to other forms of mouse event. For that, you
should be able to hook the generic widget handling...

> After googling for some time, I haven't found any good answers.  Some
> people just say things like "use the button_release_event signal of
> the button widget".

... which is what this is talking about. What you'll get is button
press and release events, and it'll be up to you to figure out if they
represent clicks or not. But you'll get events for every mouse button
that way.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


pygtk button right/middle click

2016-03-30 Thread Grant Edwards
I'm trying to figure out how to get a pygtk button respond to
somehting other than just a simple "left click".  With a standard
3-button mouse, X11 provides at least 9 different "click" types, but
the pygtk button only seems to support one of them.

[Yes, I know there are left-handled mouse configurations -- by "left"
click I'm using the common term to mean the primary mouse button.]

After googling for some time, I haven't found any good answers.  Some
people just say things like "use the button_release_event signal of
the button widget".

But, that signal is depricated (and AFAICT still doesn't make the
button actually respond to the left/middle click by "depressing" the
way it should).

Other answers are things like "you'll have to write you own button
class in C, not C++".

Is the gtk button widget really incapable of handling left or middle
mouse buttons or shift/ctrl/alt modifiers?

-- 
Grant Edwards   grant.b.edwardsYow! CHUBBY CHECKER just
  at   had a CHICKEN SANDWICH in
  gmail.comdowntown DULUTH!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pygtk beginner script not working

2015-11-15 Thread kent nyberg

On Sat, Nov 14, 2015 at 05:00:59PM -0800, ja...@imagewebdesign.co.uk wrote:
> Hi guys
> 
> I'm new to Python so please bare with me :)
> 
> I'm using python 2.7.10 as advised (more tools apparently over 3.x)
> 
> Trying to use this script
> 
> [CODE]
> #!/usr/bin/env python
> 
> # example base.py
> 
> import pygtk

It makes most sense to use gtk3 and not gtk2.
The most recenst version of gtk3 is used with
gi package.

Read this for example:
http://python-gtk-3-tutorial.readthedocs.org/en/latest/introduction.html

-- 
https://mail.python.org/mailman/listinfo/python-list


pygtk beginner script not working

2015-11-14 Thread james
Hi guys

I'm new to Python so please bare with me :)

I'm using python 2.7.10 as advised (more tools apparently over 3.x)

Trying to use this script

[CODE]
#!/usr/bin/env python

# example base.py

import pygtk

pygtk.require('2.0')
import gtk

class Base:
   def __init__(self):
  self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
  self.window.show()

def main(self):
   gtk.main()
   
   print __name__
   if __name__ == "__main__":
  base = Base()
  base.main()
[/CODE]

But get this error:

[i]File "C:\Users\CMDEV\Desktop\Py\pygtk_1.py", line 5, in 
import pygtk
ImportError: No module named pygtk[/i]

I've check the install and everything reports its installed right:

Here's a grab of the CLI


[CODE]
C:\Python27>easy_install -U pygtk
Searching for pygtk
Reading https://pypi.python.org/simple/pygtk/
Reading http://ftp.acc.umu.se/pub/gnome/binaries/win32/pygtk/2.24/
Reading http://www.daa.com.au/~james/pygtk/
Reading http://www.daa.com.au/~james/software/pygtk/
Reading http://www.pygtk.org
Reading http://www.pygtk.org/
Best match: pygtk 2.24.0
Processing pygtk-2.24.0-py2.7-win32.egg
pygtk 2.24.0 is already the active version in easy-install.pth
Installing pygtk_postinstall.py script to C:\Python27\Scripts
Installing pygtk_postinstall.pyc script to C:\Python27\Scripts

Using c:\python27\lib\site-packages\pygtk-2.24.0-py2.7-win32.egg
Processing dependencies for pygtk
Finished processing dependencies for pygtk

C:\Python27>python C:\Users\CMDEV\Desktop\Py\pygtk_1.py
Traceback (most recent call last):
  File "C:\Users\CMDEV\Desktop\Py\pygtk_1.py", line 5, in 
import pygtk
ImportError: No module named pygtk
[/CODE]


(not used google groups before to post on so not sure if BB code works here... 
also there doesn't seem to be a preview button so no idea how this turns out)

Cheers
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2014-02-03 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy:  -BreamoreBoy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5978
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



pyGTK Help Needed Please

2013-09-20 Thread bingefeller
Hi folks,

I'm trying to run a program called Nicotine+ on my Mac which is running 10.8.5. 
Nicotine+ requires GTK2, pyGTK2 and Python to run. I believe I have all of 
these installed via Macports (please see here - http://pastebin.com/nwmrpp2Y )

When I try to run Nicotine+ I get this message:

'/Users/**/Downloads/nicotine+-1.2.16', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
 
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
 
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
 '/Library/Python/2.7/site-packages']
Exception: No module named pygtk


If I run Python and type import pygtk I get this message:

Traceback (most recent call last):
File stdin, line 1, in module
ImportError: No module named pygtk


can anyone help me please?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pyGTK Help Needed Please

2013-09-20 Thread Michael Torrie
On 09/20/2013 12:30 PM, bingefel...@gmail.com wrote:
 Hi folks,
 
 I'm trying to run a program called Nicotine+ on my Mac which is running 
 10.8.5. Nicotine+ requires GTK2, pyGTK2 and Python to run. I believe I have 
 all of these installed via Macports (please see here - 
 http://pastebin.com/nwmrpp2Y )
 
 When I try to run Nicotine+ I get this message:
 
 '/Users/**/Downloads/nicotine+-1.2.16', 
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', 
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', 
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
  
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
  
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
  
 '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', 
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
  
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
  
 '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
  
 '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC',
  '/Library/Python/2.7/site-packages']
 Exception: No module named pygtk
 
 
 If I run Python and type import pygtk I get this message:
 
 Traceback (most recent call last):
 File stdin, line 1, in module
 ImportError: No module named pygtk
 
 
 can anyone help me please?

You probably need to run the program using the version of Python that's
installed in MacPorts.  Your system python does not know anything about
MacPorts, so it obviously can't find pyGTK, since it's not in the system
library location.  I can't remember where MacPorts puts things, but
presumably you'd have to do edit the nicotine+-1.2.16 file and change
the first line to point to the MacPorts version of python.
-- 
https://mail.python.org/mailman/listinfo/python-list


How to change scrollbar color in pygtk ?

2013-08-21 Thread Norah Jones
Hi, 

I Tried the below code, the color is not reflected, Am i missing something?

#add description box beside test cases
testCaseDescWindow = gtk.ScrolledWindow()
testCaseDescWindow.set_policy(gtk.POLICY_AUTOMATIC, 
gtk.POLICY_AUTOMATIC)

testCaseDescWindow.get_vscrollbar().modify_fg(gtk.STATE_NORMAL,gtk.gdk.color_parse('#40515F'))

testCaseDescWindow.get_hscrollbar().modify_fg(gtk.STATE_NORMAL,gtk.gdk.color_parse('#40515F'))


Thanks,
Norah Jones


-- 
http://mail.python.org/mailman/listinfo/python-list


Pygtk entry readline

2013-02-02 Thread Matthias Fulz
Hi,

does anybody know howto connect / use a gtk entry as frontend for
readline in- / output?

I couldn't find anything on the net for my problem.

Basicly I've a working readline autocomplete, which I can use without
problems via input function, but I want to use that in an gtk gui inside
an entry or textbox, etc.

Thanks,

Matthias

-- 
Wer A sagt, der muss nich B sagen, Er
kann auch erkennen, dass A falsch war.

 GPG key: 1814DA35 
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how to compile pygtk in python2.7?

2012-07-08 Thread contro opinion
it's so strange
 when i input
hisroty

  506  cd  /home/tiger/pygtk-2.24.0
  507  PYTHON=/usr/local/bin/python2.7  ./configure --prefix=/usr
  508  echo  $? #i get  0  ,it means  success??
  509  make
  510  echo  $?  #i get  0  ,it means  success??
  511  make install
  512  echo  $?#i get  0  ,it means  success??

no wrong output  can  see .

root@ocean:~# python2.7
Python 2.7.3 (default, Jul  1 2012, 14:13:18)
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.
 import gtk
Traceback (most recent call last):
  File stdin, line 1, in module
ImportError: No module named gtk




2012/7/8 Chris Angelico ros...@gmail.com

 On Sun, Jul 8, 2012 at 2:47 PM, contro opinion contropin...@gmail.com
 wrote:
  3.PYTHON=/usr/bin/python2.7  ./configure --prefix=/usr
  4. make
  5. make install

 What happened when you typed these commands? Were there failure
 messages? As Benjamine suggested, do you need to become root to
 install?

 ChrisA
 --
 http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how to compile pygtk in python2.7?

2012-07-08 Thread Chris Angelico
On Sun, Jul 8, 2012 at 6:26 PM, contro opinion contropin...@gmail.com wrote:
 it's so strange
  when i input
 hisroty

   506  cd  /home/tiger/pygtk-2.24.0
   507  PYTHON=/usr/local/bin/python2.7  ./configure --prefix=/usr
   508  echo  $? #i get  0  ,it means  success??
   509  make
   510  echo  $?  #i get  0  ,it means  success??
   511  make install
   512  echo  $?#i get  0  ,it means  success??

 no wrong output  can  see .

Any output at all? Normally configure and make will produce long
screeds. If they didn't, that's wrong output.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how to compile pygtk in python2.7?

2012-07-08 Thread contro opinion
  1.PYTHON=/usr/local/bin/python2.7  ./configure --prefix=/usr
the output is :
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for bind_textdomain_codeset... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for some Win32 platform... no
checking for native Win32... no
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands +=... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared
libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.lt
config.lt: creating libtool
checking whether /usr/local/bin/python2.7 version = 2.3.5... yes
checking for /usr/local/bin/python2.7 version... 2.7
checking for /usr/local/bin/python2.7 platform... linux2
checking for /usr/local/bin/python2.7 script directory...
${prefix}/lib/python2.7/site-packages
checking for /usr/local/bin/python2.7 extension module directory...
${exec_prefix}/lib/python2.7/site-packages
checking for headers required to compile python extensions... found
checking for PySignal_SetWakeupFd in Python.h... yes
checking for python module thread... yes
checking whether to enable threading in pygtk... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.16... yes
checking for GLIB - version = 2.8.0... yes (version 2.24.2)
checking for PYGOBJECT... yes
checking for gio-types.defs...
/usr/share/pygobject/2.0/defs/gio-types.defs
checking for ATK... yes
checking for PANGO... yes
checking for codegen... /usr/share/pygobject/2.0/codegen
checking for PYCAIRO... yes
checking for PANGOCAIRO... yes
checking for GTK... yes
checking for GTK210... yes
checking for GTK212... yes
checking for GTK214... yes
checking for GTK216... yes
checking for GTK218... yes
checking for GTK220... yes
checking for GTK222... no
no
checking for GTK224... no
no
checking for LIBGLADE... yes
checking for GTKUNIXPRINT... yes
checking

Re: how to compile pygtk in python2.7?

2012-07-08 Thread contro opinion
2.make
the output is :
Could not write method GdkFont.text_width_wc: No ArgType for
const-GdkWChar*
Could not write method GdkFont.char_width_wc: No ArgType for GdkWChar
Could not write method GdkFont.text_extents_wc: No ArgType for
const-GdkWChar*
Could not write method GdkFont.string_extents: No ArgType for gint*
Could not write method GdkFont.get_xfont: No ArgType for gpointer
Could not write method GdkFont.x11_font_get_xdisplay: No ArgType for
Display*
Could not write method GdkCursor.get_xdisplay: No ArgType for Display*
Could not write method GdkCursor.get_xcursor: No ArgType for Cursor
Could not write method GdkRegion.spans_intersect_foreach: No ArgType
for GdkSpan*
Could not write method GdkRegion.rect_equal: No ArgType for
const-GdkRectangle*
Warning: generating old-style constructor for:gdk_colormap_new
Could not write method GdkColormap.alloc_colors: No ArgType for
gboolean*
Could not write method GdkColormap.get_xdisplay: No ArgType for Display*
Could not write method GdkColormap.get_xcolormap: No ArgType for
Colormap
Warning: generating old-style constructor for:gdk_display_open
Could not write method GdkDisplay.add_client_message_filter: No ArgType
for GdkFilterFunc
Could not write method GdkDisplay.set_pointer_hooks: No ArgType for
const-GdkDisplayPointerHooks*
Could not write method GdkDisplay.get_xdisplay: No ArgType for Display*
Could not write method GdkDisplay.set_cursor_theme: No ArgType for
const-gint
Could not write method GdkDrawable.set_data: No ArgType for gpointer
Could not write method GdkDrawable.get_data: No ArgType for gpointer
Could not write method GdkDrawable.draw_text_wc: No ArgType for
const-GdkWChar*
Could not write method GdkDrawable.get_xdisplay: No ArgType for Display*
Could not write method GdkDrawable.get_xid: No ArgType for XID
Could not write virtual accessor method GdkDrawable.create_gc: No
ArgType for GdkGCValues*
Could not write virtual accessor method GdkDrawable.draw_polygon: No
ArgType for GdkPoint*
Could not write virtual accessor method GdkDrawable.draw_text_wc: No
ArgType for const-GdkWChar*
Could not write virtual accessor method GdkDrawable.draw_points: No
ArgType for GdkPoint*
Could not write virtual accessor method GdkDrawable.draw_segments: No
ArgType for GdkSegment*
Could not write virtual accessor method GdkDrawable.draw_lines: No
ArgType for GdkPoint*
Could not write virtual accessor method GdkDrawable.get_size: No
ArgType for gint*
Could not write virtual accessor method
GdkDrawable.get_composite_drawable: No ArgType for gint*
Could not write virtual accessor method GdkDrawable.draw_trapezoids: No
ArgType for GdkTrapezoid*
Could not write virtual accessor method GdkDrawable.ref_cairo_surface:
No ArgType for cairo_surface_t*
Could not write virtual proxy GdkDrawable.create_gc: No ArgType for
GdkGCValues*
Could not write virtual proxy GdkDrawable.draw_polygon: No ArgType for
GdkPoint*
Could not write virtual proxy GdkDrawable.draw_text_wc: No ArgType for
const-GdkWChar*
Could not write virtual proxy GdkDrawable.draw_points: No ArgType for
GdkPoint*
Could not write virtual proxy GdkDrawable.draw_segments: No ArgType for
GdkSegment*
Could not write virtual proxy GdkDrawable.draw_lines: No ArgType for
GdkPoint*
Could not write virtual proxy GdkDrawable.get_size: cannot use int*
parameter with direction 'None'
Could not write virtual proxy GdkDrawable.get_composite_drawable:
cannot use int* parameter with direction 'None'
Could not write virtual proxy GdkDrawable.draw_trapezoids: No ArgType
for GdkTrapezoid*
Could not write virtual proxy GdkDrawable.ref_cairo_surface: No ArgType
for cairo_surface_t*
Could not write method GdkWindow.selection_property_get: No ArgType for
guchar**
Could not write method GdkWindow.remove_filter: No ArgType for
GdkFilterFunc
Could not write method GdkWindow.invalidate_maybe_recurse: No ArgType
for gboolean (*child_func)(GdkWindow *, gpointer)
Could not write method GdkWindow.get_internal_paint_info: No ArgType
for GdkDrawable**
Could not write method GdkWindow.get_root_coords: No ArgType for gint*
Warning: generating old-style constructor for:gdk_pango_renderer_new
Warning: generating old-style constructor for:gdk_pixmap_new
Could not write method GdkGC.get_values: No ArgType for GdkGCValues*
Could not write method GdkGC.get_xdisplay: No ArgType for Display*
Could not write method GdkGC.get_xgc: No ArgType for GC
Could not write virtual accessor method GdkGC.get_values: No ArgType
for GdkGCValues*
Could not write virtual accessor method GdkGC.set_values: No ArgType
for GdkGCValues*
Could not write virtual accessor method GdkGC.set_dashes: No ArgType
for gint8[]
Could not write virtual proxy GdkGC.get_values: No ArgType for
GdkGCValues*
Could not write virtual proxy 

how to compile pygtk in python2.7?

2012-07-07 Thread contro opinion
1.download  pygtk

2.cd /home/tiger/pygtk-2.24.0

3.PYTHON=/usr/bin/python2.7  ./configure --prefix=/usr
4. make
5. make install

*tiger@ocean:~$ python2.7
Python 2.7.3 (default, Jul  1 2012, 14:13:18)
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.
 import gtk
Traceback (most recent call last):
  File stdin, line 1, in module
ImportError: No module named gtk
 *

 i can't compile pygtk in python2.7,how to compile it?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how to compile pygtk in python2.7?

2012-07-07 Thread Benjamin Kaplan
On Sat, Jul 7, 2012 at 9:47 PM, contro opinion contropin...@gmail.com wrote:
 1.download  pygtk

 2.cd /home/tiger/pygtk-2.24.0

 3.PYTHON=/usr/bin/python2.7  ./configure --prefix=/usr
 4. make
 5. make install

 tiger@ocean:~$ python2.7
 Python 2.7.3 (default, Jul  1 2012, 14:13:18)
 [GCC 4.4.5] on linux2
 Type help, copyright, credits or license for more information.
 import gtk
 Traceback (most recent call last):
   File stdin, line 1, in module
 ImportError: No module named gtk


  i can't compile pygtk in python2.7,how to compile it?

 --

What is the output of make and make install? Does it compile
successfully, or is there an error? Does the current user have
permission to write to /usr?

You haven't given us enough information to figure out what's going on?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: how to compile pygtk in python2.7?

2012-07-07 Thread Chris Angelico
On Sun, Jul 8, 2012 at 2:47 PM, contro opinion contropin...@gmail.com wrote:
 3.PYTHON=/usr/bin/python2.7  ./configure --prefix=/usr
 4. make
 5. make install

What happened when you typed these commands? Were there failure
messages? As Benjamine suggested, do you need to become root to
install?

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Getting started with PyGTK [Receiving Error]

2012-04-28 Thread Santosh Kumar
System Information

Ubuntu 11.10
Python 2.7.2

Problem


I think my Ubuntu has PyGTK and GTK both already installed. But
however when I am importing gtk in Python interactive mode then I am
getting the following warning:

(.:4126): Gtk-WARNING **: Unable to locate theme engine in
module_path: pixmap,

(.:4126): Gtk-WARNING **: Unable to locate theme engine in
module_path: pixmap,

(.:4126): Gtk-WARNING **: Unable to locate theme engine in
module_path: pixmap,

(.:4126): Gtk-WARNING **: Unable to locate theme engine in
module_path: pixmap,

On the other side, importing PyGTK works well (i.e. I don't receive
any error). What might be error?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Getting started with PyGTK [Receiving Error]

2012-04-28 Thread Vincent Vande Vyvre
Le 29/04/12 00:52, Santosh Kumar a écrit :
 System Information
 
 Ubuntu 11.10
 Python 2.7.2

 Problem
 

 I think my Ubuntu has PyGTK and GTK both already installed. But
 however when I am importing gtk in Python interactive mode then I am
 getting the following warning:

 (.:4126): Gtk-WARNING **: Unable to locate theme engine in
 module_path: pixmap,

 (.:4126): Gtk-WARNING **: Unable to locate theme engine in
 module_path: pixmap,

 (.:4126): Gtk-WARNING **: Unable to locate theme engine in
 module_path: pixmap,

 (.:4126): Gtk-WARNING **: Unable to locate theme engine in
 module_path: pixmap,

 On the other side, importing PyGTK works well (i.e. I don't receive
 any error). What might be error?
It's a behaviour of GTK, not an error in your code.

I use PyQt and I've always theses warnings under KDE and Unity, never
under Gnome.

I thing you can ignore it.

-- 
Vincent V.V.
Oqapy https://launchpad.net/oqapy . Qarte+7
https://launchpad.net/qarte+7 . PaQager https://launchpad.net/paqager

-- 
http://mail.python.org/mailman/listinfo/python-list


How do I use PyGTK to put text besides clickable buttons?

2012-04-02 Thread Jason Hsu, Mr. Swift Linux
I've decided to use PyGTK instead of gtkdialog for providing
configuration menus/dialog boxes in Swift Linux, the Linux distro I
started.  The problem with gtkdialog is that the i386 version is no
longer available in the Debian repository.

Since a picture is worth a thousand words, I'll give you a link to a
screenshot of antiX Linux:
http://antix.freeforums.org/download/file.php?id=23

How do I use PyGTK to create something similar to the logout dialog
box in the above graphic?  I've figured out how to create clickable
buttons that each run a different script.  What I haven't figured out
is how to add text beside each button.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How do I use PyGTK to put text besides clickable buttons?

2012-04-02 Thread Dan Stromberg
You could use an hbox.  Or rather, a vbox with a bunch of hbox's in it.

On Thu, Mar 29, 2012 at 10:45 PM, Jason Hsu, Mr. Swift Linux 
jhsu802...@gmail.com wrote:

 I've decided to use PyGTK instead of gtkdialog for providing
 configuration menus/dialog boxes in Swift Linux, the Linux distro I
 started.  The problem with gtkdialog is that the i386 version is no
 longer available in the Debian repository.

 Since a picture is worth a thousand words, I'll give you a link to a
 screenshot of antiX Linux:
 http://antix.freeforums.org/download/file.php?id=23

 How do I use PyGTK to create something similar to the logout dialog
 box in the above graphic?  I've figured out how to create clickable
 buttons that each run a different script.  What I haven't figured out
 is how to add text beside each button.
 --
 http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list


ANNOUNCE: PyGTK All-in-one Installer 2.24.2

2012-02-09 Thread Dieter Verfaillie

We are pleased to announce release 2.24.2 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

* What is it?
=

The PyGTK All-in-one installer provides an alternative installation
method for PyGTK users on Windows. It bundles PyGTK, PyGObject,
PyCairo, PyGtkSourceView2, PyGooCanvas, PyRsvg, the gtk+-bundle
and Glade in one handy installer.

Currently 32 bit Python 2.6 and 2.7 versions are supported
on Windows XP and up.

Some screenshots can be seen at:
https://github.com/dieterv/pygtk-installer/wiki

* What's changed in 2.24.2 ?


  * Updated bundled GTK+ runtime packages to GTK+ 2.24.10-1

* Where to get it?
==

binaries:

http://download.gnome.org/binaries/win32/pygtk/2.24/pygtk-all-in-one-2.24.2.win32-py2.6.msi
  md5sum: e6bfb9f330236d24a81ed778ec48a5ca
  size  : 32,4M

http://download.gnome.org/binaries/win32/pygtk/2.24/pygtk-all-in-one-2.24.2.win32-py2.7.msi
  md5sum: 4bddf847f81d8de2d73048b113da3dd5
  size  : 32,4M

source code of the installer build tool:

https://github.com/dieterv/pygtk-installer/tree/release-2.24.2
https://github.com/dieterv/pygtk-installer/tarball/release-2.24.2
https://github.com/dieterv/pygtk-installer/zipball/release-2.24.2


Enjoy!

The PyGTK Team
--
http://mail.python.org/mailman/listinfo/python-announce-list

   Support the Python Software Foundation:
   http://www.python.org/psf/donations/


Extending PyGTK widgets with Glade

2012-01-20 Thread Richard Carlson
I'm working on a program using PyGTK and Glade.  I create a glade XML file
using Glade Designer and then load widgets like this:

class MyDialog:
def __init__(self):
self.dialog = gtk.glade.XML(self.GLADEFILE).get_widget
(dialog.xml)

I think it would be better if I extended the Dialog class, but I can't 
figure out how to do it.  I'd like to do something like this:

class MyDialog(gtk.Dialog):
def __init__(self):
self = gtk.glade.XML(self.GLADEFILE).get_widget(example_dialog)

Can someone point me in the right direction?

Thanks,

Richard
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Extending PyGTK widgets with Glade

2012-01-20 Thread Adam Tauno Williams

Quoting Richard Carlson rcarlson...@gmail.com:

I'm working on a program using PyGTK and Glade.  I create a glade XML file
using Glade Designer and then load widgets like this:
class MyDialog:
def __init__(self):
self.dialog = gtk.glade.XML(self.GLADEFILE).get_widget
(dialog.xml)
I think it would be better if I extended the Dialog class, but I can't
figure out how to do it.  I'd like to do something like this:
class MyDialog(gtk.Dialog):
def __init__(self):
self = gtk.glade.XML(self.GLADEFILE).get_widget(example_dialog)

Can someone point me in the right direction?


There is some documentation about this around somewhere; but I don't  
recall offhand.  In any case you will probably get a good answer if  
you ask on the pygtk maillist.

http://www.daa.com.au/mailman/listinfo/pygtk
Content on that list is pretty good.

--
http://mail.python.org/mailman/listinfo/python-list


pygtk

2011-08-02 Thread 守株待兔
please see my attachment ,which  widget the region1,region2 is?
how to make it??

re2
Description: Binary data
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyGTK identify a button

2011-05-26 Thread Alister Ware
On Wed, 25 May 2011 10:18:48 +0200, Tracubik wrote:

 Hi all,
 i'm trying to write a simple windows with two button in GTK, i need a
 way to identify wich button is pressed. Consider that:
 
 the two button are connected (when clicked) to infoButton(self, widget,
 data=None)
 
 infoButton() is something like this
 
 infoButton(self, widget, data=None):
   # discover wich button was pressed
   ...
   # say hello to the button
   if button1pressed:
   print Hi, button1!
   else:
   print Hi, button2!
 
 so, how can I know wich button was pressed without using data and
 without reading the label of the button (i could have buttons with the
 same label)
 
 If data is needed, can someone pls tell me how to set it properly in
 glade 3.8
 
 thanks
 Nico

This looks similar to a question I posted about 2 weeks ago

In gtk 2.1.6 (i think)  earlier you could use widget.get_name() to 
return the id of the widget.
this no-longer works since 2.1.7
the pygtk forum suggests this is because widget id's are not necessarily 
unique  caused problems elsewhere, to be honest most of the explanation 
went above my head.
I did find a work around  that was to use gtk.buildable.get_name(widget)
but is is probably cleaner to use a discrete callback for each button.


-- 
Disco is to music what Etch-A-Sketch is to art.
-- 
http://mail.python.org/mailman/listinfo/python-list


pyGTK identify a button

2011-05-25 Thread Tracubik

Hi all,
i'm trying to write a simple windows with two button in GTK, i need a 
way to identify wich button is pressed.

Consider that:

the two button are connected (when clicked) to infoButton(self, widget, 
data=None)


infoButton() is something like this

infoButton(self, widget, data=None):
# discover wich button was pressed
...
# say hello to the button
if button1pressed:
print Hi, button1!
else:
print Hi, button2!

so, how can I know wich button was pressed without using data and 
without reading the label of the button (i could have buttons with the 
same label)


If data is needed, can someone pls tell me how to set it properly in 
glade 3.8


thanks
Nico
--
http://mail.python.org/mailman/listinfo/python-list


Re: pyGTK identify a button

2011-05-25 Thread Claudiu Nicolaie CISMARU
 the two button are connected (when clicked) to infoButton(self, 
 widget, 
 data=None)

From documentation:
handler_id = object.connect(name, func, func_data)

So:

button1.connect(when is pressed, your_function, 1)
button2.connect(when is pressed, your_function, 2)
(This code is conception, I don't really know how is done in GTK).

On the callback:
infoButton(self, widget, data=None):
# discover wich button was pressed
...
# say hello to the button
if data == 1:
print Hi, button1!
else:
print Hi, button2!

-- 
  Claudiu Nicolaie CISMARU
  GNU GPG Key: http://claudiu.targujiu.net/key.gpg
  T: +40 755 135455
  E: clau...@virtuamagic.com, claudiu.cism...@gmail.com


signature.asc
Description: This is a digitally signed message part.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyGTK identify a button

2011-05-25 Thread Tracubik

On 25/05/2011 10:44, Claudiu Nicolaie CISMARU wrote:

the two button are connected (when clicked) to infoButton(self,
widget,
data=None)


 From documentation:
handler_id = object.connect(name, func, func_data)

So:

button1.connect(when is pressed, your_function, 1)
button2.connect(when is pressed, your_function, 2)
(This code is conception, I don't really know how is done in GTK).


thanks but, as i've sayed before, i can't use func_data 'cause i don't 
know how to set it on glade3.8, that is the program i use to create the 
GUI.

Anyway, i think this is the only way to identify the button :-/
--
http://mail.python.org/mailman/listinfo/python-list


Re: pyGTK identify a button

2011-05-25 Thread Chris Angelico
On Wed, May 25, 2011 at 6:18 PM, Tracubik affdfsdfds...@b.com wrote:
 Hi all,
 i'm trying to write a simple windows with two button in GTK, i need a way to
 identify wich button is pressed.
 Consider that:

 the two button are connected (when clicked) to infoButton(self, widget,
 data=None)

I'm not terribly familiar with GTK, but I believe the 'widget'
parameter is the button that was clicked on. Whatever means you have
for distinguishing them (saving another reference to each object in a
named variable, etc), you should be able to do with that parameter.

Chris Angelico
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyGTK identify a button

2011-05-25 Thread Claudiu Nicolaie CISMARU
 thanks but, as i've sayed before, i can't use func_data 'cause i don't 
 know how to set it on glade3.8, that is the program i use to create 
 the 
 GUI.
 Anyway, i think this is the only way to identify the button :-/

Hack into the generated source!

-- 
  Claudiu Nicolaie CISMARU
  GNU GPG Key: http://claudiu.targujiu.net/key.gpg
  T: +40 755 135455
  E: clau...@virtuamagic.com, claudiu.cism...@gmail.com


signature.asc
Description: This is a digitally signed message part.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pyGTK identify a button

2011-05-25 Thread Cousin Stanley
Tracubik wrote:

 Hi all,
 i'm trying to write a simple windows with two button in GTK, 
 i need a  way to identify wich button is pressed.
 

#!/usr/bin/env python

import gtk

def console_display( button , args ) :

a0 , a1 , a2 = args

print '%s  %s %s ' % ( a0 , a1 , a2 )


window = gtk.Window()

window.set_title( gtk.buttons.01 )
  
window.set_size_request( 300 , -1 )

window.set_position( gtk.WIN_POS_CENTER )

window.connect( destroy , gtk.main_quit )


# Create VBox and add in Window

vbox = gtk.VBox()

window.add( vbox )


# Create buttons

dict_buttons = {
12   :  [ 'OneTwo' , 'Buckle ' , 'My Shoe' ] ,
34   :  [ 'TreFor' , 'Shut   ' , 'The Door' ] ,
56   :  [ 'FivSix' , 'Pick   ' , 'Up Sticks' ] ,
78   :  [ 'SvnAte' , 'Lay' , 'Them Straight' ] ,
910  :  [ 'NinTen' , 'Big' , 'Fat Hen' ] }

list_keys = dict_buttons.keys()

list_keys.sort()

for this_button in list_keys :

this_name = dict_buttons[ this_button ][ 0 ]

b = gtk.Button( this_name )

b.set_name( this_name )

b.connect( clicked , console_display , dict_buttons[ this_button ] )

vbox.pack_start( b )


window.show_all()

gtk.main()


-- 
Stanley C. Kitching
Human Being
Phoenix, Arizona

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK, Glade/libglade. What am I doing wrong?

2011-05-07 Thread Alister Ware
On Sat, 07 May 2011 15:14:07 +1100, Даниил Рыжков wrote:

 Thanks, Cristian! It works.
 List of Pygtk: http://www.daa.com.au/mailman/listinfo/pygtk
 Thanks again. Subscribed :)
 2011/5/7 craf pyclut...@gmail.com:
 Hi.

 Try this:

 #!/usr/bin/env python

 import gtk.glade

 class TestPyGtk:
    This is an Hello World GTK application

    def __init__(self):

        #Set the Glade file
        self.gladefile = test.glade
        self.glade = gtk.glade.XML(self.gladefile)

        self.MainWindow = self.glade.get_widget('MainWindow')
        self.MainWindow.show()
        self.MainWindow.connect('destroy', lambda e:gtk.main_quit())



 TestPyGtk()
 gtk.main()

 Regards.

 Cristian.

 List of Pygtk: http://www.daa.com.au/mailman/listinfo/pygtk
you may also want to look at using gtk.builder instread as it is now the 
prefered option.




-- 
The human mind ordinarily operates at only ten percent of its capacity
-- the rest is overhead for the operating system.
-- 
http://mail.python.org/mailman/listinfo/python-list


PyGTK notebook: get current page

2011-05-07 Thread Tracubik
Hi all!
I've made a simple PyGTK program.
It's a window with a notebook, the notebook have 2 pages
When changing page, i'ld like to get the id of current page.

I've coded it, but i can get only the previously open page, not the 
current one. This is not a big deal if i have only 2 pages, but it could 
be with 3 or more pages.

Here's the code:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

# template di finestra in pyGTK

import pygtk
pygtk.require('2.0')
import gtk

class FinestraGTK:

def pippo(self, widget, event, data=None):
print current page:  + str(self.nb.get_current_page() )

def delete_event(self, widget, event, data=None):
print delete event occurred
return False

def destroy(self, widget, data=None):
print destroy signal occurred
gtk.main_quit()

def __init__(self):
self.w = gtk.Window(gtk.WINDOW_TOPLEVEL)

self.w.connect(delete_event, self.delete_event)
self.w.connect(destroy, self.destroy)

self.w.set_border_width(10)
self.w.set_default_size(455,460)

# NOTEBOOK + LABELS
self.nb = gtk.Notebook()
self.nb_label1 = gtk.Label(page 0)
self.nb_label2 = gtk.Label(page 1)

# PAGE 1
self.b1 = gtk.Button(button tab 0)
self.nb.insert_page(self.b1, self.nb_label1, 0)
# PAGE 2
self.b2 = gtk.Button(button tab 1)
self.nb.insert_page(self.b2, self.nb_label2, 1)

self.w.add(self.nb)
self.nb.connect(switch-page, self.pippo)
self.b1.connect(clicked, self.pippo, )
self.b2.connect(clicked, self.pippo, )

self.w.show_all()

def main(self):
gtk.main()

if __name__ == __main__:
hello = FinestraGTK()
hello.main()


any hint? i know it's all about correctly temporize signals, but i don't 
know how to accompliesh this

many thanks
regards
sorry for my english
Nico
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK notebook: get current page

2011-05-07 Thread Alexander Kapps

On 07.05.2011 17:04, Tracubik wrote:

Hi all!
I've made a simple PyGTK program.
It's a window with a notebook, the notebook have 2 pages
When changing page, i'ld like to get the id of current page.

I've coded it, but i can get only the previously open page, not the
current one. This is not a big deal if i have only 2 pages, but it could
be with 3 or more pages.

Here's the code:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

# template di finestra in pyGTK

import pygtk
pygtk.require('2.0')
import gtk

class FinestraGTK:

 def pippo(self, widget, event, data=None):
 print current page:  + str(self.nb.get_current_page() )


According to PyGTK docs, the event handler for the switch_page 
signal should look like this:


def pippo(self, notebook, page, page_num, user_data=None):
...

With this method you get the new page number in page_num (or in your 
original method with the misleadingly named data argument)



HTH
--
http://mail.python.org/mailman/listinfo/python-list


PyGTK, Glade/libglade. What am I doing wrong?

2011-05-06 Thread Даниил Рыжков
Sorry for my English (I could not find help in the Russian community)
I'm trying to learn PyGTK and Glade. I made test window in Glade and
saved it as test.glade (attached). Then I wrote script
test.py(attached, http://pastebin.com/waKytam3). I tried to run it.
While the script was executed, console did not show anything and
window wasn't displayed. When I pressed CTRL+С console displayed
trackback:
---
CTraceback (most recent call last):
  File test.py, line 32, in module
gtk.main()
KeyboardInterrupt
---
So what am I doing wrong?

-- 
Best wishes,
Daniil
#!/usr/bin/env python

import sys
try:
 	import pygtk
  	pygtk.require(2.0)
except:
  	pass
try:
	import gtk
  	import gtk.glade
except:
	sys.exit(1)

class TestPyGtk:
	This is an Hello World GTK application

	def __init__(self):
		
		#Set the Glade file
		self.gladefile = test.glade  
	self.wTree = gtk.glade.XML(self.gladefile) 
		
		#Create our dictionay and connect it
		dic = {on_MainWindow_destroy : gtk.main_quit }
		self.wTree.signal_autoconnect(dic)



if __name__ == __main__:
	TestPyGtk = TestPyGtk()
	gtk.main()


test.glade
Description: application/glade
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK, Glade/libglade. What am I doing wrong?

2011-05-06 Thread Benjamin Kaplan
On May 6, 2011 7:05 PM, Даниил Рыжков daniil...@gmail.com wrote:

 Sorry for my English (I could not find help in the Russian community)
 I'm trying to learn PyGTK and Glade. I made test window in Glade and
 saved it as test.glade (attached). Then I wrote script
 test.py(attached, http://pastebin.com/waKytam3). I tried to run it.
 While the script was executed, console did not show anything and
 window wasn't displayed. When I pressed CTRL+С console displayed
 trackback:
 ---
 CTraceback (most recent call last):
  File test.py, line 32, in module
gtk.main()
 KeyboardInterrupt
 ---
 So what am I doing wrong?


I haven't used gtk before, but is there a show method or something similar
you need, to actually make the window appear? The KeyboardInterrupt is
normal. That's how control-c works.
 --
 Best wishes,
 Daniil

 --
 http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK, Glade/libglade. What am I doing wrong?

2011-05-06 Thread Даниил Рыжков
 I haven't used gtk before, but is there a show method or something similar
 you need, to actually make the window appear?
I don't know. I think self.wTree = gtk.glade.XML(self.gladefile)
should do this. For example, author of this tutorial
(http://www.learningpython.com/2006/05/07/creating-a-gui-using-pygtk-and-glade/)
wrote script similar to my.

P.S. I have glade3 3.8.0, gtk 2.24.4, GNOME 2.32.1 and Python 2.7.1

--
Best wishes,
Daniil
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK, Glade/libglade. What am I doing wrong?

2011-05-06 Thread craf
On May 6, 2011 7:05 PM, Даниил Рыжков daniil...@gmail.com wrote:

 Sorry for my English (I could not find help in the Russian community)
 I'm trying to learn PyGTK and Glade. I made test window in Glade and
 saved it as test.glade (attached). Then I wrote script
 test.py(attached, http://pastebin.com/waKytam3). I tried to run it.
 While the script was executed, console did not show anything and
 window wasn't displayed. When I pressed CTRL+С console displayed
 trackback:
 ---
 CTraceback (most recent call last):
  File test.py, line 32, in module
gtk.main()
 KeyboardInterrupt
 ---
 So what am I doing wrong?


I haven't used gtk before, but is there a show method or something
similar you need, to actually make the window appear? The
KeyboardInterrupt is normal. That's how control-c works.
 --
 Best wishes,
 Daniil

 --
 http://mail.python.org/mailman/listinfo/python-list


Hi.

Try this:

#!/usr/bin/env python

import gtk.glade

class TestPyGtk:
This is an Hello World GTK application

def __init__(self):

#Set the Glade file
self.gladefile = test.glade
self.glade = gtk.glade.XML(self.gladefile)

self.MainWindow = self.glade.get_widget('MainWindow')
self.MainWindow.show()
self.MainWindow.connect('destroy', lambda e:gtk.main_quit())



TestPyGtk()
gtk.main()

Regards.

Cristian.

List of Pygtk: http://www.daa.com.au/mailman/listinfo/pygtk





-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK, Glade/libglade. What am I doing wrong?

2011-05-06 Thread Даниил Рыжков
Thanks, Cristian! It works.
 List of Pygtk: http://www.daa.com.au/mailman/listinfo/pygtk
Thanks again. Subscribed :)
2011/5/7 craf pyclut...@gmail.com:
 Hi.

 Try this:

 #!/usr/bin/env python

 import gtk.glade

 class TestPyGtk:
    This is an Hello World GTK application

    def __init__(self):

        #Set the Glade file
        self.gladefile = test.glade
        self.glade = gtk.glade.XML(self.gladefile)

        self.MainWindow = self.glade.get_widget('MainWindow')
        self.MainWindow.show()
        self.MainWindow.connect('destroy', lambda e:gtk.main_quit())



 TestPyGtk()
 gtk.main()

 Regards.

 Cristian.

 List of Pygtk: http://www.daa.com.au/mailman/listinfo/pygtk
--
Best wishes,
Daniil
-- 
http://mail.python.org/mailman/listinfo/python-list


ANNOUNCE: PyGTK All-in-one Installer 2.24.0

2011-04-12 Thread Dieter Verfaillie
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

* What is it?
=

The PyGTK All-in-one installer provides an alternative installation
method for PyGTK users on Windows. It bundles PyGTK, PyGObject,
PyCairo, PyGtkSourceView2, PyGooCanvas, PyRsvg, the gtk+-bundle
and Glade in one handy installer.

Currently 32 bit Python 2.6 and 2.7 versions are supported
on Windows XP and up.

Some screenshots can be seen at:
https://github.com/dieterv/pygtk-installer/wiki

* What's changed in 2.24.0 ?


  * Updated to PyGTK 2.24.0 and PyGObject 2.28.3
  * Updated bundled GTK+ runtime packages to GTK+ 2.24.0-1
and GLib 2.28.1-1
  * Updated to Glade 3.8.0

* Where to get it?
==

binaries:

http://download.gnome.org/binaries/win32/pygtk/2.24/pygtk-all-in-one-2.24.0.win32-py2.6.msi
  md5sum: db407835f23f58e43cd4cadea4921a48
  size  : 32,7M

http://download.gnome.org/binaries/win32/pygtk/2.24/pygtk-all-in-one-2.24.0.win32-py2.7.msi
  md5sum: 70d8b7d631da4049f4ceccdf4a001363
  size  : 32,7M

source code of the installer build tool:

https://github.com/dieterv/pygtk-installer/tree/release-2.24.0
https://github.com/dieterv/pygtk-installer/tarball/release-2.24.0
https://github.com/dieterv/pygtk-installer/zipball/release-2.24.0


Enjoy!

The PyGTK Team
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Help with pygtk About Dialog

2011-04-12 Thread pradeepbpin
How can I use a png/jpeg/gif  image file to set the logo in
gtk.AboutDiaog box of pyGTK ?
-- 
http://mail.python.org/mailman/listinfo/python-list


Another location of the PyGTK tutorial

2011-04-03 Thread craf
Hi.

Anyone know if the pygtk tutorial that was in this direction
http://www.learnpygtk.org/pygtktutorial/index.html,  can be located
elsewhere.

Regards.

Cristian

-- 
http://mail.python.org/mailman/listinfo/python-list


Another location of the PyGTK tutorial

2011-04-03 Thread craf
Hi.

Anyone know if the pygtk tutorial that was in this direction
http://www.learnpygtk.org/pygtktutorial/index.html,  can be located
elsewhere.

Regards.

Cristian

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Another location of the PyGTK tutorial

2011-04-03 Thread Dotan Cohen
http://gitorious.org/pygtk-tutorial

On Sat, Apr 2, 2011 at 19:53, craf p...@vtr.net wrote:
 Hi.

 Anyone know if the pygtk tutorial that was in this direction
 http://www.learnpygtk.org/pygtktutorial/index.html,  can be located
 elsewhere.

 Regards.

 Cristian

 --
 http://mail.python.org/mailman/listinfo/python-list




-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Another location of the PyGTK tutorial

2011-04-03 Thread Dotan Cohen
http://gitorious.org/pygtk-tutorial

On Fri, Apr 1, 2011 at 21:03, craf p...@vtr.net wrote:
 Hi.

 Anyone know if the pygtk tutorial that was in this direction
 http://www.learnpygtk.org/pygtktutorial/index.html,  can be located
 elsewhere.

 Regards.

 Cristian

 --
 http://mail.python.org/mailman/listinfo/python-list




-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
-- 
http://mail.python.org/mailman/listinfo/python-list


[Fwd: Re: Another location of the PyGTK tutorial]

2011-04-03 Thread craf
¡Thank you very much Dotan!

Regards.

Cristian
- Mensaje reenviado 
 De: Dotan Cohen dotanco...@gmail.com
 Para: craf p...@vtr.net
 Cc: Python Ingles python-list@python.org
 Asunto: Re: Another location of the PyGTK tutorial
 Fecha: Sun, 3 Apr 2011 13:40:35 +0300
 
 http://gitorious.org/pygtk-tutorial
 
 On Fri, Apr 1, 2011 at 21:03, craf p...@vtr.net wrote:
  Hi.
 
  Anyone know if the pygtk tutorial that was in this direction
  http://www.learnpygtk.org/pygtktutorial/index.html,  can be located
  elsewhere.
 
  Regards.
 
  Cristian
 
  --
  http://mail.python.org/mailman/listinfo/python-list
 
 
 
 
 -- 
 Dotan Cohen
 
 http://gibberish.co.il
 http://what-is-what.com


-- 
http://mail.python.org/mailman/listinfo/python-list


ANNOUNCE: PyGTK All-in-one Installer 2.22.6

2011-01-19 Thread Dieter Verfaillie
We are pleased to announce release 2.22.6 of the PyGTK All-in-one
installer for Windows.

More information can be found in the README file at:
https://github.com/dieterv/pygtk-installer#readme

* What is it?
=

The PyGTK All-in-one installer provides an alternative installation
method for PyGTK users on Windows. It bundles PyGTK, PyGObject,
PyCairo, PyGtkSourceView2, PyGooCanvas, PyRsvg, the gtk+-bundle
and Glade in one handy installer.

Currently 32 bit Python 2.6 and 2.7 versions are supported
on Windows XP and up.

Some screenshots can be seen at:
https://github.com/dieterv/pygtk-installer/wiki

* What's changed in 2.22.6 ?


  * Updated bundled GTK+ runtime packages to
gtk+-bundle_2.22.1-20101227_win32 which fixes the svg pixbuf
loader issues described in
https://bugzilla.gnome.org/show_bug.cgi?id=637742.
  * Grammatical fixes to the README and build_installer.py script
by David Ripton.
  * Updated glade3-3.6.7 packages + the build_glade.sh script is now
tracked at https://bugzilla.gnome.org/show_bug.cgi?id=634978

The PyGTK, PyGObject, PyCairo, PyGtkSourceView2, PyGooCanvas and
PyRsvg extension modules remain unchanged.

* Where to get it?
==

binaries:

http://download.gnome.org/binaries/win32/pygtk/2.22/pygtk-all-in-one-2.22.6.win32-py2.6.msi
  md5sum: 1ce2abcaa4b232e52111a71e937f52e9
  size  : 32,3M

http://download.gnome.org/binaries/win32/pygtk/2.22/pygtk-all-in-one-2.22.6.win32-py2.7.msi
  md5sum: 75cfe879a13ae99d5b19fee4f1597bb5
  size  : 32,3M

source code of the installer build tool:

https://github.com/dieterv/pygtk-installer/tree/release-2.22.6
https://github.com/dieterv/pygtk-installer/tarball/release-2.22.6
https://github.com/dieterv/pygtk-installer/zipball/release-2.22.6


Enjoy!

The PyGTK Team
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


ANNOUNCE: PyGTK All-in-one Installer 2.22.5

2010-12-24 Thread Dieter Verfaillie
We are pleased to announce release 2.22.5 of the PyGTK All-in-one
installer for Windows.

More information can be found in the README file at:
https://github.com/dieterv/pygtk-installer#readme

* What is it?
=
The PyGTK All-in-one installer provides an alternative installation
method for PyGTK users on Windows. It bundles PyGTK, PyGObject,
PyCairo, PyGtkSourceView2, PyGooCanvas, PyRsvg, the gtk+-bundle
and Glade in one handy installer.

Currently 32 bit Python 2.6 and 2.7 versions are supported
on Windows XP and up.

Some screenshots can be seen at:
https://github.com/dieterv/pygtk-installer/wiki

* Where to get it?
==

binaries:

http://download.gnome.org/binaries/win32/pygtk/2.22/pygtk-all-in-one-2.22.5.win32-py2.6.msi
  md5sum: 3acbd0ef3c13c1112d6f119bdb076ac6
  size  : 32,3M

http://download.gnome.org/binaries/win32/pygtk/2.22/pygtk-all-in-one-2.22.5.win32-py2.7.msi
  md5sum: 7a0272a0bd5c857b994f2eed92af199f
  size  : 32,3M (33091012)

source code:

https://github.com/dieterv/pygtk-installer/tree/release-2.22.5
https://github.com/dieterv/pygtk-installer/tarball/release-2.22.5
https://github.com/dieterv/pygtk-installer/zipball/release-2.22.5


Enjoy!

The PyGTK Team
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


seeking pygtk bindings for gtkdatabox

2010-12-21 Thread GrayShark
Hello,
a search for the python bindings for gtkdatabox lead no where. Anyone know 
of who is maintaining/working/siting such a package?

Thanks in advance.

Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2010-10-21 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
assignee:  - d...@python
components: +Documentation -Demos and Tools
nosy: +d...@python

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5978
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



will Gnome 3.0 kill pygtk?

2010-09-30 Thread Tracubik
Hi!
It seem that the new version of gnome 3.0 will dismiss pygtk support.

link: 

[1] http://live.gnome.org/TwoPointNinetyone/   (search killing pygtk)

[2] http://live.gnome.org/GnomeGoals/PythonIntrospectionPorting


i'm studying pygtk right now, am i wasting my time considering that my 
preferred platform is linux/gnome?

thanks
Nico

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: will Gnome 3.0 kill pygtk?

2010-09-30 Thread Neil Hodgson
Tracubik:

 i'm studying pygtk right now, am i wasting my time considering that my 
 preferred platform is linux/gnome?

   I expect the dynamic binding will be very similar to the current
static binding but easier to keep up-to-date. There's already some use
of dynamic binding in the recent PyGTK 2.22.0:

http://www.daa.com.au/pipermail/pygtk/2010-September/019013.html

   Neil
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: will Gnome 3.0 kill pygtk?

2010-09-30 Thread Diez B. Roggisch
Tracubik affdfsdfds...@b.com writes:

 Hi!
 It seem that the new version of gnome 3.0 will dismiss pygtk support.

 link: 

 [1] http://live.gnome.org/TwoPointNinetyone/   (search killing pygtk)

 [2] http://live.gnome.org/GnomeGoals/PythonIntrospectionPorting


 i'm studying pygtk right now, am i wasting my time considering that my 
 preferred platform is linux/gnome?

The important bit is that it will not ditch Python-support.

I can't comment at the actual differences between pygtk and the upcoming
reflection-based approach, but I doubt learning pygtk now is a
waste. First of all, it will be quite a while until pygtk (and gnome
2.x) are really gone.

And even if, the concepts stay the same, so unless pygtk adds an extra
layer of abstraction (which AFAIK it doesn't), your knownledge is still
usable - if not translatable one-to-one.

Diez
-- 
http://mail.python.org/mailman/listinfo/python-list


How can I bundle a PyGTK program in windows so my users don't need to install Python or the GTK+ libs?

2010-08-16 Thread Waspinator
I found this question on 
http://faq.pygtk.org/index.py?file=faq21.005.htpreq=show
but the answer did not help me.

For example I have a simple program below that I would like to
'compile' with py2exe (or anything else if it's simpler) to run in
windows as a single bundled executable file with no installation (no
INNO setup), and no requirements for gtk or python installations. I
doesn't matter if the .exe file is 30 MB to only display a hello world
app, as long as it works. (although the smaller the better)

The application already works in my windows test environment because I
have installed python 2.6 with pygtk and a gtk bundle.

Can someone please provide some simple and clear instructions on how I
can do this?

Thanks,

Waspinator

simple.py
---
  import gtk

  window = gtk.Window()
  window.set_title(PyGTK Test Window)
  window.connect(destroy, gtk.main_quit)
  window.show_all()

  gtk.main()
---
-- 
http://mail.python.org/mailman/listinfo/python-list


Running pygtk app under windows.

2010-08-16 Thread Sebastian Alonso
   Hey everyone, I'm trying to be able to run my app, which uses pygtk,
under windows, but unfortunately I'm having big problems with it. The main
purpose of this is to later on make an .exe file but i havent even been able
to run the app at least.

I've followed every single step from this faq
http://faq.pygtk.org/index.py?file=faq21.001.htpreq=show and when i try to
run the example the example they offer I get this:

Traceback (most recent call last):
  File pyshell#0, line 1, in module
import gtk
  File C:\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py, line 30, in
module
import gobject as _gobject
  File C:\Python26\lib\site-packages\gtk-2.0\gobject\__init__.py, line 26,
in module
from glib import spawn_async, idle_add, timeout_add,
timeout_add_seconds, \
  File C:\Python26\lib\site-packages\gtk-2.0\glib\__init__.py, line 22, in
module
from glib._glib import *
ImportError: DLL load failed: Specified module cannot be found.

Do you have any clue on what could be happening ? I've tried most of the
things you would expect to make anything work on windows, reboot, unistall
everything and re-install everything again, yet it wont work...

Thanks in advanced.

Seba
-- 
http://mail.python.org/mailman/listinfo/python-list


[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2010-07-22 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

Profiling only works on functions that actually return; maybe we could
add something about this fact in the documentation

--
nosy: +amaury.forgeotdarc

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5978
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0)

2010-07-10 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

I'm note sure if this is a library bug, doc bug, external library issue or 
what, anyone got any true idea?

--
nosy: +BreamoreBoy
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5978
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



ANN: PyUseCase 3.2.1 - GUI testing for PyGTK and Tkinter

2010-03-05 Thread Geoff Bache
Hi all,

I've made a couple of bugfixes to the 3.2 release from last week.

Regards,
Geoff Bache

A bit more detail:

PyUseCase is an unconventional GUI testing tool for PyGTK and Tkinter,
along with a framework for testing Python GUIs in general.

Instead of recording GUI mechanics directly, it asks the user for
descriptive names and hence builds up a domain language along with a
UI map file that translates this language into actions on the
current GUI widgets. The point is to reduce coupling, allow very
expressive tests, and ensure that GUI changes mean changing the UI map
file but not all the tests.

Instead of an assertion mechanism, it auto-generates a log of the
GUI appearance and changes to it. The point is then to use that as a
baseline for text-based testing, using e.g. TextTest.

It also includes support for instrumenting code so that waits can be
recorded, making it far easier for a tester to record correctly
synchronized tests without having to explicitly plan for this.

Homepage: http://www.texttest.org/index.php?page=ui_testing
Download: http://sourceforge.net/projects/pyusecase
Mailing list: https://lists.sourceforge.net/lists/listinfo/pyusecase-users (new)
Bugs: https://bugs.launchpad.net/pyusecase/
Source: https://code.launchpad.net/pyusecase/
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


ANN: PyUseCase 3.2 - GUI testing for Python (PyGTK and now Tkinter)

2010-02-26 Thread Geoff Bache
Hi all,

A new release of PyUseCase is out. There have been some minor
improvements to PyGTK support but the main effort has been getting
Tkinter support off the ground.

At this point Tkinter support is fairly basic and doesn't come close
to covering the widget set, but it's working on a couple of different
real-life (but smallish) applications. The widgets it will currently
handle interaction with are Button, Entry, Label, Menu, Tk, Toplevel
and tkMessageBox. Adding support for further widgets shouldn't be too
hard. If anyone's interested in trying to move this forward, I'd be
interested to here from you - I'm very happy to help people get
started.

Regards,
Geoff Bache

A bit more detail:

PyUseCase is an unconventional GUI testing tool for PyGTK and Tkinter,
along with a framework for testing Python GUIs in general.

Instead of recording GUI mechanics directly, it asks the user for
descriptive names and hence builds up a domain language along with a
UI map file that translates this language into actions on the
current GUI widgets. The point is to reduce coupling, allow very
expressive tests, and ensure that GUI changes mean changing the UI map
file but not all the tests.

Instead of an assertion mechanism, it auto-generates a log of the
GUI appearance and changes to it. The point is then to use that as a
baseline for text-based testing, using e.g. TextTest.

It also includes support for instrumenting code so that waits can be
recorded, making it far easier for a tester to record correctly
synchronized tests without having to explicitly plan for this.

Homepage: http://www.texttest.org/index.php?page=ui_testing
Download: http://sourceforge.net/projects/pyusecase
Mailing list: https://lists.sourceforge.net/lists/listinfo/pyusecase-users (new)
Bugs: https://bugs.launchpad.net/pyusecase/
Source: https://code.launchpad.net/pyusecase/
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Re: [ANNOUNCE] PyGTK 2.17.0 - unstable

2009-12-28 Thread Philippe Bouige
Dans comp.lang.python.announce, vous avez écrit :
 A new unstable development release of the Python bindings
 for GTK+ 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.17/

 Blurb:

 GTK+ is a toolkit for developing graphical applications that run on
 systems such as Linux, Windows and MacOS X. It provides a comprehensive set
 of GUI widgets, can display Unicode bidi text.  It links into the Gnome
 Accessibility Framework through the ATK library.

 PyGTK provides a convenient wrapper for the GTK+ library for use in
 Python programs, and takes care of many of the boring details such as
 managing memory and type casting.  When combined with PyORBit and
 gnome-python, it can be used to write full featured Gnome applications.

 Like the GTK+ library itself PyGTK is licensed under the GNU LGPL, so is
 suitable for use in both free software and proprietary applications.  It
 is already in use in many applications ranging from small single purpose
 scripts up to large full features applications.

 What's new since 2.16.0?
 - Some docs improvements (Gian Mario)
 - Wrap new API added in GTK/GDK 2.18 (Gian Mario)
 - Release GIL in several gdk.Pixbuf methods (Paul, #591726)
 - Fix override for gtk.TreeSortable.do_get_sorted_column_id (Paul)
 - Make it possible to implement gtk.TreeSortable to some extent (Paul)
 - Fix wrong gtk.gdk.color_from_hsv definition (Arun Raghavan, #594347)
 - Plug memory leaks in a few Pango Cairo functions (Paul, #599730)
 - Plug a huge leak in gtk.Widget.get_snapshot() (Benjamin Berg, #596612)
 - Undeprecate gtk.Toolbar.(un)set_icon_size() again (Paul)

 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.

 cheers
 -- 
 Gian Mario Tagliaretti
 GNOME Foundation member
 gia...@gnome.org
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANNOUNCE] PyGTK 2.17.0 - unstable

2009-12-27 Thread Gian Mario Tagliaretti
A new unstable development release of the Python bindings
for GTK+ 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.17/

Blurb:

GTK+ is a toolkit for developing graphical applications that run on
systems such as Linux, Windows and MacOS X. It provides a comprehensive set
of GUI widgets, can display Unicode bidi text.  It links into the Gnome
Accessibility Framework through the ATK library.

PyGTK provides a convenient wrapper for the GTK+ library for use in
Python programs, and takes care of many of the boring details such as
managing memory and type casting.  When combined with PyORBit and
gnome-python, it can be used to write full featured Gnome applications.

Like the GTK+ library itself PyGTK is licensed under the GNU LGPL, so is
suitable for use in both free software and proprietary applications.  It
is already in use in many applications ranging from small single purpose
scripts up to large full features applications.

What's new since 2.16.0?
- Some docs improvements (Gian Mario)
- Wrap new API added in GTK/GDK 2.18 (Gian Mario)
- Release GIL in several gdk.Pixbuf methods (Paul, #591726)
- Fix override for gtk.TreeSortable.do_get_sorted_column_id (Paul)
- Make it possible to implement gtk.TreeSortable to some extent (Paul)
- Fix wrong gtk.gdk.color_from_hsv definition (Arun Raghavan, #594347)
- Plug memory leaks in a few Pango Cairo functions (Paul, #599730)
- Plug a huge leak in gtk.Widget.get_snapshot() (Benjamin Berg, #596612)
- Undeprecate gtk.Toolbar.(un)set_icon_size() again (Paul)

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.

cheers
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
-- 
http://mail.python.org/mailman/listinfo/python-announce-list

Support the Python Software Foundation:
http://www.python.org/psf/donations/


Re: [pygtk] cannot import glib in python shell

2009-12-23 Thread John Stowers

 
 I think ideally what I'm requesting is to have the mingw/python/gtk
 environments to be harmonized.  I'm close.  I can do the following:
 python
 import sys
 import gtk
 blah = gtk.Window(0)
 blah.show()
 , but when I do
 import glib
 ERROR!!!
 if I cd to a certain dir in glib sources, there were two .py files, but
 I didn't know where to place them in the python26 dir.
 From that dir, I can run the python shell, import glib and then it gives
 me an error about no module for gdb...so it's none stop...with regards
 to the import glib issue at present.
 
 Any help towards this would be greatly appreciated.

AFAIR there has not been a release of PyGObect on windows since the
split of functionality into the glib namespace.

I cleaned up the build stuff a while ago here;

https://bugzilla.gnome.org/show_bug.cgi?id=589671

But I no longer have a windows install. Someone else will need to update
it to HEAD and finish it off.

John


-- 
http://mail.python.org/mailman/listinfo/python-list


pygtk - icons?

2009-11-18 Thread Helmut Jarausch

Hi,

please bear in mind that I'm an absolute newcomer to (py)gtk.
I'm trying to install the nice synchronization tool
http://live.gnome.org/Conduit

which is written in Python and use pyGTK.

This installed several icons e.g.
/usr/share/icons/hicolor/16x16/apps/conduit.png

When run, Conduit fails to find its icons.

For testing purposes I've tried

import gtk
info=gtk.icon_theme_get_default().lookup_icon(conduit,16,0)

which produces the error message
 GtkWarning: Could not find the icon 'conduit'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
http://icon-theme.freedesktop.org/releases



On my Gentoo system lots of packages have placed icons under
/usr/share/icons/hicolor

So, what am I missing.

Many thanks for a hint,
Helmut.

--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
--
http://mail.python.org/mailman/listinfo/python-list


Re: problems on installing PyGTK in Windows XP

2009-10-29 Thread News123
Hi Yang,

Did you modify the path environment variable to point to your gtk lib?


This might be the problem.


Below the steps, that I followed.

 General instructions are under http://www.pygtk.org/downloads.html
 
 In detail:
 
 Install the GTK+ bundle
 
 * Download the bundle 
 http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.16/gtk+-bundle_2.16.6-20091013_win32.zip
 * unpack it and copy the directory for example to C:\
 * Now append C:\gtk+-bundle_2.16.6-20091013_win32\bin to the path 
 environment variable of windows You can change it under:
   
 My_Computer-Properties-Advanced-Environment_Variables-System_Variables-Path
  
 
 Test it:
 Open a new cmd window and type
 
 gtk-demo
 
 A window should pop up. if not your installation failed
 
 
 Now install PyCairo, PyGObject and PyGTK (please select the binary 
 corresponding to your python version) The links are currently:
 
 * http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.4/
 * http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.14/
 * http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.12/ 

bye


N


Yang wrote:
 Python 2.6.3 is installed on my Windows XP throught the binary file
 provided by Python.org. Then I followed the steps described here:
 
 http://faq.pygtk.org/index.py?req=showfile=faq21.001.htp
 
 to install PyGTK. However, I still get the following error:
 import pygtk
 pygtk.require('2.0')
 import gtk
 Traceback (most recent call last):
   File stdin, line 1, in module
   File C:\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py, line
 48, in mod
 ule
 from gtk import _gtk
 ImportError: DLL load failed: The specified module could not be found.
 
 I googled this problem and noticed that there are quite a few people
 having the same problem. But I am unable to find anything which helps
 me solve this problem.
 
 Could you please give me some suggestions?
 
 Thanks!
-- 
http://mail.python.org/mailman/listinfo/python-list


problems on installing PyGTK in Windows XP

2009-10-21 Thread Yang
Python 2.6.3 is installed on my Windows XP throught the binary file
provided by Python.org. Then I followed the steps described here:

http://faq.pygtk.org/index.py?req=showfile=faq21.001.htp

to install PyGTK. However, I still get the following error:
 import pygtk
 pygtk.require('2.0')
 import gtk
Traceback (most recent call last):
  File stdin, line 1, in module
  File C:\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py, line
48, in mod
ule
from gtk import _gtk
ImportError: DLL load failed: The specified module could not be found.

I googled this problem and noticed that there are quite a few people
having the same problem. But I am unable to find anything which helps
me solve this problem.

Could you please give me some suggestions?

Thanks!
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK problems after Linux update...

2009-09-01 Thread barcaroller

barcaroller barcarol...@music.net wrote in message
news:h7ev9g$dc...@news.eternal-september.org...

 Okay, I won't disagree, but how do I fix this?

Never mind.  The latest update today included a new pygtk
which seems to have fixed the problem.  All is good now.



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK problems after Linux update...

2009-08-30 Thread barcaroller

Thomas Guettler h...@tbz-pariv.de wrote in message 
news:7fq56df2m6ql...@mid.individual.net...

 Looks like your pygtk package does not fit to the installed python 
 package.

Okay, I won't disagree, but I how do if fix this?



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK problems after Linux update...

2009-08-30 Thread barcaroller

Thomas Guettler h...@tbz-pariv.de wrote in message
news:7fq56df2m6ql...@mid.individual.net...

 Looks like your pygtk package does not fit to the installed python
 package.

Okay, I won't disagree, but how do I fix this?


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PyGTK problems after Linux update...

2009-08-28 Thread Thomas Guettler
Looks like your pygtk package does not fit to the installed python package.


 from glib._glib import *
 ImportError: /usr/lib/python2.6/site-packages/gtk-2.0/glib/_glib.so: 
 undefined symbol: PyUnicodeUCS4_DecodeUTF8

-- 
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pygtk - What is the best way to change the mouse pointer

2009-08-27 Thread Ido Levy
 From:
 
 MRAB pyt...@mrabarnett.plus.com
 
 To:
 
 python-list@python.org
 
 Date:
 
 26/08/2009 11:04 PM
 
 Subject:
 
 Re: pygtk - What is the best way to change the mouse pointer
 
 Ido Levy wrote:
  Hello All,
  
  I am writing a dialog which one of its widget is a gtk.ComboBoxEntry ( 

  let's assume widget in the example below is its instance )
  When the user select one of the values from the gtk.ComboBoxEntry I 
need 
  to run some calculations that takes a few seconds.
  In order to reflect calculation time to the user I want to switch the 
  mouse pointer to an hour glass and back to arrow what it finish the 
  calculation.
  
  I use the following code but it doesn't seems to work in a 
deterministic 
  way. From time to time it skips the last line and keep the mouse 
pointer 
  as an hour glass.
  
  watch = gtk.gdk.Cursor(gtk.gdk.WATCH)
  widget.window.set_cursor(watch)
  
  calculation code
  
  widget.window.set_cursor(None)
  
  I would appreciate your advice on the right way to implement this.
  
 Could the calculation code be raising an exception? Try adding some
 logging to see whether the last lien is actually being called. You could
 also use a try...finally... block to ensure that the last line is
 called:
 
  watch = gtk.gdk.Cursor(gtk.gdk.WATCH)
  widget.window.set_cursor(watch)
  try:
  calculation code
  finally:
  widget.window.set_cursor(None)
 

Thank you for your input.

I used logging and it seems that the last line is called.
I also used try...finally... block but it didn't solve the issue.

Then I have noticed that the line before the last one is widget.connect() 
I insert time.sleep() in between the lines and it seems to solve the 
issue.

I assume it's not suppose to work this way but it can be considered as a 
workaround 
-- 
http://mail.python.org/mailman/listinfo/python-list


PyGTK problems after Linux update...

2009-08-27 Thread barcaroller

I use a python-based program called 'meld' which worked fine until my latest 
Fedora11/KDE4.3 update; it now gives me the following error:

prompt meld

/usr/lib/python2.6/site-packages/gtk-2.0/glib/_glib.so: undefined 
symbol: PyUnicodeUCS4_DecodeUTF8
Meld requires pygtk 2.8.0 or higher.


If I run another GTK-based utility, I also get errors:

prompt gedit

** (gedit:28289): WARNING **: Error initializing Python interpreter: 
could not import pygtk.



I have installed the latest PyGTK (pygtk-2.14.1), to no avail.  Googling 
these messages have also produced no major results.  When I run 
'pygtk-demo', I get the following errors:

prompt python /usr/lib/pygtk/2.0/pygtk-demo.py

Traceback (most recent call last):
File /usr/lib/pygtk/2.0/pygtk-demo.py, line 18, in module
import gobject
File /usr/lib/python2.6/site-packages/gtk-2.0/gobject/__init__.py, 
line 33, in module
from glib import spawn_async, idle_add, timeout_add, 
timeout_add_seconds, \
File /usr/lib/python2.6/site-packages/gtk-2.0/glib/__init__.py, line 
30, in module
from glib._glib import *
ImportError: /usr/lib/python2.6/site-packages/gtk-2.0/glib/_glib.so: 
undefined symbol: PyUnicodeUCS4_DecodeUTF8


Does anyone know what needs to be done to resolve this?  Using Python 2.6.2 
on Fedora11/KDE4.3 32-bit i386/i586/i686.




-- 
http://mail.python.org/mailman/listinfo/python-list


pygtk - What is the best way to change the mouse pointer

2009-08-26 Thread Ido Levy
Hello All,

I am writing a dialog which one of its widget is a gtk.ComboBoxEntry ( 
let's assume widget in the example below is its instance )
When the user select one of the values from the gtk.ComboBoxEntry I need 
to run some calculations that takes a few seconds.
In order to reflect calculation time to the user I want to switch the 
mouse pointer to an hour glass and back to arrow what it finish the 
calculation.

I use the following code but it doesn't seems to work in a deterministic 
way. From time to time it skips the last line and keep the mouse pointer 
as an hour glass.

watch = gtk.gdk.Cursor(gtk.gdk.WATCH)
widget.window.set_cursor(watch)

calculation code

widget.window.set_cursor(None)

I would appreciate your advice on the right way to implement this.

Thanks

Ido-- 
http://mail.python.org/mailman/listinfo/python-list


  1   2   3   4   5   >