![how to type a line return in a python text editor how to type a line return in a python text editor](https://s33046.pcdn.co/wp-content/uploads/2019/11/ssms-properties.png)
![how to type a line return in a python text editor how to type a line return in a python text editor](https://swcarpentry.github.io/python-novice-gapminder/fig/0_jupyterlab_landing_page.png)
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. I: The resume icon allows you to return to play mode from debug mode. The H arrow tells Python to exit out of the debugger. The G arrow tells Python to take a small step, meaning diving deep into each component of an expression. The text widget is used to provide a multiline textbox (input box) because in Tkinter single-line textbox is provided using Entry widget. In this module, you’ll learn about the different types of operating systems, and how you can get your. If you want a text-editor in your desktop application then you can use the Tkinter Text widget. Video created by Google for the course 'Using Python to Interact with the Operating System'. 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. The F arrow tells Python to take a big step, meaning jumping to the next line or block of code. In this tutorial, we will cover the Tkinter Text widget in Python.