embed python in ms-word?

oyster lepto.python at gmail.com
Fri Sep 5 23:32:47 EDT 2008


In my ms-word documnet, there are some calculation whihc I have to
change due to different argumnet. is there any way to embed python
code in word, so that I can write the following as a macro or
something else, then the result (i.e. 2) is shown in the word
documnet?

def f(n):
  if n<2:
    return 1
  else:
    return f(n-1)+f(n-2)
main()
  return 'fib(3)=%0i' % f(3)

if that is impossible, does there exist such word-addons can do that? thanx



More information about the Python-list mailing list