Jan-05-2019, 01:49 AM
file is only defined in the function. It does not exist outside the function. You need to return it from the function to use it elsewhere.
Also, file is a really bad variable name. file is a built-in type in Python, and be assigning something else to it you lose the use of the built-in, as might other code that is expecting it.
Also, file is a really bad variable name. file is a built-in type in Python, and be assigning something else to it you lose the use of the built-in, as might other code that is expecting it.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures