FANDOM


Icon TFT
"You are accessing the classified database of the Task Force Talon"
This section of the Act of War wiki is archived, containing information from defunct fansites and wikis.
Do NOT edit any information in the archives unless it is fixing up spelling mistakes.
Print hook: send print output to Debugview

add this file printhook.py to Datalight/PythonModules

<python>
"""print redirector. This module will redirect the stdout to DebugView when imported""" 

import sys 
import EugUtil 
import effet 

class debugview_stdout(object): 
    def __init__(self, text_writer): 
        self.text_writer = text_writer 
    def write(self, message): 
        self.text_writer.Affichage = message 
        effet.RunEffetInstantane(self.text_writer) 

def activate_hook(): 
    text_writer = EugUtil.MakeObject("TEffetEugDebugWin32") 
    sys.stdout = debugview_stdout(text_writer) 
    print "Print hook activated"
</python>

now activate it with this ndf code:

<ndf>
TEffetDescriptor_EffetPythonInstantane 
( 
    Code = """ 
    import printhook 
    printhook.activate_hook() 
    """ 
)
</ndf>

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.