Jaime Wyant wrote:
> I think this is the simplest way to do that:
> 
> import sys
> sys.path.append('/path/to/directory/containing/script')
> 
> import zopescript
> zopescript.main()
> 
> The code above assumes:
> o that the path you use to append contains an __init__.py in it...
I don't think this is necessary.  The __init__.py is necessary
if you do something like:
     import sys
     sys.path.append('/path/to/directory/containing')
     from script import zopescript
     zopescript.main()
     # or import zopescript.script; script.zopescript.main()
That is, if the directory ".../containing" needs to be interpreted as
a package.

If the script you want to call is in the same directory as the script
calling it (or any directory on the path), you can simply use:
     import zopescript
     zopescript.main()

--Scott David Daniels
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to