I think the point where the path gets altered by importing gtk.py is where
_gtk sets the modified argv array (the call to gtk_init processes any gtk
specific command line arguments and removes them from argv).  Does anyone
have an idea for a fix?

As for working with the canvas, this is the usual method:
- Create canvas and set its size with set_usize
- get a reference to the root canvas item group with the canvas's root()
  method.
- call the add() method of the canvas group to add items.  The first
  argument is a string giving the type of the item (eg group, rect, text,
  etc).  Any other arguments should be keyword arguments that set
  properties on that canvas item.  See the corresponding header file for
  the canvas item to find what arguments can be used (it should be in a
  big comment block).  The add method returns the new canvas item.
- To set an item's properties later on, use the item's set() method.  It
  takes the same keyword arguments as the add() method

Note that if you can get some speedups by grouping items in
GnomeCanvasGroup items (in PySol, you might want to group the cards in a
stack together.  You can use GnomeCanvasItem.reparent to move the card to
a new group).

James Henstridge

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On Fri, 12 Feb 1999, Markus F.X.J. Oberhumer wrote:

> Some feedback for the new version:
> 
> - importing from gtk silently changes sys.path (which recently
>   caused me 2 hours of debugging because it broke my PySol 
>   plugin loader):
> 
> import sys
> print sys.path
> from gtk import *
> print sys.path
> 
> - gtk.py and GTK.py will clash under Windows - what about hiding
>   GTK.py, GDK.py & friends in a gtk subdirecory ?
> 
> - could somebody tell me how to use GnomeCanvasItem ? Naively I would have
>   expected the parent canvas/group in the constructor...
> 
> - are there any plans on supporting GnomeCanvasImage in the near future ?
>   Solitaire games without images don't look that good ;-)
> 
> Markus
> 
> -----   Markus Oberhumer <[EMAIL PROTECTED]>   -----
> -----          http://wildsau.idv.uni-linz.ac.at/mfx/           -----
> -----     5E CB 5C 85 DE AF 9E BF  E9 DA 7E 6A 39 F8 CC 67      -----
> 
>                          3 WARPS TO URANUS
> 
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
> 

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to