36 |
def clean_data(args=''): |
def clean_data(args=''): |
37 |
os.system('rm '+PPDIR+'b_*') |
os.system('rm '+PPDIR+'b_*') |
38 |
os.system('rm '+PPDIR+'d*') |
os.system('rm '+PPDIR+'d*') |
|
#os.system('rm '+PPDIR+'ps_F*') |
|
39 |
if args=='full': |
if args=='full': |
40 |
os.system('rm '+PPDIR+'ps_*') |
os.system('rm '+PPDIR+'ps_*') |
41 |
os.system('rm '+PPDIR+'pp.gz') |
os.system('rm '+PPDIR+'pp.gz') |
43 |
os.system('rm '+PPDIR+'pp.gz') |
os.system('rm '+PPDIR+'pp.gz') |
44 |
if args=='exept_pkg': |
if args=='exept_pkg': |
45 |
os.system('rm '+PPDIR+'ps_*') |
os.system('rm '+PPDIR+'ps_*') |
|
#os.system('ls -la '+PPDIR) |
|
46 |
|
|
47 |
def return_data(): |
def return_data(): |
48 |
clean_data('exept_pkg') |
clean_data('exept_pkg') |
115 |
self.ppv.viewMode = self.ppv.JUST_BROWSING |
self.ppv.viewMode = self.ppv.JUST_BROWSING |
116 |
|
|
117 |
def key(self, key): |
def key(self, key): |
118 |
#print 'key: ',key |
print 'key: ',key |
119 |
self.setDefaultViewMode() |
self.setDefaultViewMode() |
120 |
|
|
121 |
if key == "Ctrl-T": |
if key == "Ctrl-T": |
125 |
self.ppv.test_Y = 1 |
self.ppv.test_Y = 1 |
126 |
if key == "Ctrl-U": |
if key == "Ctrl-U": |
127 |
self.ppv.test_U = 1 |
self.ppv.test_U = 1 |
128 |
|
|
129 |
|
if key == "Ctrl-E": |
130 |
|
print self.vs.matcher.interpList(self.vs.matcher, 0) |
131 |
|
|
132 |
if key == "Alt-R": |
if key == "Alt-R": |
133 |
os.system('make compile') |
os.system('make compile') |
134 |
loadScenes() |
loadScenes() |
144 |
if key == "Ctrl-X": |
if key == "Ctrl-X": |
145 |
print 'Save...' |
print 'Save...' |
146 |
|
|
147 |
|
# Before saveing all empty cells should be removed! |
148 |
|
|
149 |
if firstTime: |
if firstTime: |
150 |
clean_data('exept_ptr') |
clean_data('exept_ptr') |
151 |
#else: |
#else: |
182 |
if key == "Ctrl-L": |
if key == "Ctrl-L": |
183 |
self.ppv.showLinkbuoys = not self.ppv.showLinkbuoys |
self.ppv.showLinkbuoys = not self.ppv.showLinkbuoys |
184 |
|
|
185 |
if key == "Return": |
if key == "Returnadsf": |
186 |
|
return |
187 |
self.ppv.viewMode = self.ppv.TEXT_EDITING |
self.ppv.viewMode = self.ppv.TEXT_EDITING |
188 |
c = self.avc.getAccursed() |
c = self.avc.getAccursed() |
189 |
print "Acc: ",c |
print "Acc: ",c |
199 |
self.avc.setCursorOffset(0) |
self.avc.setCursorOffset(0) |
200 |
|
|
201 |
if len(key) == 1 or key == "Backspace" or key == "Delete" \ |
if len(key) == 1 or key == "Backspace" or key == "Delete" \ |
202 |
or key == "Left" or key == "Right": |
or key == "Left" or key == "Right" \ |
203 |
|
or key == "Up" or key == "Down" \ |
204 |
|
or key == "Home" or key == "End" \ |
205 |
|
or key == "Return": |
206 |
|
|
207 |
self.ppv.viewMode = self.ppv.TEXT_EDITING |
self.ppv.viewMode = self.ppv.TEXT_EDITING |
208 |
self.ppv.showLinkbuoys = 1 |
self.ppv.showLinkbuoys = 1 |
209 |
if key == "Left" or key == "Right": |
if key == "Left" or key == "Right" or key == "Up" or key == "Down": |
210 |
self.ppv.showLinkbuoys = 0 |
self.ppv.showLinkbuoys = 0 |
211 |
|
|
212 |
if not 32 <= ord(key[0]) <= 254: |
if not 32 <= ord(key[0]) <= 254: |
226 |
if len(key) == 1: |
if len(key) == 1: |
227 |
self.ppactions.insertText(c.getId(), offs, key) |
self.ppactions.insertText(c.getId(), offs, key) |
228 |
self.avc.setCursorOffset(offs+1) |
self.avc.setCursorOffset(offs+1) |
229 |
|
if key == "Return": |
230 |
|
self.ppactions.insertText(c.getId(), offs, '\n') |
231 |
|
self.avc.setCursorOffset(offs+1) |
232 |
if key == "Backspace": |
if key == "Backspace": |
233 |
if offs != 0: |
if offs != 0: |
234 |
self.ppactions.deleteText(c.getId(), offs-1, offs) |
self.ppactions.deleteText(c.getId(), offs-1, offs) |
242 |
if key == "Right": |
if key == "Right": |
243 |
if offs < len(c.t()): |
if offs < len(c.t()): |
244 |
self.avc.setCursorOffset(offs+1) |
self.avc.setCursorOffset(offs+1) |
245 |
|
if key == "Up": |
246 |
|
self.avc.setCursorOffset(0) |
247 |
|
if key == "Down": |
248 |
|
self.avc.setCursorOffset(len(c.t())) |
249 |
|
|
250 |
def scene(self, vs): |
def scene(self, vs): |
251 |
vs.map.put(background((0.4,0.5,0.8))) |
vs.map.put(background((0.4,0.5,0.8))) |