<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>You'll need to set win32con.STARTF_USESTDHANDLES in
the dwFlags member of PySTARTUPINFO.</FONT></DIV>
<DIV><FONT face=Arial size=2>Also, the PySECURITY_ATTRIBUTES in the call to
CreateFile has to have bInherit set to True,</FONT></DIV>
<DIV><FONT face=Arial size=2>and the bInheritHandles parm to CreateProcess has
to be True.</FONT></DIV>
<DIV><FONT face=Arial size=2> hth</FONT></DIV>
<DIV><FONT face=Arial size=2>
Roger</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>>>> Sorry for the newbie question, but...<BR><BR>>>> So
far I have been creating scripts that automate command invocations and
<BR>>>> start up Windows apps just fine. Now, however, I wanted
automate some <BR>>>> Perforce commands. Perforce has an option
that takes writes its command <BR>>>> output as a marshaled Python
dictionary. This requires me to route stdout <BR>>>> to a
file.<BR><BR>>>> I have created a file using win32file and gotten back
a file handle. I <BR>>>> have assigned that file handle to the
hStdOutput item in STARTUPINFO. I <BR>>>> have passed the
STARTUPINFO to the win32process.CreateProcess method. Yet,
<BR>>>> the output does not get written to the
file.<BR><BR>>>> I have tested various combinations of create and
sharing options, but <BR>>>> nothing seems to work. There is
obviously some detail I am missing. Can <BR>>>> someone give me
the nudge I need to get over this hurdle?<BR><BR>>>>
TIA<BR><BR>>>> <G><BR></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>