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]