pickle

delphiro delphiro at zonnet.nl
Sun Jun 8 07:48:51 EDT 2003


Hi there,

I just tried to start my application on my new linux os (after a severe NVidia install crash :-| ) and everything went fine until I tried to read in a 'pickled' object. The error stated that I was trying to access a 'non-object'.

Does this have anything to do with the change of platform? (Until now I mainly used WinNT)

[mycode]
#part of 'geometry' class
def WriteToFile( self, filename ):
	try:
		f = open( filename, 'w' )
		pickle.dump( self, f )
	except:
		#TODO: implement
		pass

#global function
def CreateGeometryFromFile( filename ):
	try:
		f = open( filename, 'r' )
		return pickle.load(f)
	except:
		pass
[/mycode]

Regards,
Rob

[complete code]
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/pyciv/pyciv/unstable/geometry.py?rev=1.1.1.1&content-type=text/vnd.viewcvs-markup





More information about the Python-list mailing list