Thanks for your input vegaseat. I have posted the code that is giving me the problem in the two scripts and I hope you can comment further.
Thanks in advance - Elvedon.
#The script displayed below is only part of the larger original script.#
#filename = 'firstScript.py'
#!/usr/bin/python
from Tkinter import *
import pickle
import tkFont
import os, sys
from ImageTk import PhotoImage
from PIL import Image
def Import():
import secondScript
root = Tk()
root.geometry("600x400")
root.title("FirstScript")
w = Canvas(root, width=300, height=400, bg= "white")
w.place(x=300,y=0,anchor=NW)
photo = PhotoImage(file="fotoimage01.bmp")
item = w.create_image(152,200,image=photo)
import_button = Button(root, text="Imprt", command = Import)
import_button.place(x=150, y=150, anchor=N)
root.mainloop()
#Second Script#
#Although the script displayed below is only a part of the larger original script.#
#The two scripts display the same error message.#
#
#When this script is run alone as a script, it works perfectly.#
#When this script is imported into the First Script as a module,#
#it will not run and the following error message is displayed: #
# Exception in Tkinter callback
#Traceback (most recent call last):
# File "C:\Python26\lib\lib-tk\Tkinter.py", line 1410, in __call__
# return self.func(*args)
# File "F:\DaniWeb\firstScript.py", line 12, in Import
# import secondScript
# File "F:\DaniWeb\secondScript.py", line 32, in <module>
# item = wb.create_image(397,281,image=photo)
# File "C:\Python26\lib\lib-tk\Tkinter.py", line 2156, in create_image
# return self._create('image', args, kw)
# File "C:\Python26\lib\lib-tk\Tkinter.py", line 2147, in _create
# *(args + self._options(cnf, kw))))
#TclError: image "pyimage2" doesn't exist
#filename = 'secondScript.py'
#!/usr/bin/python
from Tkinter import *
import pickle
import tkFont
import os, sys
from ImageTk import PhotoImage
from PIL import Image
root = Tk()
root.geometry("600x400")
root.title("SecondScript")
wb = Canvas(root, bg="yellow")
wb.config(width= 794, height= 562)
wb.place(x=0,y=0,anchor=NW)
photo = PhotoImage(file= 'fotoimage02.bmp')
item = wb.create_image(397,281,image=photo)
root.mainloop()