Alan Isaac <[EMAIL PROTECTED]> writes:
> Hrvoje Niksic wrote:
>> The first upload breaks the file. You uploaded it in (presumably
>> FTP's) text mode, which changes \n -> \r\n. But you download it using
>> http, which specifies no such conversion in the opposite direction.
>
> No: I used binary
On Wed, 10 Oct 2007 15:21:06 +, Alan Isaac wrote:
> Marc 'BlackJack' Rintsch wrote:
>> Pickles are *binary* files, not text files
>
> Actually not:
> http://docs.python.org/lib/node316.html
>
> These were created with protocol 0.
Actually yes, the docs are wrong. It's a binary file with by
Hrvoje Niksic wrote:
> The first upload breaks the file. You uploaded it in (presumably
> FTP's) text mode, which changes \n -> \r\n. But you download it using
> http, which specifies no such conversion in the opposite direction.
No: I used binary upload both time.
(Unless my ftp client is broke
Alan Isaac <[EMAIL PROTECTED]> writes:
> I upload to a server.
> I try to unpickle from the URL. No luck. Try it:
> x1, x2 =
> pickle.load(urllib.urlopen('http://www.american.edu/econ/notes/hw/example1'))
>
> I change the filetype to unix. I upload again.
> I try to unpickle from the URL. Now
Jean-Paul Calderone wrote:
> You shouldn't unpickle things you get from the network, since pickle can
> execute arbitrary code: http://jcalderone.livejournal.com/15864.html
Yes, but I have my reasons.
(This is not library code: I just want students
to all be using the same objects for an exercise
Marc 'BlackJack' Rintsch wrote:
> Pickles are *binary* files, not text files
Actually not:
http://docs.python.org/lib/node316.html
These were created with protocol 0.
But my question is about the different outcomes
I observed.
Thank you,
Alan Isaac
--
http://mail.python.org/mailman/listinfo/py
On Wed, 10 Oct 2007 05:58:51 GMT, Alan Isaac <[EMAIL PROTECTED]> wrote:
>I am on a Windows box.
>
>I pickle a tuple of 2 simple objects with the pickle module.
>It pickles fine. It unpickles fine.
>
>I upload to a server.
>I try to unpickle from the URL. No luck. Try it:
>x1, x2 =
>pickle.load(
On Wed, 10 Oct 2007 05:58:51 +, Alan Isaac wrote:
> I am on a Windows box.
>
> I pickle a tuple of 2 simple objects with the pickle module.
> It pickles fine. It unpickles fine.
>
> I upload to a server.
> I try to unpickle from the URL. No luck. Try it:
> x1, x2 =
> pickle.load(urllib.u
I am on a Windows box.
I pickle a tuple of 2 simple objects with the pickle module.
It pickles fine. It unpickles fine.
I upload to a server.
I try to unpickle from the URL. No luck. Try it:
x1, x2 =
pickle.load(urllib.urlopen('http://www.american.edu/econ/notes/hw/example1'))
I change the f