##// END OF EJS Templates
added encoding and objc.signature to executeFileAtPath_encoding_
Barry Wark <barrywarkatgmaildotcom> -
Show More
@@ -200,13 +200,14 b' class IPythonCocoaController(NSObject, AsyncFrontEndBase):'
200 result = blockingCallFromThread(self.engine.pull, keys)
200 result = blockingCallFromThread(self.engine.pull, keys)
201 self.waitingForEngine = False
201 self.waitingForEngine = False
202
202
203 def executeFileAtPath_(self, path):
203 @objc.signature('v@:@I')
204 def executeFileAtPath_encoding_(self, path, encoding):
204 """Execute file at path in an empty namespace. Update the engine
205 """Execute file at path in an empty namespace. Update the engine
205 user_ns with the resulting locals."""
206 user_ns with the resulting locals."""
206
207
207 lines,err = NSString.stringWithContentsOfFile_encoding_error_(
208 lines,err = NSString.stringWithContentsOfFile_encoding_error_(
208 path,
209 path,
209 NSString.defaultCStringEncoding(),
210 encoding,
210 None)
211 None)
211 self.engine.execute(lines)
212 self.engine.execute(lines)
212
213
General Comments 0
You need to be logged in to leave comments. Login now