Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Ortiz <rafael@activitycentral.com>2011-06-20 20:02:13 (GMT)
committer Rafael Ortiz <rafael@activitycentral.com>2011-06-20 20:02:13 (GMT)
commitcd00af6a98e91d623a44c81af824082f8d14d95b (patch)
tree26257ebfc62fca4be47801f8eaccde166a0b84e3
parent9190b26da1387b9e1d9cbb66a1fc1d2addfe115f (diff)
pep8 fixes
-rw-r--r--document.py9
-rw-r--r--ground.py5
2 files changed, 11 insertions, 3 deletions
diff --git a/document.py b/document.py
index 99f1a04..a7d9e91 100644
--- a/document.py
+++ b/document.py
@@ -37,17 +37,19 @@ class Document:
for i in range(theme.TAPE_COUNT):
tape.append(EmptyFrame())
+
def clean(index):
from char import Frame
Document.tape[index] = EmptyFrame()
+
def save(filepath):
tar = Tarball(filepath, 'w')
- cfg = { 'ground': {},
- 'sound' : {},
+ cfg = {'ground': {},
+ 'sound': {},
'frames': {},
- 'tape' : [] }
+ 'tape': []}
def _save(node, arcname, value):
if value.custom():
@@ -79,6 +81,7 @@ def save(filepath):
tar.write('MANIFEST', json.dumps(cfg))
tar.close()
+
def load(filepath):
try:
tar = Tarball(filepath)
diff --git a/ground.py b/ground.py
index 25139fe..f1cd069 100644
--- a/ground.py
+++ b/ground.py
@@ -28,6 +28,7 @@ def load():
if Document.ground and Document.ground.custom():
THEMES.append(Document.ground)
+
class Ground:
def __init__(self, name, id):
self.name = name
@@ -51,6 +52,7 @@ class Ground:
def select(self):
return self
+
class PreinstalledGround(Ground):
def __init__(self, name, filename):
Ground.__init__(self, name, filename)
@@ -59,6 +61,7 @@ class PreinstalledGround(Ground):
def custom(self):
return False
+
class CustomGround(Ground):
def __init__(self, name, filename):
Ground.__init__(self, name, None)
@@ -71,11 +74,13 @@ class CustomGround(Ground):
except:
return None
+
class RestoredGround(Ground):
def __init__(self, name, id, data):
Ground.__init__(self, name, id)
self._orig = pixbuf.from_str(data)
+
class JournalGround(Ground):
def __init__(self, jobject):
Ground.__init__(self, jobject.metadata['title'], jobject.object_id)