Home Download Buy Blog Forum Support

Executing multiline python in the python console

Executing multiline python in the python console

Postby neilsarkar on Fri Apr 27, 2012 1:10 pm

Hi, is there any way to execute multiline python in the Sublime Text 2 console?

A trivial example from the python prompt in terminal:

Code: Select all
>>> if (True):
...    print "cool"
...
cool


When run in the python console (ctrl+`) in Sublime Text 2:

Code: Select all
>>> if (True):
  File "<string>", line 1
    if(True):
           ^
SyntaxError: unexpected EOF while parsing


Any guidance is much appreciated. Thank you!
neilsarkar
 
Posts: 2
Joined: Mon Apr 23, 2012 1:12 pm

Re: Executing multiline python in the python console

Postby AltIvan on Tue May 22, 2012 11:19 pm

This is certainly an issue.
AltIvan
 
Posts: 4
Joined: Mon May 21, 2012 6:51 am

Re: Executing multiline python in the python console

Postby sfranky on Thu May 31, 2012 8:13 pm

maybe use the sublimeREPL package? it displays a REPL on a split view, but it may do for what you need it
sfranky
 
Posts: 96
Joined: Mon Oct 19, 2009 10:06 pm


Return to Plugin Development

Who is online

Users browsing this forum: Exabot [Bot] and 6 guests

cron