[PyCrust-cvs] PyCrust editor.py,1.12,1.13
Brought to you by:
pobrien
From: <po...@us...> - 2003-04-03 01:28:56
|
Update of /cvsroot/pycrust/PyCrust In directory sc8-pr-cvs1:/tmp/cvs-serv6300 Modified Files: editor.py Log Message: Changed buffer naming. Removed old version of namespace update. Index: editor.py =================================================================== RCS file: /cvsroot/pycrust/PyCrust/editor.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** editor.py 2 Apr 2003 23:16:22 -0000 1.12 --- editor.py 3 Apr 2003 01:28:52 -0000 1.13 *************** *** 365,369 **** Buffer.id += 1 self.id = Buffer.id ! self.name = 'Buffer' self.editor = editor self.interp = interp --- 365,369 ---- Buffer.id += 1 self.id = Buffer.id ! self.name = '' self.editor = editor self.interp = interp *************** *** 407,411 **** """Open file into buffer.""" self.doc = Document(filename) ! self.name = self.doc.filename or 'Untitled' self.modulename = self.doc.filebase if self.doc.filepath and os.path.exists(self.doc.filepath): --- 407,411 ---- """Open file into buffer.""" self.doc = Document(filename) ! self.name = self.doc.filename or ('Untitled:' + str(self.id)) self.modulename = self.doc.filebase if self.doc.filepath and os.path.exists(self.doc.filepath): *************** *** 432,463 **** self.doc.write(self.editor.GetText()) self.editor.SetSavePoint() - - ## def updateNamespace(self): - ## """Update the namespace for autocompletion and calltips. - - ## Return True if updated, False if there was an error.""" - ## if self.editor.GetModify(): - ## self.save() - ## backup = self.interp.locals - ## syspath = sys.path - ## sys.path = self.syspath - ## try: - ## del sys.modules[self.modulename] - ## except KeyError: - ## pass - ## modfile, path, descr = imp.find_module(self.modulename, [self.filedir]) - ## try: - ## try: - ## module = imp.load_module(self.modulename, modfile, path, descr) - ## except: - ## self.interp.locals = backup - ## return False - ## else: - ## self.interp.locals = module.__dict__ - ## return True - ## finally: - ## sys.path = syspath - ## if modfile: - ## modfile.close() def updateNamespace(self): --- 432,435 ---- |