Re: EOF while scanning triple-quoted string literal

2010-10-16 Thread Grant Edwards
On 2010-10-16, Steven D'Aprano wrote: > On Fri, 15 Oct 2010 20:07:37 +, Grant Edwards wrote: > >> Nor I, which is why I was confused by the statement that in the "Unix >> world" a lot of programs misbehaved when presented with files whose >> names contained a null byte. > > That's not what I s

Re: EOF while scanning triple-quoted string literal

2010-10-16 Thread Steven D'Aprano
On Fri, 15 Oct 2010 20:07:37 +, Grant Edwards wrote: > Nor I, which is why I was confused by the statement that in the "Unix > world" a lot of programs misbehaved when presented with files whose > names contained a null byte. That's not what I said. I said, TRY to create a file with a null by

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Grant Edwards
On 2010-10-15, Martin Gregorie wrote: > On Fri, 15 Oct 2010 19:59:13 +, Grant Edwards wrote: > >> >> We're talking about Unix. >> We're not talking about CP/M, DOS, RSX-11m, Apple-SOS, etc. > > That's just your assumption. If you go back and look at my original posting in this thread, here's

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Martin Gregorie
On Fri, 15 Oct 2010 19:59:13 +, Grant Edwards wrote: > > We're talking about Unix. > We're not talking about CP/M, DOS, RSX-11m, Apple-SOS, etc. > That's just your assumption. Track back up the thread and you'll see that the OP didn't mention an OS. He merely said that he was using zlib, and

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Grant Edwards
On 2010-10-15, Chris Torek wrote: >>> On 2010-10-15, Grant Edwards wrote: How do you create a [Unix] file with a name that contains a NULL byte? > >>On 2010-10-15, Seebs wrote: >>> So far as I know, in canonical Unix, you don't -- the syscalls all work >>> with something like C strings unde

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Grant Edwards
On 2010-10-15, Seebs wrote: > On 2010-10-15, Grant Edwards wrote: >> Yes, all of the Unix syscalls use NULL-terminated path parameters >> (AKA "C strings"). What I don't know is whether the underlying >> filesystem code also uses NULL-terminated strings for filenames or if >> they have explicit

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Grant Edwards
On 2010-10-15, Martin Gregorie wrote: >> On 2010-10-15, Martin Gregorie wrote: >>> On Fri, 15 Oct 2010 17:02:07 +, Grant Edwards wrote: On 2010-10-15, Steven D'Aprano : > In the Unix world, which includes OS X, text tools tend to have > difficulty with tabs. Or try naming a

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Chris Torek
>> On 2010-10-15, Grant Edwards wrote: >>> How do you create a [Unix] file with a name that contains a NULL byte? >On 2010-10-15, Seebs wrote: >> So far as I know, in canonical Unix, you don't -- the syscalls all work >> with something like C strings under the hood, meaning that no matter what >

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Seebs
On 2010-10-15, Grant Edwards wrote: > Yes, all of the Unix syscalls use NULL-terminated path parameters (AKA > "C strings"). What I don't know is whether the underlying filesystem > code also uses NULL-terminated strings for filenames or if they have > explicit lengths. If the latter, there migh

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Martin Gregorie
On Fri, 15 Oct 2010 18:14:13 +, Grant Edwards wrote: > On 2010-10-15, Martin Gregorie wrote: >> On Fri, 15 Oct 2010 17:02:07 +, Grant Edwards wrote: >> >>> On 2010-10-15, Steven D'Aprano >>> wrote: >>> In the Unix world, which includes OS X, text tools tend to have difficulty

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Grant Edwards
On 2010-10-15, Seebs wrote: > On 2010-10-15, Grant Edwards wrote: >> On 2010-10-15, Steven D'Aprano wrote: >>> In the Unix world, which includes OS X, text tools tend to have >>> difficulty with tabs. Or try naming a file with a newline or carriage >>> return in the file name, or a NULL byte. >

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Seebs
On 2010-10-15, Grant Edwards wrote: > On 2010-10-15, Steven D'Aprano wrote: >> In the Unix world, which includes OS X, text tools tend to have >> difficulty with tabs. Or try naming a file with a newline or carriage >> return in the file name, or a NULL byte. > How do you create a file with a n

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Grant Edwards
On 2010-10-15, Martin Gregorie wrote: > On Fri, 15 Oct 2010 17:02:07 +, Grant Edwards wrote: > >> On 2010-10-15, Steven D'Aprano >> wrote: >> >>> In the Unix world, which includes OS X, text tools tend to have >>> difficulty with tabs. Or try naming a file with a newline or carriage >>> retu

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Martin Gregorie
On Fri, 15 Oct 2010 17:02:07 +, Grant Edwards wrote: > On 2010-10-15, Steven D'Aprano > wrote: > >> In the Unix world, which includes OS X, text tools tend to have >> difficulty with tabs. Or try naming a file with a newline or carriage >> return in the file name, or a NULL byte. > > How do

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Grant Edwards
On 2010-10-15, Steven D'Aprano wrote: > In the Unix world, which includes OS X, text tools tend to have > difficulty with tabs. Or try naming a file with a newline or carriage > return in the file name, or a NULL byte. How do you create a file with a name that contains a NULL byte? -- Grant E

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Ian
On Oct 14, 10:30 pm, Lawrence D'Oliveiro wrote: > In message , Rhodri James wrote: > > > ... frankly putting arbitrary binary into a literal string is rather > > asking for something like this to come and bite you. > > It normally works fine on sensible OSes. Which OSes would those be? It doesn'

Re: EOF while scanning triple-quoted string literal

2010-10-15 Thread Steven D'Aprano
On Fri, 15 Oct 2010 17:30:20 +1300, Lawrence D'Oliveiro wrote: > In message , Rhodri James wrote: > >> ... frankly putting arbitrary binary into a literal string is rather >> asking for something like this to come and bite you. > > It normally works fine on sensible OSes. What does it have to d

Re: EOF while scanning triple-quoted string literal

2010-10-14 Thread Lawrence D'Oliveiro
In message , Rhodri James wrote: > ... frankly putting arbitrary binary into a literal string is rather > asking for something like this to come and bite you. It normally works fine on sensible OSes. -- http://mail.python.org/mailman/listinfo/python-list

Re: EOF while scanning triple-quoted string literal

2010-10-11 Thread Ian Kelly
On Mon, Oct 11, 2010 at 3:59 PM, Rhodri James wrote: > On Mon, 11 Oct 2010 10:37:09 +0100, bussiere bussiere > wrote: > > > i've looked on the web and here but i didn't find an answer : here is my >> code >> >> zlib.decompress(""" >> xワᆳヤ=ラᄇHナs~Ʀᄑç\ムîà >> z...@ÑÁÔqÇlxÇÆïpp >> ~ýVãì゙M6ÛÐ|ê֭ᄁᄂヤ=)}

Re: EOF while scanning triple-quoted string literal

2010-10-11 Thread Rhodri James
On Mon, 11 Oct 2010 10:37:09 +0100, bussiere bussiere wrote: i've looked on the web and here but i didn't find an answer : here is my code zlib.decompress(""" xワᆳヤ=ラᄇHナs~Ʀᄑç\ムîà z...@ÑÁÔqÇlxÇÆïpp~ývãì゙m6ÛÐ|ê֭ᄁᄂヤ=)}éÓUe﬿ö3ᄎᄌú"}ʿïÿ÷1þ8ñ́U÷ᄏñíLÒVi:`ᄈᄎL!Ê҆p6-%Fë^ヘ÷à,Q.K!ユô`ÄA!ÑêweÌ ÊÚAロYøøÂjôóᅠÂcñ

EOF while scanning triple-quoted string literal

2010-10-11 Thread bussiere bussiere
i've looked on the web and here but i didn't find an answer : here is my code zlib.decompress(""" xワᆳヤ=ラᄇHナs~Ʀᄑç\ムîà z...@ÑÁÔqÇlxÇÆïpp~ývãì゙m6ÛÐ|ê֭ᄁᄂヤ=)}éÓUe﬿ö3ᄎᄌú"}ʿïÿ÷1þ8ñ́U÷ᄏñíLÒVi:`ᄈᄎL!Ê҆p6-%Fë^ヘ÷à,Q.K!ユô`ÄA!ÑêweÌ ÊÚAロYøøÂjôóᅠÂcñ䊧fᆴùテúN :nüzAÝ7%ᄌcdUタᄌ3ôPۂタlンyHᆲᄑ$/yzᄒíàヌ'ÕÓ&`|S!<'ᄂ÷Zļᄐ2ホモ;ニ(ÅÛf