having a function in a separate file

Maryam Saeedi saeed008 at umn.edu
Sat Oct 4 19:17:01 EDT 2008


Hi all,

I have a very basic question. I was wondering if I can have a function in a
separate file and in my main file sort of import that function and if so are
all the variables local and if I need any variables in the function I should
give it as an input?

I need to call a function in many different tasks and I am improving that
function so I prefer to make the changes only once. If you have any example
I really appreciate it.

Thanks a lot,

Maryam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20081004/a7c4aa2f/attachment.html>


More information about the Python-list mailing list