\pywikibot-core> python -c "import pwb; import pywikibot; pywikibot.output(u'\u305d\u306e\u4e2d\u3067')" > file その中で
this should be redirected to file, not printed to the console.
\pywikibot-core> python -c "import pwb; import pywikibot; pywikibot.output(u'\u305d\u306e\u4e2d\u3067')" > file その中で
this should be redirected to file, not printed to the console.
The file is created but empty. Did it work in compat? (compat is not compatible with Python 3)
The redirection work as follows:
py -c "import pywikibot; pywikibot.output('foo bar')" > file.txt 2>&1
which redirects stderr (2) to 1 (stdout) or using stdout directly:
py -c "import pywikibot; pywikibot.stdout('foo bar')" > file.txt
See: https://stackoverflow.com/questions/1420965/redirect-windows-cmd-stdout-and-stderr-to-a-single-file