WYAE - FWTOOLS Mailing List Archive


[fwtools] help with fwdoc_used_objects.py
From:"David Pascoe"
Date: Fri, 09 Mar 2007 14:25:32 -0500

I'm almost embarrassed to post this, because I'm likely doing something very 
brainless.  On Windows XP, using Python 2.5, I'm experiencing the following 
(I've broken out the process steps for clarity):

   C:\FW\Working Files>fw1r55_to_fwdoc.pl --with_implicit_rules 
--merge_AI=rulebases_5_0.fws --rules=myrules.W --objects=objects_5_0.C 
--verbose > fwdoc1.txt
    - 2006 by Volker Tanger 

   
skipping....................................................................................................................
   
............................................................................................................................
   ..........................................

   [...]

           
rule(501).................................................................
           
rule(502)................................................................
           
rule(503)..................................................................

   skipping...

   Reading NAT rules...
           rule_adtr(0)..................................................
           rule_adtr(1)................................................

   skipping....

   Reading Done.

   Printing ruleset to FWdoc into STDOUT.

   Done.

I can verify that the output of fw1r55_to_fwdoc.pl is produced just fine.  
Next I attempt to pass my output file (fwdoc1.txt) as input into 
fwdoc_used_objects.py:

   C:\FW\Working Files>type fwdoc1.txt | fwdoc_used_objects.py
   The process tried to write to a nonexistent pipe.
   Traceback (most recent call last):
     File "C:\FW\Working Files\fwdoc_used_objects.py", line 56, in 
       fwdoctxt = sys.stdin.read(MAXSIZE)
   IOError: [Errno 9] Bad file descriptor

Any idea why this is occurring?  I get roughly the same result with 
fwdoc_to_html.py and fwdoc_to_txt.py:

   C:\FW\Working Files>type fwdoc1.txt | fwdoc_to_html.py
   The process tried to write to a nonexistent pipe.
   Traceback (most recent call last):
     File "C:\FW\Working Files\fwdoc_to_html.py", line 45, in 
       fwdoctxt = sys.stdin.read(MAXSIZE)
   IOError: [Errno 9] Bad file descriptor

   C:\FW\Working Files>type fwdoc1.txt | fwdoc_to_txt.py
   The process tried to write to a nonexistent pipe.
   Traceback (most recent call last):
     File "C:\FW\Working Files\fwdoc_to_txt.py", line 45, in 
       fwdoctxt = sys.stdin.read(MAXSIZE)
   IOError: [Errno 9] Bad file descriptor

If I replace "|" with ">", I get no output at all:
   C:\FW\Working Files>type fwdoc1.txt > fwdoc_to_txt.py

   C:\FW\Working Files>

I'm obviously doing something dumb, but I suppose I'm too close to it to see 
my error.
Any suggestions?

Regards,
--- Dave

_________________________________________________________________
Mortgage rates as low as 4.625% - Refinance $150,000 loan for $579 a month. 
Intro*Terms  
https://www2.nextag.com/goto.jsp?product=100000035&url=%2fst.jsp&tm=y&search=mortgage_text_links_88_h27f6&disc=y&vers=743&s=4056&p=5117