737716 Dealing with the imperfect (or how to handle errors)16.1 Exercises. 596013 More on Lists6114 Revenge of the Strings14.1 Examples.
49515111 Dictionaries5312 Using Modules12.1 Exercises. 36Variables with more than one valueMore features of lists. Using Python from the command line.i7.58 Lists8.18.28.38.4Exercises. 7.2 Variables in functions7.3 Function walkthrough7.4 Examples. 23232324277 Defining Functions7.1 Creating Functions. 6.2 What should the program do?6.3 What does the program do?.
33345673 Who Goes There?3.1 Input and Variables. 2.4 Talking to humans (and other intelligent beings)2.5 Examples. Thanks to everyone I havemissed.Dedicated to Elizabeth CogliatiCONTENTS1 Intro1.11.21.31.222 Hello, World2.1 What you should know.
Thanks to Joe Oppegaard for writing all the exercises. Thanks also to Elizabeth Cogliati forcomplaining enough :) about the original tutorial,(that is almost unusable for a non-programmer) for proofreading andfor many ideas and comments on it.
Brown for writing most of the Windows install info. I will try to answer any questions you have as best as I can.Thanks go to James A.
Go to ˜jjc/easytut/to see all these forms.If you have any questions or comments please contact me at I welcome questions and commentsabout this tutorial.
Therefore you may modify it andrelicense it under any license you please.AbstractNon-Programmers Tutorial For Python is a tutorial designed to be a introduction to the Python programming language.This guide is for someone with no programming experience.If you have programmed in other languages I recommend using The Python Tutorial written by Guido van Rossum.This document is available as LATEX, HTML, PDF, and Postscript.
If you want more tutorials like this tell me what here.įull Code: import sys v=sys.version() if "2.7" in v: from Tkinter import * import tkFileDialog elif "3.3" in v or "3.4" in v: from tkinter import * import tkinter.tkFileDialog root=Tk("Text Editor") text=Text(root) id() def saveas(): global text t = text.get("1.0", "end-1c") savelocation=tkFileDialog.asksaveasfilename() file1=open(savelocation, "w+") file1.write(t) file1.close() button=Button(root, text="Save", command=saveas) id() def FontHelvetica(): global text nfig(font="Helvetica") def FontCourier(): global text nfig(font="Courier") font=Menubutton(root, text="Font") id() nu=Menu(font, tearoff=0) font=nu Helvetica=IntVar() arial=IntVar() times=IntVar() Courier=IntVar() _checkbutton(label="Courier", variable=Courier, command=FontCourier) _checkbutton(label="Helvetica", variable=helvetica, command=FontHelvetica) root.Non-Programmers Tutorial For PythonJosh CogliatiAugust 4, 2005Copyright(c) 1999-2002 Josh Cogliati.Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium,provided that the copyright notice and permission notice are preserved, and that the distributor grants the recipientpermission for further redistribution as permitted by this notice.Permission is granted to distribute modified versions of this document, or of portions of it, under the above conditions,provided also that they carry prominent notices stating who last altered them.All example python source code in this tutorial is granted to the public domain. Under the last line you added, add this: def FontHelvetica(): global text nfig(font="Helvetica") def FontCourier(): global text nfig(font="Courier") font=Menubutton(root, text="Font") id() nu=Menu(font, tearoff=0) font=nu helvetica=IntVar() courier=IntVar() _checkbutton(label="Courier", variable=courier, command=FontCourier) _checkbutton(label="Helvetica", variable=helvetica, command=FontHelvetica)Ĭongratulations! You have finished a very simple text editor.