Re: having a function in a separate file

2008-10-04 Thread Terry Reedy
Maryam Saeedi wrote: Hi all, I have a very basic question. I was wondering if I can have a function in a separate file Yes, the separate file become a module. and in my main file sort of import that function and Yes. either of import somemod # and use somemod.func from somemod import f

having a function in a separate file

2008-10-04 Thread Maryam Saeedi
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 diff