Show More
@@ -34,6 +34,7 b' from AppKit import NSApplicationWillTerminateNotification, NSBeep,\\' | |||||
34 |
|
34 | |||
35 | from pprint import saferepr |
|
35 | from pprint import saferepr | |
36 |
|
36 | |||
|
37 | import IPython | |||
37 | from IPython.kernel.engineservice import EngineService, ThreadedEngineService |
|
38 | from IPython.kernel.engineservice import EngineService, ThreadedEngineService | |
38 | from IPython.frontend.frontendbase import FrontEndBase |
|
39 | from IPython.frontend.frontendbase import FrontEndBase | |
39 |
|
40 | |||
@@ -160,7 +161,7 b' class IPythonCocoaController(NSObject, FrontEndBase):' | |||||
160 | def startCLIForTextView(self): |
|
161 | def startCLIForTextView(self): | |
161 | """Print banner""" |
|
162 | """Print banner""" | |
162 |
|
163 | |||
163 |
banner = """IPython1 |
|
164 | banner = """IPython1 %s -- An enhanced Interactive Python.""" % IPython.__version__ | |
164 |
|
165 | |||
165 | self.insert_text(banner + '\n\n') |
|
166 | self.insert_text(banner + '\n\n') | |
166 |
|
167 |
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -191,10 +191,12 b' class FrontEndBase(object):' | |||||
191 | """ |
|
191 | """ | |
192 |
|
192 | |||
193 | try: |
|
193 | try: | |
194 | self.compile_ast(block) |
|
194 | ast = self.compile_ast(block) | |
195 | return True |
|
|||
196 | except: |
|
195 | except: | |
197 | return False |
|
196 | return False | |
|
197 | ||||
|
198 | lines = block.split('\n') | |||
|
199 | return (len(lines)==1 or str(lines[-1])=='') | |||
198 |
|
200 | |||
199 |
|
201 | |||
200 | def compile_ast(self, block): |
|
202 | def compile_ast(self, block): |
General Comments 0
You need to be logged in to leave comments.
Login now