I got it to run at last, thanks to lots of trial and error and help from
co-worker Keith Arnett. It appears that the script file got corrupted with
tabs on the trip from the Web site to my PC. The following message kept
appearing in my FrameMaker Console:

fmPython - Python scripting for FrameMaker
  File "<string>", line 15
     # get first text inset - this may generate RuntimeException
IndentationError: expected an indented block

This line was indented with a tab instead of hard spaces. When I removed the
tab, the error moved on to the next line. Keith sent me his version of the
script file, which he had downloaded using Firefox, and it had no tabs so it
worked fine. It appears Internet Explorer decided tabs would be much nicer
than spaces, so went ahead and replaced them without telling me!

For those attempting to do this trick at home, please note the following

1. You must install Python 2.2.3 as your interpreter, not the latest version
on their Web site.
2. If you download the script with IE, be sure to replace any substituted
tabs with spaces.
3. When you open the script in Frame to load it, open it as text with ASCII
4. After you run the script, don't save your chapter files or you'll lose
your text insets.

Hope this helps,
Jim Ramsay

-----Original Message-----
From: Scott Prentice [mailto:s...@leximation.com]
Sent: Monday, April 03, 2006 12:51 PM
To: Joe Malin
Cc: James Ramsay; framers at lists.frameusers.com
Subject: Re: fmPython

Hi Joe...

As you point out .. the Python version is critical. Once I installed the
proper version, it now initializes in FM 7.x. Most plugins are upward
compatible unless they make use of an obitted API feature, so I'll bet this
should work fine. However, I'm still trying to figure out how to load the
python script .. it's probably obvious, but I've moved on to other work for

Jim, did you get a script to run yet?


Scott Prentice
Leximation, Inc.

Joe Malin wrote:

>* As far as I can tell from Googling, the most recent supported of FM
>is *6*.
>* With most open-source/freeware, be sure you have the exact
>prerequisites. The open-source community is not particularly
>  concerned with "legacy" customers. The community generally assumes
>that it can change functionality, signatures,
>  and so forth. Customers then either upgrade on their own or stay with
>an older version.
>* On the whole, this is a Good Idea. It prevents bloat, allows for
>evolving design, and produces more robust, more
>  frequent fixes. Open-source SW usually allows for multiple versions
>of the same SW, but check first.
>* Remember that open-source is a mostly UN*X creature. What may be very
>easy to do in that environment may be much
>  harder to do in Windows, and vice versa.
>If anyone has heard of a version of fmPython compatible with 7.1/7.2,
>please write me ASAP. I know Python pretty well, and I could provide
>some value to FM 7.x users.
>Joe Malin
>Technical Writer
>jmalin at tuvox.com
>The views expressed in this document are those of the sender, and do not
>necessarily reflect those of TuVox, Inc.      
>-----Original Message-----
>From: framers-bounces+jmalin=tuvox.com at lists.frameusers.com
>[mailto:framers-bounces+jmalin=tuvox.com at lists.frameusers.com] On
>Behalf Of James Ramsay
>Sent: Sunday, April 02, 2006 1:07 PM
>To: framers at lists.frameusers.com
>Subject: fmPython
>Has anyone installed fmPython
>(http://www.isnet.sk/petrucha/?lang=en&page=fmPython) successfully? I
>want to use the script that converts all text insets to text prior to
>distilling a book to PDF, but I can't get fmPython to initialize. I get
>the following
>Cannot initialize API client c:\program
>Check for errors in the APIClients section of C:\Program
>verify that the client program exists, and make sure you have enough
>swap space to run the client.
>There are no instructions for adding a line to the APIClient section of
>the maker.ini file in the bare bones fmPython documentation. I tried
>making one up, but it had no effect. Any ideas?
>I'm running Windows XP, Frame 6.0 with FrameScript 2.1 and IXGen 5.5
>already installed, Python 2.4.3, and the fmPython22.dll in the default
>fminit\Plugins folder.
>Thanks in advance for your help,
>Jim Ramsay
>Senior Technical Writer
>webMethods Denver

Reply via email to