[AG-TECH] "Status" window for what's going on?
Jennifer Teig von Hoffman
jtvh at bu.edu
Fri Feb 21 11:05:59 CST 2003
Hi Frank,
Thanks, that's cool. Hopefully as AG2 moves along and we all learn more,
that could be expanded to be used among the sites.
Ivan and I were chatting in the Meadow this morning, and he pointed me
to this, which is helping me start to get a clue about what it means to
develop services for AG2:
http://www-unix.mcs.anl.gov/fl/research/accessgrid/software/developers/areas.html
- Jennifer
Frank Sweetser wrote:
>Here's a quick program I whipped up to make a little bulleting board. It
>pops up two windows. One goes up on a display, and the other one stays on the
>console where you have two inputs, one which becomes the title and the other
>the text of the one on display. It's not much, but it should at least be a
>little more elegant than notepad...
>
>
>
>------------------------------------------------------------------------
>
>#!/usr/bin/python
>
>from Tkinter import *
>from tkFont import *
>
>class BBrd:
> def __init__(self, master):
>
> self.deftitle = "Access Grid Bulletin Board"
>
> master.title("Bulletin Board Input")
> inframe = Frame(master)
> inframe.pack()
>
> self.font = Font(size="20", weight=BOLD)
>
> self.title = Text()
> self.title.config(height=1)
> self.title.insert(INSERT,self.deftitle)
> self.title.pack()
>
> self.input = Text()
> self.input.config(height=5)
> self.input.pack()
>
> self.disp = Toplevel(master)
> self.disp.title(self.deftitle)
> self.outframe = Frame()
> self.outframe.pack()
>
> self.curt = Text(self.disp)
> self.curt.config(state=DISABLED, height=5, bg="black", fg="white", font=self.font)
> self.curt.pack()
>
> b = Button(master, text="Display", command=self.push_text)
> b.pack()
>
> def push_text(self):
> self.curt.config(state=NORMAL)
> self.curt.delete(1.0,END)
> self.curt.insert(INSERT,self.input.get(1.0,END))
> self.curt.config(state=DISABLED)
>
> self.disp.title(self.title.get(1.0,END))
>
>
>root = Tk()
>
>app = BBrd(root)
>
>root.mainloop()
>
>
More information about the ag-tech
mailing list