Re: [python-win32] Capturing stdout when running a Python Script

2006-10-27 Thread Michael Foord
David Nicolson wrote: > This might do what you want to achieve. It seems to make py2exe crash > on exit, some file locking error. Works fine otherwise though. > > #!/usr/bin/env python > > import sys > > class LogBuffer: > def __init__(self): > pass > > def flush(self): >

Re: [python-win32] Parameterless propget in Python ActiveScript incomplete

2006-10-27 Thread Johan Lindvall
Hi, I have investigated this issue further. The problem seems to be that LazyDispatchItem doesn't remap the properties as DispatchItem does. If I disable the LazyDispatchItem generation in MakeOleRepr and always return a DispatchItem object, the script works as expected. If I leave MakeOleRepr u

Re: [python-win32] Capturing stdout when running a Python Script

2006-10-27 Thread David Nicolson
This might do what you want to achieve. It seems to make py2exe crash on exit, some file locking error. Works fine otherwise though. #!/usr/bin/env python import sys class LogBuffer: def __init__(self): pass def flush(self): sys.__stdout__.flush() def write(s

Re: [python-win32] Waiting for Wireless

2006-10-27 Thread Graham Bloice
> > Silly question... > > > > What is the friendly name of an network adapter? > > > > If it was Unix, I would say eri0, etc... But I can't think of a > > "friendly" name under Windows... > > I'm not sure where I got this terminus from, maybe I was inventing > it myself when I wrote this modul

Re: [python-win32] Capturing stdout when running a Python Script

2006-10-27 Thread Johan Lindvall
Hi, Thanks for the answers so far. I am afraid my orginal post was a bit unclear. I am looking for a way to capture script output running in an ActiveScript Python host. -- /Johan. ___ Python-win32 mailing list Python-win32@python.org http://mail.pyth

Re: [python-win32] Capturing stdout when running a Python Script

2006-10-27 Thread Stefan Holmgren
You can add this after your script "> file.txt" Example: :you_script.py >korv.txt Then it will your print to the korv file.. /HejHopp "Johan Lindvall" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > Is there any way of capturing or displaying stdout when running a > Py

[python-win32] Capturing stdout when running a Python Script

2006-10-27 Thread Johan Lindvall
Hi, Is there any way of capturing or displaying stdout when running a Python script? I know about: import sys sys.stdout = open("logfile.txt", "a") but I don't want to modify my scripts to achieve this. -- /Johan. ___ Python-win32 mailing list Python