Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
piping input to an external script
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="norseman, post: 3857685"] ============================ If you search through the recent Python-List for UTF-8 things you might get the same understanding I have come to. the problem is the use of python's 'print' subcommand or what ever it is. It 'cooks' things and someone decided that it would only handle 1/2 of a byte (in the x'00 to x'7f' range) and ignore or send error messages against anything else. I guess the person doing the deciding read the part that says ASCII printables are in the 7 bit range and chose to ignore the part about the rest of the byte being undefined. That is undefined, not disallowed. Means the high bit half can be used as wanted since it isn't already taken. Nor did whoever it was take a look around the computer world and realize the conflict that was going to be generated by using only 1/2 of a byte in a 1byte+ world. If you can modify your code to use read and write you can bypass print and be OK. Or just have python do the 'cat mytest.html | validate' for you. (Apply a var for html and let python accomplish the the equivalent of Unix's: for f in *.html; do cat $f | validate; done or for f in *.html; do validate $f; done #file name available this way If you still have problems, take a look at os.POPEN2 (and its popen3) Also take look at os.spawn.. et al HTH Steve [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
piping input to an external script
Top