[Tutor] Replacing cmd.exe with custom .py application

Jean-Paul Calderone exarkun at divmod.com
Tue Sep 30 15:38:16 EDT 2008


On Tue, 30 Sep 2008 19:30:55 +0000 (UTC), Lie Ryan <lie.1296 at gmail.com> wrote:
>On Tue, 30 Sep 2008 15:09:06 -0400, Ezra Taylor wrote:
>
>> Is there something similar to /dev/null on Windows?
>
>
>I think it's called nul
>
>REM This is a batch file (.bat)
>echo "This won't show" > NUL
>
>I'm not sure how to use it in python though.
>

Check out os.devnull.  You can open it and write to it.

Jean-Paul



More information about the Python-list mailing list