On Mon, Jul 22, 2013 at 10:47 AM, Jim Mooney <cybervigila...@gmail.com>wrote:
I forgot about TREE. But figured piping C:\Python27>tree /f > pytree.txt > might be illuminating. I piped since it took forever to print because I > have python(x,y). Unfortunately, I got tiny numbers and A with umlauts > instead of the nice path outlines in the dos box: > > ³ ³ ³ ³ ÀÄÄÄtests > > That's an encoding problem; TREE is apparently not Unicode-aware, and uses the old ASCII-US code page for values above 127. I suspect that bringing ancient command-line utilities into the Notepad++ is my default text editor; I was able to see the line-drawing characters properly after I selected Encoding/Character sets/Western European/OEM-US. No idea what you'd need to do in other text editors... TREE /? displays the following: Graphically displays the folder structure of a drive or path. TREE [drive:][path] [/F] [/A] /F Display the names of the files in each folder. /A Use ASCII instead of extended characters. Using /f /a will give you a readable file, no matter which text editor you use. I suspect that it hasn't been updated for Unicode for two reasons: 1) updating TREE to use Unicode for line-drawing would break compatibility for people who pipe its output into other CLI programs in the *nix style 2) although Microsoft could get around that by adding another command-line switch, there probably isn't an awful lot of demand - who uses TREE anymore, except in the context of discussions like this? If you haven't already read it, may I suggest Joel's intro to Unicode? http://www.joelonsoftware.com/articles/Unicode.html
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor