Calling function from command line
Henrik Motakef
henrik.motakef at web.de
Wed Sep 18 17:27:41 EDT 2002
gregoryk at futures.wharton.upenn.edu (GREGORY KNESER) writes:
> c:\python22\python func.py func1('input1','input2')
>
> or some such thing and run the function with the inputs I fed it rather
> than the defaults. Is such a call possible?
Not quite, but maybe something like
python -c "import func; func.func1('input1','input2')"
works for you. Or perhaps
echo 'func1("input1", "input2")' | python -i func.py
hth
Henrik
More information about the Python-list
mailing list