Ishikawa Yoshi
Ishikawa Yoshi

Reputation: 1779

Sublimetext2 work with python console

I try to write two or more lines of code in python console in SublimeText2 editor and I get the following error when I press enter after ":"

    >>> for i in dir():
  File "<string>", line 1
    for i in dir():
                 ^
   SyntaxError: unexpected EOF while parsing

Is this a bug or did I do something wrong? And another question is any way to use multiline methods in console?

Upvotes: 4

Views: 2108

Answers (1)

Liam Cain
Liam Cain

Reputation: 13373

The Sublime Text console is not meant to be used for coding. It is there mostly for troubleshooting and plugin output. Though you input multiple lines by using ;, I highly recommend against this. Will Bond does this to install Package Control, which if you have't downloaded already, I recommend you do. If you're looking for a python REPL, check out Wuub's excellent plugin SublimeREPL, which will give you a terminal/console like experience for quick python input.

Upvotes: 4

Related Questions