here .. its showing me error that ... there is some illegal character in path name.
Here FileName is variable which containg the name of file which is passed from another function and i have check that there is no illegal character in that file name of path.
If same path i write without using variable i mean static as shown in my first post , than it is working properly but while dealing with variable it's not working. giving me error.
no i m not passing any illegal character ...
and now its solved ...
i dont think sknake was suggesting you were deliberately using illegal characters, what he asked you to do is a standard step in debugging an error like this; if a variable is throwing an exception, check the contents of the variable at the point of the exception :)
For future reference (and to satisfy my own curiosity), what was causing the issue?
root = tkinter.Tk()
buttons=[i for i in range(10)]
#If specific button is pressed, output "YES"
for num in buttons: