You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1.1 KiB

pyTermTk - Hello World

Intro

  • Creating a simple GUI application using pyTermTk involves the following steps −
  • Import TermTk package.
  • Create an TTk object.
  • Add a TTkLabel object in it with the caption "hello world" in the position (x=5,y=2).
  • Enter the mainloop of application by mainloop() method.

Following is the code to execute Hello World program in pyTermTk

import sys, os
import TermTk as ttk

root = ttk.TTk()
ttk.TTkLabel(parent=root, pos=(5,2), text="Hello World")
root.mainloop()

The above code produces the following output (yuhuuuuu!!!)−



     Hello World