branch : pmacs2
This commit is contained in:
moculus 2007-10-18 15:31:12 +00:00
parent d9d025f2d0
commit e8ac35f047
1 changed files with 2 additions and 3 deletions

View File

@ -228,8 +228,6 @@ class PythonSetLib(method.Method):
class PythonCheckSyntax(method.Method):
'''Check the syntax of the current python file'''
def _execute(self, w, **vargs):
if w.mode.pythonlib not in sys.path:
sys.path = list(sys.path)
sys.path.insert(0, w.mode.pythonlib)
source = w.buffer.make_string()
try:
@ -238,6 +236,7 @@ class PythonCheckSyntax(method.Method):
except Exception, e:
output = traceback.format_exc()
w.application.data_buffer("*PythonSyntax*", output, switch_to=True)
del sys.path[0]
class PythonDictCleanup(method.Method):
'''Align assignment blocks and literal dictionaries'''