From: "Eric Price" <[EMAIL PROTECTED]>
Date: March 31, 2007 9:38:53 AM EDT
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Cc: python-list@python.org
Subject: Re: os.system questions
Oops! The problem isn't in the os.system call. It's in the fact
that I don't call the function. That is, I write a script called
"test.py" with a function in it called "freshReboot". Now, how do I
call that function from test.py? That is, how do I write a cron
event such that "freshReboot" actually gets called when I run test.py?
TIA,
Eric
>>> Eric - to call a function that is located inside another module
you first need to import that module into the program you are running:
from test.py import * # this would import all functions from test.py
from test.py import freshReboot # this will import freshReboot from
test.py
to call freshReboot in your program you would simply call it by it's
name freshReboot
ex: x = freshReboot()
--
http://mail.python.org/mailman/listinfo/python-list