50 |
slicer = SingleSlicer("foo") |
slicer = SingleSlicer("foo") |
51 |
|
|
52 |
usingNormalBindings = 0 |
usingNormalBindings = 0 |
53 |
|
ownUse = 0 |
54 |
|
|
55 |
PPDIR=os.getcwd()+'/gzz/modules/pp/example/' |
if ownUse: |
56 |
|
PPDIR=os.getcwd()+'/pp/' |
57 |
|
FILE=File |
58 |
|
else: |
59 |
|
PPDIR=os.getcwd()+'/gzz/modules/pp/example/' |
60 |
|
|
61 |
def clean_data(args=''): |
def clean_data(args=''): |
62 |
os.system('rm '+PPDIR+'b_*') |
os.system('rm '+PPDIR+'b_*') |
63 |
os.system('rm '+PPDIR+'d*') |
os.system('rm '+PPDIR+'d*') |
83 |
clean_data('full') |
clean_data('full') |
84 |
os.system('mv '+ PPDIR +'ps_FOO '+ PPDIR+'ps_foo') |
os.system('mv '+ PPDIR +'ps_FOO '+ PPDIR+'ps_foo') |
85 |
|
|
86 |
|
print os.getcwd()+PPDIR |
87 |
|
|
88 |
# Next, the mediaserver we'll save to. |
# Next, the mediaserver we'll save to. |
89 |
self.ms = gzz.mediaserver.SimpleMediaserver( |
self.ms = gzz.mediaserver.SimpleMediaserver( |
90 |
gzz.mediaserver.storage.DirStorer(File(os.getcwd()+'/gzz/modules/pp/example/'))) |
gzz.mediaserver.storage.DirStorer(File(PPDIR))) |
91 |
|
|
92 |
# We need to get a "filer" for storing versions of our space. |
# We need to get a "filer" for storing versions of our space. |
93 |
# Accept this part as 'magic' for now... |
# Accept this part as 'magic' for now... |
295 |
self.ppactions.insertText(c.getId(), offs, '\n') |
self.ppactions.insertText(c.getId(), offs, '\n') |
296 |
self.avc.setCursorOffset(offs+1) |
self.avc.setCursorOffset(offs+1) |
297 |
if key == "Backspace": |
if key == "Backspace": |
298 |
if offs != 0: |
if offs > 0: |
299 |
self.ppactions.deleteText(c.getId(), offs-1, offs) |
self.ppactions.deleteText(c.getId(), offs-1, offs) |
300 |
self.avc.setCursorOffset(offs-1) |
self.avc.setCursorOffset(offs-1) |
301 |
|
|
302 |
if c.t() == None or c.t() == '': |
if c.t() == None or c.t() == '': |
303 |
d = self.ppv.d |
d = self.ppv.d |
304 |
print 'Cell empty!' |
print 'Cell empty!' |
309 |
self.avc.setAccursed(paper) |
self.avc.setAccursed(paper) |
310 |
self.ppv.showLinkbuoys = 0 |
self.ppv.showLinkbuoys = 0 |
311 |
self.ppv.viewMode = self.ppv.JUST_BROWSING |
self.ppv.viewMode = self.ppv.JUST_BROWSING |
312 |
|
else: |
313 |
|
print '...what\'s then?' |
314 |
|
self.ppactions.insertText(c.getId(), 0, '_') |
315 |
|
|
316 |
|
|
317 |
if key == "Delete": |
if key == "Delete": |
318 |
print 'Untested! Doesn\'t check the length' |
print 'Untested! Doesn\'t check the length' |