[Tutor] Any Math Modules ?

2004-12-11 Thread Harm Kirchhoff
I am currently updating the DMOZ section of:
http://www.dmoz.org/Computers/Programming/Languages/Python/Modules/Math_and_Calculations/
If anyone has some useful python packages for math that are not listed
in DMOZ, please let me know. It makes life much easier if your code can
be found by search engines.



___
Tutor maillist  -  [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Sample Tkinter data entry screen?

2004-12-25 Thread Harm Kirchhoff
Hi Carrol,

What really helped me get going were the Tk inter chapters in
'Programming Python' by Mark Lutz.
Now I am producing Tk inter scripts very often and it is relatively
simple, but it took some time to get used to it.

Hope the following helps:


# Example just for Carrol

from Tkinter import *

class gui:

def __init__(self, root):
"""Implements the graphical surface."""
self.root = root
self.dir = []
# Frame to contain the fields
f = Frame(root) ; f.pack(side=TOP, fill=X)
# Text field for entry:
self.t1 = Text(f, width=20, height=1)
self.t1.pack(side=TOP,expand=YES,fill=X)
self.t2 = Text(f, width=20, height=1)
self.t2.pack(side=TOP,expand=YES,fill=X)

# Button
self.button = Button(root, text = 'Show me input', command = self.show_it )
self.button.pack(side=TOP)
return

def show_it(self):
# get whatever was entered and put it onto the screen
print 't1:',self.t1.get('0.0',END)
print 't2:',self.t2.get('0.0',END)
self.root.destroy()
self.root.quit()

return


if __name__ == '__main__':
# If run as stand alone ...
root = Tk()
gui( root )
mainloop()



-- 
 

 

Kind Regards,

Harm KIRCHHOFF

Private:
Tel. +81-72-297 -2536
Mob. +81-70-5653-8220
Eml: [EMAIL PROTECTED]



___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor