On 07/03/2019 00:18, Ethan Furman wrote:
> On 03/06/2019 10:30 AM, duncan smith wrote:
>
>> I've been trying to figure out why one of my classes can be
>> pickled but not unpickled. (I realise the problem is probably with the
>> pickling, but I get the error when I attempt to unpickle.)
>>
>> A
On 06/03/2019 20:24, Peter Otten wrote:
> duncan smith wrote:
>
>> On 06/03/2019 16:14, duncan smith wrote:
>>> Hello,
>>> I've been trying to figure out why one of my classes can be
>>> pickled but not unpickled. (I realise the problem is probably with the
>>> pickling, but I get the error
On 03/06/2019 10:30 AM, duncan smith wrote:
I've been trying to figure out why one of my classes can be
pickled but not unpickled. (I realise the problem is probably with the
pickling, but I get the error when I attempt to unpickle.)
A relatively minimal example is pasted below.
--> import
duncan smith wrote:
> On 06/03/2019 16:14, duncan smith wrote:
>> Hello,
>> I've been trying to figure out why one of my classes can be
>> pickled but not unpickled. (I realise the problem is probably with the
>> pickling, but I get the error when I attempt to unpickle.)
>>
>> A relatively
On 06/03/2019 16:14, duncan smith wrote:
> Hello,
> I've been trying to figure out why one of my classes can be
> pickled but not unpickled. (I realise the problem is probably with the
> pickling, but I get the error when I attempt to unpickle.)
>
> A relatively minimal example is pasted
https://docs.python.org/3.7/library/pickle.html#pickling-class-instances
includes 2 notes, which I think are the relevant ones:
When a class instance is unpickled, its __init__() method is usually not
invoked. The default behaviour first creates an uninitialized instance and then
restores the
[snip]
Sorry, this is Python 3.6 on Linux.
Duncan
--
https://mail.python.org/mailman/listinfo/python-list
Ho Yeung Lee wrote:
> before cloususerlogin
> Unexpected error:
> after map pool
>
>
> ...
> passwordlist = pickle.load( open( str(currentworkingdirectory) +
> "\\decryptedsecret.p", "rb" ) )
According to
https://docs.python.org/dev/library/multiprocessing.html#programming-guidelines
you
On Tue, 22 Nov 2016 10:27 am, Fillmore wrote:
>
> Hi there, Python newbie here.
>
> I am working with large files. For this reason I figured that I would
> capture the large input into a list and serialize it with pickle for
> later (faster) usage.
> Everything has worked beautifully until
On Tue, 22 Nov 2016 11:40 am, Peter Otten wrote:
> Fillmore wrote:
>
>> Hi there, Python newbie here.
>>
>> I am working with large files. For this reason I figured that I would
>> capture the large input into a list and serialize it with pickle for
>> later (faster) usage.
>
> But is it
On Mon, Nov 21, 2016 at 3:43 PM, John Gordon wrote:
> In Fillmore
> writes:
>
>
>> Question for experts: is there a way to refactor this so that data may
>> be filled/written/released as the scripts go and avoid
Fillmore wrote:
> Hi there, Python newbie here.
>
> I am working with large files. For this reason I figured that I would
> capture the large input into a list and serialize it with pickle for
> later (faster) usage.
But is it really faster? If the pickle is, let's say, twice as large as the
In Fillmore
writes:
> Question for experts: is there a way to refactor this so that data may
> be filled/written/released as the scripts go and avoid the problem?
> code below.
That depends on how the data will be read. Here is
Ben Finney wrote:
> "Veek. M" writes:
>
>> class Foo(object):
>> pass
>>
>> object is a keyword and you're using it as an identifier
>
> Python does not have ‘object’ as a keyword. ‘and’ is a keyword.
>
> Here's the difference::
>
> >>> object
>
> >>>
Rustom Mody wrote:
> On Saturday, July 2, 2016 at 9:17:01 AM UTC+5:30, Veek. M wrote:
>> object is a keyword and you're using it as an identifier
>
> keyword and builtin are different
> In this case though the advice remains the same
> In general maybe not...
> Just sayin'
np - feel free to
"Veek. M" writes:
> class Foo(object):
> pass
>
> object is a keyword and you're using it as an identifier
Python does not have ‘object’ as a keyword. ‘and’ is a keyword.
Here's the difference::
>>> object
>>> object = "Lorem ipsum"
>>> object
On Saturday, July 2, 2016 at 9:17:01 AM UTC+5:30, Veek. M wrote:
> object is a keyword and you're using it as an identifier
keyword and builtin are different
In this case though the advice remains the same
In general maybe not...
Just sayin'
--
Nicky Mac wrote:
> Dear Python team,
> I have studied the excellent documentation, and attempted to make use
> of pickle thus:
>
> filename = 'my_saved_adventure'
> import pickle
> class object:
> def __init__(self,i,.t) :
> self.id = i
> .
>
> class
On 3/12/2016 10:45 AM, Nicky Mac wrote:
class object:
def __init__(self,i,
This is a syntax error, so this is not the code that ran without error.
As Peter Otten said, please write a minimal complete runnable example
that shows the error and then copy and paste it as run.
--
Terry
Nicky Mac wrote:
> Dear Python team,
> I have studied the excellent documentation,
That is always a laudable endeavour ;)
> and attempted to make use of
> pickle thus:
>
> filename = 'my_saved_adventure'
> import pickle
> class object:
'object' already is the name for a Python built-in; you
On 6 November 2015 at 12:53, Virgil Stokes wrote:
> Here is snippet of Python (vers. 2.7.10) code that bothers me.
>
> [snip bad code]
>
> 1) Which (the pickle or shelve code) takes less total RAM, if dogs and cats
> were very large?
> 2) When the last shelve.open is given, is
Virgil Stokes wrote:
> Here is snippet of Python (vers. 2.7.10) code that bothers me.
>
> import cPickle as pickle
>
> print "Pickle lists:"
> dogs = ['Rover','King','Spot','Rufus']
> cats = ['Mimi','Misty','Sasha']
>
> with open('pickle.dat', 'wb') as pfile:
> pickle.dump(dogs, pfile)
>
On Friday, 1 May 2015 13:09:48 UTC+1, Chris Angelico wrote:
Cool! That's part way. So, can you simply stuff OMDBMap into
sys.modules prior to loading? It might be a bit of a hack, but it
should work for testing, at least. Conversely, you could change the
dump script to import via the name
On Friday, 1 May 2015 13:34:41 UTC+1, Peter Otten wrote:
Ben Sizer wrote:
So... I don't know how to fix this, but I do now know why it fails, and I
have a satisfactory answer for why it is acting differently on the Linux
server (and that is just because that is the only one running under
On Thursday, 30 April 2015 01:45:05 UTC+1, Chris Angelico wrote:
On Thu, Apr 30, 2015 at 2:01 AM, Ben Sizer wrote:
1) There clearly is a module named OMDBMap, and it's importable - it's
there in the 2nd line of the traceback.
Does anybody have any suggestions on how I can go about
Ben Sizer wrote:
On Thursday, 30 April 2015 01:45:05 UTC+1, Chris Angelico wrote:
On Thu, Apr 30, 2015 at 2:01 AM, Ben Sizer wrote:
1) There clearly is a module named OMDBMap, and it's importable - it's
there in the 2nd line of the traceback.
Does anybody have any suggestions on how I
On Fri, May 1, 2015 at 9:01 PM, Ben Sizer kylo...@gmail.com wrote:
Another good question, and this gives us the answer. The module lists are
quite different, as I'd expect because the load happens in the context of the
full application whereas the dump happens as a standalone script. But
On Thu, Apr 30, 2015 at 2:01 AM, Ben Sizer kylo...@gmail.com wrote:
1) There clearly is a module named OMDBMap, and it's importable - it's there
in the 2nd line of the traceback.
Does anybody have any suggestions on how I can go about debugging this? Or
refactoring it to avoid whatever is
On 22-9-2014 20:28, Chris Angelico wrote:
On Tue, Sep 23, 2014 at 4:23 AM, Irmen de Jong irmen.nos...@xs4all.nl wrote:
This is why Pyro has been using a different (and safe) serializer by default
for a while
now. You have to plow through the usual security warnings in the docs and
make a
On Tue, Sep 23, 2014 at 3:47 AM, Irmen de Jong irmen.nos...@xs4all.nl wrote:
I've developed Pyrolite (https://github.com/irmen/Pyrolite), a lightweight
client
library for Java and .NET to gain access to Python servers running Pyro. As
such it also
contains a complete pickle and unpickle
On 22-9-2014 19:53, Chris Angelico wrote:
On Tue, Sep 23, 2014 at 3:47 AM, Irmen de Jong irmen.nos...@xs4all.nl wrote:
I've developed Pyrolite (https://github.com/irmen/Pyrolite), a lightweight
client
library for Java and .NET to gain access to Python servers running Pyro. As
such it also
On Tue, Sep 23, 2014 at 4:23 AM, Irmen de Jong irmen.nos...@xs4all.nl wrote:
This is why Pyro has been using a different (and safe) serializer by default
for a while
now. You have to plow through the usual security warnings in the docs and
make a
conscious effort in your code to enable the
peace abhishek1...@gmail.com writes:
On Thursday, March 20, 2014 1:20:03 AM UTC-7, dieter wrote:
...
You may want to use debugging to determine what goes on in detail.
...
I tried doing that. I still could not figure out what was wrong. Thank you.
Debugging is often not easy. An essential
Peace abhishek1...@gmail.com writes:
...
The serial number field always remains empty even though I enter from the GUI
and the receiveSerialNumber function is called and I explicitly initialize it
to the variable in the model.
I'm trying to save the state of the program so that next time I
On Thursday, March 20, 2014 1:20:03 AM UTC-7, dieter wrote:
Peace writes:
...
The serial number field always remains empty even though I enter from the
GUI and the receiveSerialNumber function is called and I explicitly
initialize it to the variable in the model.
I'm trying to
f.seek(0) really does the trick.
Danke sehr,
Phu
On Tue, Jun 25, 2013 at 6:47 AM, Peter Otten __pete...@web.de wrote:
Phu Sam wrote:
I have a method that opens a file, lock it, pickle.load the file into a
dictionary.
I then modify the status of a record, then pickle.dump the
Phu Sam wrote:
I have a method that opens a file, lock it, pickle.load the file into a
dictionary.
I then modify the status of a record, then pickle.dump the dictionary back
to the file.
The problem is that the pickle.dump never works. The file never gets
updated.
def
On Tue, Feb 28, 2012 at 12:51 PM, Smiley 4321 ssmil...@gmail.com wrote:
Can I have some thoughts about - building a GUI to display the results of
the pickle read?
A prototype code should be fine on Linux.
It doesn't seem like it would be all that useful, though I may just be
lacking in
On Tue, Feb 28, 2012 at 12:51 PM, Smiley 4321ssmil...@gmail.com wrote:
Can I have some thoughts about - building a GUI to display the results of
the pickle read?
A prototype code should be fine on Linux.
What on earth is this post asking?
Do you want code? Opinions?
--
On Feb 28, 12:13 pm, Jerry Hill malaclyp...@gmail.com wrote:
On Tue, Feb 28, 2012 at 12:51 PM, Smiley 4321 ssmil...@gmail.com wrote:
Can I have some thoughts about - building a GUI to display the results of
the pickle read?
Sure. But first can you show us some code that reads a pickled file
pradeepbpin wrote:
I am encountering 'Value Error: insecure string pickle' when trying to
execute the script on Ubuntu. The same script and the pickled file
works without any problem in Windows. For working in Ubuntu I just
copied both the script file and pickled file from Windows.
How
On Mon, 28 Mar 2011 08:53:35 -0700, pradeepbpin wrote:
I am encountering 'Value Error: insecure string pickle' when trying to
execute the script on Ubuntu. The same script and the pickled file works
without any problem in Windows. For working in Ubuntu I just copied both
the script file and
For new data: an alternative is to open the file in binary mode for both
reading and writing on all platforms. This will also allow you to switch to
the more efficient binary pickle protocols.
Writing and reading the pickled file in binary mode seems to be
working. Thank you.
--
Em 02-06-2010 04:48, Paulo da Silva escreveu:
Hi!
I have a big data structure cpickled into a datafile, by python2.
I tried to unpickle it using python3 but got the followin message:
File /usr/lib64/python3.1/pickle.py, line 1372, in loads
encoding=encoding, errors=errors).load()
Briefly:
s = cPickle.dumps(obj)
z = zipfile.Zipfile(filename.zip,w,zipfile.ZIP_DEFLATED)
z.writestr(arcname.pkl,s)
Thank you very much. I have not been aware that pickle can also do the
job without a file!
Here's the complete scenario for writing and reading the data...
APPENDIX:
import
Terry terry.yin...@gmail.com wrote:
I'm trying to implement something like:
remote_map(fun, list)
to execute the function on a remove machine. But the problem is I
cannot pickle a lambda function and send it to the remote machine.
Is there any possible way to pickle (or other method)
On Aug 11, 3:42 pm, Duncan Booth duncan.bo...@invalid.invalid wrote:
Terry terry.yin...@gmail.com wrote:
I'm trying to implement something like:
remote_map(fun, list)
to execute the function on a remove machine. But the problem is I
cannot pickle a lambda function and send it to the
Hello
I've never run into a discussion on pickle vs marshal, but clearly if
the point is to exchange data between different clients, or to store it,
pickle is the preferred solution, as masrhal is really too low level and
its format too unstable.
Indeed, the problem of pickle is that at the
Lawson English lengli...@cox.net writes:
I read somewhere that Marshalling is version-dependent while pickling
is not, but can't find that reference.
It is in the python library docs for the marshal module.
--
http://mail.python.org/mailman/listinfo/python-list
Lawson English lenglish5 at cox.net writes:
Marshalling is only briefly mentioned in most python books I have, and
pickling is declared teh preferred method for serialization.
I read somewhere that Marshalling is version-dependent while pickling is
not, but can't find that reference.
Lawson English wrote:
Marshalling is only briefly mentioned in most python books I have, and
pickling is declared teh preferred method for serialization.
I read somewhere that Marshalling is version-dependent while pickling is
not, but can't find that reference. OTOH, pickling can lead to
Lawson English wrote:
Marshalling is only briefly mentioned in most python books I have, and
pickling is declared teh preferred method for serialization.
I read somewhere that Marshalling is version-dependent while pickling
is not, but can't find that reference. OTOH, pickling can lead to
Thanks for your patience waiting for me to isolate the problem.
| Package
--__init__.py -empty
--Package.py -empty
--Module.py
import cPickle
class C(object):
pass
def fail():
return cPickle.dumps(C(), -1)
import Package.Module
Package.Module.fail()
The failure
On Jan 8, 12:27 pm, Zac Burns zac...@gmail.com wrote:
Thanks for your patience waiting for me to isolate the problem.
| Package
--__init__.py -empty
--Package.py -empty
--Module.py
import cPickle
class C(object):
pass
def fail():
return cPickle.dumps(C(),
Correct, 2.6.1 does not complain.
If only I could upgrade! The workaround is obvious and I'll do that.
Thanks for your help.
--
Zachary Burns
(407)590-4814
Aim - Zac256FL
Production Engineer (Digital Overlord)
Zindagi Games
On Thu, Jan 8, 2009 at 11:34 AM, Carl Banks pavlovevide...@gmail.com
En Mon, 05 Jan 2009 23:04:30 -0200, Zac Burns zac...@gmail.com escribió:
I have a module that attempts to pickle classes defined in that module.
I get an error of the form:
PicklingError: Can't pickle class 'Module.SubModule.Class': import
of module Module.SubModule failed
when using cPickle
On Oct 2, 1:51 pm, James Mills [EMAIL PROTECTED] wrote:
On Thu, Oct 2, 2008 at 3:34 PM, est [EMAIL PROTECTED] wrote:
wow. It's giga-size file. I need stream reading it, md5 it. It may
break for a while.
So use generators and consume the stream ?
--JamesMills
--
--
-- Problems are
On Oct 2, 2:44 am, est [EMAIL PROTECTED] wrote:
On Oct 2, 1:51 pm, James Mills [EMAIL PROTECTED] wrote:
On Thu, Oct 2, 2008 at 3:34 PM, est [EMAIL PROTECTED] wrote:
wow. It's giga-size file. I need stream reading it, md5 it. It may
break for a while.
So use generators and consume the
On Oct 2, 4:22 pm, Aaron \Castironpi\ Brady [EMAIL PROTECTED]
wrote:
On Oct 2, 2:44 am, est [EMAIL PROTECTED] wrote:
On Oct 2, 1:51 pm, James Mills [EMAIL PROTECTED] wrote:
On Thu, Oct 2, 2008 at 3:34 PM, est [EMAIL PROTECTED] wrote:
wow. It's giga-size file. I need stream reading
En Wed, 01 Oct 2008 16:50:05 -0300, est [EMAIL PROTECTED] escribió:
import md5
a=md5.md5()
import pickle
pickle.dumps(a)
Traceback (most recent call last):
File stdin, line 1, in module
File C:\Python25\lib\pickle.py, line 1366, in dumps
Pickler(file, protocol).dump(obj)
File
On Oct 2, 4:03 am, est [EMAIL PROTECTED] wrote:
On Oct 2, 4:22 pm, Aaron \Castironpi\ Brady [EMAIL PROTECTED]
wrote:
On Oct 2, 2:44 am, est [EMAIL PROTECTED] wrote:
On Oct 2, 1:51 pm, James Mills [EMAIL PROTECTED] wrote:
On Thu, Oct 2, 2008 at 3:34 PM, est [EMAIL PROTECTED] wrote:
On Oct 2, 5:07 pm, Gabriel Genellina [EMAIL PROTECTED] wrote:
En Wed, 01 Oct 2008 16:50:05 -0300, est [EMAIL PROTECTED] escribió:
import md5
a=md5.md5()
import pickle
pickle.dumps(a)
Traceback (most recent call last):
File stdin, line 1, in module
File
On Oct 1, 3:50 pm, est [EMAIL PROTECTED] wrote:
import md5
a=md5.md5()
import pickle
pickle.dumps(a)
Traceback (most recent call last):
File stdin, line 1, in module
File C:\Python25\lib\pickle.py, line 1366, in dumps
Pickler(file, protocol).dump(obj)
File
On Oct 1, 2:50 pm, est [EMAIL PROTECTED] wrote:
import md5
a=md5.md5()
import pickle
pickle.dumps(a)
Traceback (most recent call last):
File stdin, line 1, in module
File C:\Python25\lib\pickle.py, line 1366, in dumps
Pickler(file, protocol).dump(obj)
File
On Oct 2, 11:27 am, Aaron \Castironpi\ Brady
[EMAIL PROTECTED] wrote:
On Oct 1, 2:50 pm, est [EMAIL PROTECTED] wrote:
import md5
a=md5.md5()
import pickle
pickle.dumps(a)
Traceback (most recent call last):
File stdin, line 1, in module
File C:\Python25\lib\pickle.py,
On Thu, Oct 2, 2008 at 3:34 PM, est [EMAIL PROTECTED] wrote:
wow. It's giga-size file. I need stream reading it, md5 it. It may
break for a while.
So use generators and consume the stream ?
--JamesMills
--
--
-- Problems are solved by method
--
James Mills wrote:
On Thu, Oct 2, 2008 at 3:34 PM, est [EMAIL PROTECTED] wrote:
wow. It's giga-size file. I need stream reading it, md5 it. It may
break for a while.
So use generators and consume the stream ?
--JamesMills
it's not the stream's problem. it the md5 module.
--
srinivasan srinivas wrote:
Please don't top-post.
Could you please explain the code breifly?? I am not getting what it does.
import copy_reg
import new
def make_instancemethod(inst, methodname):
return getattr(inst, methodname)
def pickle_instancemethod(method):
return
From: Peter Otten [EMAIL PROTECTED]
To: python-list@python.org
Sent: Thursday, 3 July, 2008 12:13:45 PM
Subject: Re: How to pickle bound methods
srinivasan srinivas wrote:
Please don't top-post.
Could you please explain the code breifly?? I am not getting what it does.
import copy_reg
import
srinivasan srinivas wrote:
Please don't top-post.
No. It does not work.
That's what I said. Try
class A(object):
@staticmethod
def alpha():
print Hello
alpha = A.alpha
Peter
--
http://mail.python.org/mailman/listinfo/python-list
srinivasan srinivas wrote:
I would like to know how to pickle a bound method??
$ cat pickle_method.py
import copy_reg
import new
def make_instancemethod(inst, methodname):
return getattr(inst, methodname)
def pickle_instancemethod(method):
return make_instancemethod, (method.im_self,
Subject: Re: How to pickle bound methods
srinivasan srinivas wrote:
I would like to know how to pickle a bound method??
$ cat pickle_method.py
import copy_reg
import new
def make_instancemethod(inst, methodname):
return getattr(inst, methodname)
def pickle_instancemethod(method
srinivasan srinivas wrote:
(Please don't top-post)
It works will for instance and class methods. But it doesn't work for
static methods. Can you tel me how to pickle static methods as well??
For static methods pickling is not so easy because these don't carry
information about the class they
July, 2008 5:15:41 PM
Subject: Re: How to pickle bound methods
srinivasan srinivas wrote:
(Please don't top-post)
It works will for instance and class methods. But it doesn't work for
static methods. Can you tel me how to pickle static methods as well??
For static methods pickling is not so easy
On Jul 2, 8:26 am, srinivasan srinivas [EMAIL PROTECTED]
wrote:
I am writing client-server program. The server will send a methodname and its
arguments to a client. The client has to execute the method and return back
the results.
Are you aware of Pyro [1] ? Btw, you use the terminology
Peter,
Could you please explain the code breifly?? I am not getting what it does.
Thanks,
Srini
- Original Message
From: Peter Otten [EMAIL PROTECTED]
To: python-list@python.org
Sent: Wednesday, 2 July, 2008 12:53:19 PM
Subject: Re: How to pickle bound methods
srinivasan srinivas
christof wrote:
I am using pickle/unpickle to let my program save its documents to
disk. While this it worked stable for a long time, one of my users now
complained, that he had a file which can't be loaded.
The traceback is:
File pickle.pyo, line 1374, in loads
File pickle.pyo,
On 23 Mai, 10:48, Peter Otten [EMAIL PROTECTED] wrote:
christof wrote:
I am using pickle/unpickle to let my program save its documents to
disk. While this it worked stable for a long time, one of my users now
complained, that he had a file which can't be loaded.
The traceback is:
Gabriel Genellina [EMAIL PROTECTED] writes:
A shelve is just a persistent dictionary that uses pickle to store
the objects. If you want to store one or a few objects, using
pickle directly may be easier. Any problem you may have with pickle
(nonpickleable objects, security risks) will
En Sun, 18 May 2008 00:14:19 -0300, Guillaume Bog [EMAIL PROTECTED] escribió:
I read and re-read Python in a Nutshell written by Alex Martelli,
who knows what he is talking about. I'm a bit new to python and I'm
going to start doing persistence side on a project. Martelli's book
seems to tell
On Mar 12, 11:22 am, [EMAIL PROTECTED] wrote:
Unpickling an infinite float caused a ValueError in the pickle module.
I need to pickle and load infinite floats in my project. Do you have
any suggestions how to solve the issue?
Have you tried this on the recent 2.6 alpha (Python2.6a1)? It's
[EMAIL PROTECTED] wrote:
Unpickling an infinite float caused a ValueError in the pickle module.
I need to pickle and load infinite floats in my project. Do you have
any suggestions how to solve the issue?
You could try another protocol. Does
inf = 1e1000
pickle.loads(pickle.dumps(inf,
On Nov 1, 11:42 pm, Paul Rubin http://[EMAIL PROTECTED] wrote:
Aaron Watters [EMAIL PROTECTED] writes:
marshal.loads('RKp,U\xf7`\xef\xe77\xc1\xea\xd8\xec\xbe\\')
Segmentation fault
...
I'll grant you the above as a denial of service attack. ...
Can you give me an example
where
On Nov 1, 10:12 am, Aaron Watters [EMAIL PROTECTED] wrote:
On Oct 31, 6:10 pm, Raymond Hettinger [EMAIL PROTECTED] wrote:
Alright already. Here is the patched file you want
http://nucular.sourceforge.net/kisstree_pickle.py
This file has been removed. After consideration,
I don't want to
On Nov 1, 12:04 am, Paul Rubin http://[EMAIL PROTECTED] wrote:
Raymond Hettinger [EMAIL PROTECTED] writes:
''' This is not a general persistence module. For general
persistence and transfer of Python objects through RPC calls, see
the modules :mod:`pickle` and :mod:`shelve`.
That advice
On Oct 31, 6:10 pm, Raymond Hettinger [EMAIL PROTECTED] wrote:
On Oct 31, 12:27 pm, Aaron Watters [EMAIL PROTECTED] wrote:
Makes more sense to use cPickle and be done with it.
FWIW, I've updated the docs to be absolutely clear on the subject:
'''
This is not a general persistence module.
On Nov 1, 4:45 am, Aaron Watters [EMAIL PROTECTED] wrote:
Marshal is more secure than pickle
More or less make little sense in a security context which
typically is an all or nothing affair. Neither module is designed for
security. From the docs for marshal:
'''
Warning: The marshal module is
On Nov 1, 2:15 pm, Raymond Hettinger [EMAIL PROTECTED] wrote:
On Nov 1, 4:45 am, Aaron Watters [EMAIL PROTECTED] wrote:
Marshal is more secure than pickle
More or less make little sense in a security context which
typically is an all or nothing affair. Neither module is designed for
On Thu, 01 Nov 2007 20:35:15 -, Aaron Watters [EMAIL PROTECTED] wrote:
On Nov 1, 2:15 pm, Raymond Hettinger [EMAIL PROTECTED] wrote:
On Nov 1, 4:45 am, Aaron Watters [EMAIL PROTECTED] wrote:
Marshal is more secure than pickle
More or less make little sense in a security context which
On Nov 1, 4:59 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote:
On Thu, 01 Nov 2007 20:35:15 -, Aaron Watters [EMAIL PROTECTED] wrote:
On Nov 1, 2:15 pm, Raymond Hettinger [EMAIL PROTECTED] wrote:
On Nov 1, 4:45 am, Aaron Watters [EMAIL PROTECTED] wrote:
Marshal is more secure than
On Thu, 01 Nov 2007 21:15:06 -, Aaron Watters [EMAIL PROTECTED] wrote:
On Nov 1, 4:59 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote:
On Thu, 01 Nov 2007 20:35:15 -, Aaron Watters [EMAIL PROTECTED] wrote:
On Nov 1, 2:15 pm, Raymond Hettinger [EMAIL PROTECTED] wrote:
On Nov 1, 4:45 am,
Aaron Watters [EMAIL PROTECTED] writes:
marshal.loads('RKp,U\xf7`\xef\xe77\xc1\xea\xd8\xec\xbe\\')
Segmentation fault
...
I'll grant you the above as a denial of service attack. ...
Can you give me an example
where someone can erase the filesystem using marshal.load?
You should
Evan Klitzke wrote:
Can anyone elaborate more on the difference between marshal and
pickle. In what conditions would using marshal be unsafe? If one
can guarantee that the marshalled objects would be created and
read by the same version of Python, is that enough?
Just use pickle. From the
On Oct 31, 3:31 am, Evan Klitzke [EMAIL PROTECTED] wrote:
Can anyone elaborate more on the difference between marshal and
pickle. In what conditions would using marshal be unsafe? If one can
guarantee that the marshalled objects would be created and read by the
same version of Python, is that
On Oct 31, 6:45 am, Aaron Watters [EMAIL PROTECTED] wrote:
I like to use
marshal a lot because it's the absolutely fastest
way to store and load data to/from Python. Furthermore
because marshal is stupid the programmer has complete
control. A lot of the overhead you get with the
pickles
On Oct 31, 1:37 pm, Raymond Hettinger [EMAIL PROTECTED] wrote:
On Oct 31, 6:45 am, Aaron Watters [EMAIL PROTECTED] wrote:
I like to use
marshal a lot because it's the absolutely fastest
way to store and load data to/from Python
I believe this FUD is somewhat out-of-date.
On Oct 31, 12:27 pm, Aaron Watters [EMAIL PROTECTED] wrote:
Anyway since it's easy and makes sense I think
the next version of nucular will have a
switchable option between marshal and cPickle
for persistant storage.
Makes more sense to use cPickle and be done with it.
FWIW, I've updated the
En Wed, 31 Oct 2007 19:10:48 -0300, Raymond Hettinger [EMAIL PROTECTED]
escribió:
FWIW, I've updated the docs to be absolutely clear on the subject:
As you are into it, the list of supported types should be updated too:
The following types are supported: ``None``, integers,
long
integers,
Raymond Hettinger [EMAIL PROTECTED] writes:
''' This is not a general persistence module. For general
persistence and transfer of Python objects through RPC calls, see
the modules :mod:`pickle` and :mod:`shelve`.
That advice should be removed since Python currently does not have a
general
K Gaur [EMAIL PROTECTED] wrote:
this is what the python interpreter returns on giving the basic
command
pickle.dump(x,f) where x is a tuple and f is a file object
Traceback (most recent call last):
File stdin, line 1, in ?
NameError: name 'pickle' is not defined
kindly
1 - 100 of 143 matches
Mail list logo