W
W. Watson
I'm just playing with Python. It's my first outing. The program is below. I
thought I'd fuss with numbers, and then get bold and try some Tkinter stuff.
I copied the root stuff from a book (Grayson), and get stopped at the
optionDB statement. What's wrong? I get
clError: couldn't open "optionDB": no such file or directory
from Idle. Does the Tk code need to be up higher? The book is dated 2000, so
maybe that item no longer exists.
----------------------
#!/usr/bin/python
from Numeric import *
from Tkinter import *
a=3.14
d=cos(a)
b=2
c=a+b
print "sum is = ",c, "and cos = ", d
print "arcos is ", arccos(d)
print "sqrt of d is ", sqrt(-d+3)
root = Tk()
root.option_readfile('optionDB')
root.title('TopLevel')
print "Onward"
Label(root, text='Very Top').pack(pady=10)
t1 = Toplevel(root)
Label(t1, text='A little Math').pack(padx=10, pady=10 )
print "Of to the races!"
t2 = Toplevel(root)
# t2.transient(root)
print "here we go"
t3=Toplevel(root, borderwidth=5, bg='blue')
t3.orverrideredredirect(1)
t3.geometry('200x70+15+150')
root.mainloop()
thought I'd fuss with numbers, and then get bold and try some Tkinter stuff.
I copied the root stuff from a book (Grayson), and get stopped at the
optionDB statement. What's wrong? I get
clError: couldn't open "optionDB": no such file or directory
from Idle. Does the Tk code need to be up higher? The book is dated 2000, so
maybe that item no longer exists.
----------------------
#!/usr/bin/python
from Numeric import *
from Tkinter import *
a=3.14
d=cos(a)
b=2
c=a+b
print "sum is = ",c, "and cos = ", d
print "arcos is ", arccos(d)
print "sqrt of d is ", sqrt(-d+3)
root = Tk()
root.option_readfile('optionDB')
root.title('TopLevel')
print "Onward"
Label(root, text='Very Top').pack(pady=10)
t1 = Toplevel(root)
Label(t1, text='A little Math').pack(padx=10, pady=10 )
print "Of to the races!"
t2 = Toplevel(root)
# t2.transient(root)
print "here we go"
t3=Toplevel(root, borderwidth=5, bg='blue')
t3.orverrideredredirect(1)
t3.geometry('200x70+15+150')
root.mainloop()