[Moin-devel] standalone wiki

Michael Geary Mike at Geary.com
Mon Mar 22 11:18:02 EST 2004


> The redirection syntax (at least this much of it) is the same 
> in Windows 2000 as *nix. The only difference is that the null 
> device is 'nul' instead of '/dev/null'. So:
> 
> pythonw moin.py >nul 2>&1
> 
> (untested, but looks right)

Hmm... This may not do you any good at all. The command line redirection is
implemented by CMD.EXE. If you run CMD.EXE, it's going to open a console
window. But the whole point of the exercise was to avoid a console window!

What about redirecting stderr and stdout in Python code? Something like this
(untested but maybe close):

class devnull:
    def write( self, str ):
        pass

import sys
sys.stdout = devnull()
sys.stderr = devnull()

import moin
# do you need to call something here?

-Mike





More information about the Moin-devel mailing list