Return variables from modules ??
Mark Roach
mrroach at okmaybe.com
Wed Oct 22 16:54:23 EDT 2003
On Wed, 22 Oct 2003 17:09:54 +0100, Rigga wrote:
> I have tried the code you supplied however it still does not return the
> reply as expected, I have even tried the following code but I just cant get
> it to return a variable from a module:
>
> My module: we will call it filechk.py
> ********************************************************************
> import sys
> import os
>
> def myfunction():
> reply = 'repeat'
> FilePath = raw_input("Enter path to files: ")
>
> def chkpth(FilePath):
Here you define chkpth, but you never call it... Why have you made this
into a separate function inside of myfunction? It seems you should remove
this def and unindent everything under it.
-Mark
More information about the Python-list
mailing list