[DISLIN] Polar Grid

2007-08-04 Thread MASI
Hi,
in a polar graph if I define the position of the first label TOP or
BOTTOM,the grid doesn't show.
Is this a bug?
 
e.g.

dislin.polmod('top', 'clockwise')
dislin.polar  (1.,0., 0.2, 0., 30.)
dislin.grdpol(3,16)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Tkinter equiv for setPalette

2008-02-10 Thread MASI
Il Sun, 10 Feb 2008 12:03:59 +0100, Helmut Jarausch ha scritto:

> Hi,
> 
> I am to convert an old Perl-Tk script to Python.
> It starts by
> my $MW= new MainWindow;
> $MW->setPalette(background => 'AntiqueWhite1', foreground => 'blue');
> 
> Is there an equivalent for Tkinter? How can I set default colors for
> background and foreground for the whole application (root window and its
> children)
> 
> Many thanks for a hint,
> Helmut.

You have two options:
1) put your preference in a file

eg

file 'tk_option':

*foreground: blue
*background: green
*Entry*background: red

and read it

root = Tkinter.Tk()
root.option_readfile('tk_option')

2) in your program whit option_add

eg

root = Tkinter.Tk()
root.option_add('*foreground', 'blue')
root.option_add('*background', 'green')
root.option_add('*Entry*background', 'red')
-- 
http://mail.python.org/mailman/listinfo/python-list