Project saving and opening.

This commit is contained in:
Juan Pablo Caram
2014-01-31 20:50:54 -05:00
parent deac0a7ef6
commit 8bcaa65529
10 changed files with 428 additions and 55 deletions

View File

@@ -124,9 +124,7 @@ class Geometry:
def to_dict(self):
"""
Returns a respresentation of the object as a dictionary.
``self.solid_geometry`` has been converted using the ``to_dict``
function. Attributes to include are listed in
``self.ser_attrs``.
Attributes to include are listed in ``self.ser_attrs``.
:return: A dictionary-encoded copy of the object.
:rtype: dict
@@ -137,7 +135,12 @@ class Geometry:
return d
def from_dict(self, d):
return
"""
Sets object's attributes from a dictionary.
Attributes to include are listed in ``self.ser_attrs``.
"""
for attr in self.ser_attrs:
setattr(self, attr, d[attr])
class Gerber (Geometry):