Re: newb: How to call one modue from other

2006-12-06 Thread Gabriel Genellina
At Thursday 7/12/2006 01:03, johnny wrote: Gabriel Genellina wrote: > Reading the Python Tutorial helps a lot. > I did read "Dive Into Python", one week ago. It's a good book, but it didn't cover this kind of situation. Chapter 2. "Your First Python Program" The *very*first* example does thi

Re: newb: How to call one modue from other

2006-12-06 Thread Ben Finney
"johnny" <[EMAIL PROTECTED]> writes: > Gabriel Genellina wrote: > > > Reading the Python Tutorial helps a lot. > > > I did read "Dive Into Python", one week ago. It's a good book, but > it didn't cover this kind of situation. Yes, it is good. It's also not the Python tutorial. The Python tutori

Re: newb: How to call one modue from other

2006-12-06 Thread johnny
Gabriel Genellina wrote: > Reading the Python Tutorial helps a lot. > I did read "Dive Into Python", one week ago. It's a good book, but it didn't cover this kind of situation. -- http://mail.python.org/mailman/listinfo/python-list

Re: newb: How to call one modue from other

2006-12-06 Thread Gabriel Genellina
At Wednesday 6/12/2006 23:20, johnny wrote: Can someone also tell me what is the purpose of if __name__ == "__main__": Reading the Python Tutorial helps a lot. Do I have to call, main of ftp module within processKick? Yes, because the original script author didn't want to call a function

Re: newb: How to call one modue from other

2006-12-06 Thread johnny
johnny wrote: > I have a module called ftp and I have another module called > processKick. What I need is to have processKick, create fork and > execute ftp like below. > > Relevant processKick code as follows: > > def do_child_stuff(): > ftp > > def fork_test(): > pid = os.fork() > if

newb: How to call one modue from other

2006-12-06 Thread johnny
I have a module called ftp and I have another module called processKick. What I need is to have processKick, create fork and execute ftp like below. Relevant processKick code as follows: def do_child_stuff(): ftp def fork_test(): pid = os.fork() if pid == 0: # child