Weird: in the current CVS, certain files in Lib have null bytes (ASCII 0) in them. Install-time byte-compilation complains about this, so "make install" fails. Eg. here's what "less Lib/reconvert.py" shows me me: ------------------------------------------------------------------------ #! /usr/bin/env python1.5 r"""Convert old ("regex") regular expressions to new syntax ("re"). When imported as a module, there are two functions, with their own strings: convert(s, syntax=None) -- convert a regex regular expression to re syntax ^@^@^@^@te(s) -- return a quoted string literal [...] ------------------------------------------------------------------------ Those "^@"'s are really ASCII 0 -- I checked with "od -c". Am I on drugs here? -- Greg Ward - software developer gward@mems-exchange.org MEMS Exchange http://www.mems-exchange.org
Greg> Weird: in the current CVS, certain files in Lib have null bytes Greg> (ASCII 0) in them. Greg, I just did a cvs up. Lib/reconvert.py looks fine to me. It was not modified by the cvs up, so I assume nobody fixed any bugs. I suggest you delete (or move out of the way) any files containing ASCII NUL and cvs up again. On second thought, perhaps you should perform a quick backup of your important files first. Maybe your disk drive is going on holiday... :-( Skip
"GW" == Greg Ward <gward@mems-exchange.org> writes:
GW> Weird: in the current CVS, certain files in Lib have null GW> bytes (ASCII 0) in them. Install-time byte-compilation GW> complains about this, so "make install" fails. GW> Eg. here's what "less Lib/reconvert.py" shows me me: GW> ------------------------------------------------------------------------ GW> #! /usr/bin/env python1.5 GW> r"""Convert old ("regex") regular expressions to new syntax GW> ("re"). GW> When imported as a module, there are two functions, with their GW> own strings: GW> convert(s, syntax=None) -- convert a regex regular GW> expression to re syntax GW> ^@^@^@^@te(s) -- return a quoted string literal [...] GW> ------------------------------------------------------------------------ GW> Those "^@"'s are really ASCII 0 -- I checked with "od -c". GW> Am I on drugs here? Probably! A cvs update as of 2 minutes ago showed nothing like this in the file for me. say-hi-to-the-flying-pink-elephants-for-me-ly y'rs, -Barry
On 25 September 2001, Barry A. Warsaw said:
Probably! A cvs update as of 2 minutes ago showed nothing like this in the file for me.
As Skip suggested, I deleted the affected files, cvs up'd, and now no problems. OK, where's that disk diagnostic program again... or maybe I should just take more drugs and forget about all my worries...
say-hi-to-the-flying-pink-elephants-for-me-ly y'rs,
No way, the flying pink elephants are carrying MACHINE GUNS! Aiiee!! Time for a kinder, gentler hallucinogen... Greg
[Greg Ward]
This is a problem with running on a system other than Windows <wink>. I get this output from the attached program: checking .py files in C:\Code\python\Lib checked 165 files checking .py files in C:\Code\python\Lib\test checked 201 files import os dir = os.getcwd() print "checking .py files in", dir count = 0 for fname in os.listdir(dir): if fname.endswith('.py'): count += 1 f = file(fname, 'rb') guts = f.read() i = guts.find('\x00') if i >= 0: print "Whoa! Null byte at offset", i, "in", fname f.close() print "checked", count, "files" no-nulls-under-a-real-os-ly y'rs - tim
participants (4)
-
barry@zope.com
-
Greg Ward
-
Skip Montanaro
-
Tim Peters