Python Forum
[Tkinter] Gui creation
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Gui creation
#2
from tkinter import *
import subprocess
import os
import turtle
from tkinter.ttk import *
screen = turtle.Screen()
try:
import tkinter as tk # python v3
except:
import Tkinter as tk # python v2

# This function is called when the submit button is clicked
def submit_callback(input_entry):
print("User entered : " + input_entry.get())
cmd = subprocess.Popen("cmd.exe /K cd C:\\ti\\c2000\\C2000Ware_1_00_04_00\\utilities\\flash_programmers\\serial_flash_programmer & serial_flash_programmer.exe -d f2803x -k f28335_flash_kernel.txt -a PQCR.i00 -p COM7 -b 9600 -v") 
#os.system("cd C:\\ti\\c2000\\C2000Ware_1_00_04_00\\utilities\\flash_programmers\\serial_flash_programmer")
#os.system("serial_flash_programmer.exe -d f2803x -k f28335_flash_kernel.txt -a PQCR.i00 -p COM3 -b 9600 -v & pause")
return None


####################### GUI ###########################
root = tk.Tk()
root.geometry('800x550') #Set window size

# Heading
#heading = tk.Label(root, text="BBS",bg="black", fg="orange" ,font=("Times New Roman", 50))
#heading.place(x = 350, y = 0)

#lbl = Label(window, text="MAIN MENU", bg="white", fg="orange" ,font=("Times New Roman", 50))

input_label = tk.Label(root, text="Firmware Downloading to \n TMS320F2833x", bg="white", fg="blue" ,font=("Times New Roman", 20))
input_label.place(x = 0, y = 150)

input_entry = tk.Entry(root,bg="white", fg="green" ,font=("Times New Roman", 20))
input_entry.place(x = 400, y = 175)

screen = turtle.Screen()
screen.bgpic(r"C:\ti\c2000\C2000Ware_1_00_04_00\utilities\flash_programmers\serial_flash_programmer\bbs.gif")

submit_button = tk.Button(root, text = "Submit", bg="brown", fg="green" ,font=("Times New Roman", 20),command = lambda: submit_callback(input_entry))
submit_button.place(x = 350, y = 450)



root.mainloop()
--------------------

Hi This is Gangadhararao,am new to python,when am running this code it will displaying image on another screen,i want to display the image in the same window,like in heading it has to come,but it was not coming,am struggling from past 3 days,please kindly help me to solve this

Am waiting for your kind help,

Thanks & Regards
Gangadhararao G
[email protected]
Reply


Messages In This Thread
Gui creation - by Gangadhararao - Jun-21-2018, 04:44 AM
RE: Gui creation - by Gangadhararao - Jun-21-2018, 07:37 AM
RE: Gui creation - by wuf - Jun-21-2018, 10:53 AM
RE: Gui creation - by Gangadhararao - Jun-21-2018, 02:50 PM
RE: Gui creation - by wuf - Jun-21-2018, 05:07 PM
RE: Gui creation - by Gangadhararao - Jun-26-2018, 04:02 AM
Command line with python - by Gangadhararao - Jun-26-2018, 05:21 AM
RE: Gui creation - by wuf - Jun-26-2018, 07:54 AM
RE: Gui creation - by wuf - Jun-26-2018, 10:35 AM
RE: Gui creation - by snippsat - Jun-27-2018, 06:29 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020