bignose-hates-spam at and-benfinney-does-too.id.au
Fri Nov 21 04:57:44 CET 2003
On Thu, 20 Nov 2003 22:52:40 -0500, hokiegal99 wrote:
> When I use 'file' instead of 'open' on the 4th line of this script
> (the line that begins with "outputFile")
Please post a minimal script that shows the problem. This one has loads
of irrelevant guff.
> I get this error: "UnboundLocalError: local variable 'file' referenced
> before assignment"
If you're using the function 'file', it seems best not to have a
variable by that name also.
It will be easier to see what's going on if you show a smaller script
that does nothing unrelated to the problem behaviour. More than likely,
you'll see the cause of the problem yourself that way.
\ "Quote me as saying I was mis-quoted." -- Groucho Marx |
Ben Finney <http://bignose.squidly.org/>
More information about the Python-list