On 2009-07-30, Barak, Ron <ron.ba...@lsi.com> wrote:
> Hi Dave,
>
> On second thoughts, I may have a problem implementing the
> wrapper solution, because my actual test_pyc.pyc, needs to
> parse its command line. Namely, the actual call to
> test_pyc.pyc looks something like this:
>
> $ python  test_pyc.py -U dave -PpasswoRD -C CreateMcGroupOnVolume --SVMs_IPs 
> '10.1.1.1 , 10.1.1.2' -n "host1,host2" -g gn -j jn -s svn -t tvn -p pool1 -l 
> -c
>
> And I don't know of a way to add these parameters to the
> "import test_pyc" in wrapper
>
> Is there a way to pass information to an imported module ?
> (Sorry if there's an obvious answer, I just cannot figure it
> out).

I don't understand your problem.  The module would parse
sys.argv just like always.

If you don't like that for some reason, you could define an
entry point in the module and call it:

#!/usr/bin/python
import sys,test_pyc
test_pyc.main(*sys.argv)

-- 
Grant Edwards                   grante             Yow! We just joined the
                                  at               civil hair patrol!
                               visi.com            
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to