ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Echo Evaluator

by Monnoroch ALL

Evaluates the python code and replaces it with the echoed result

Details

  • 2014.11.12.12.32.11
  • github.​com
  • github.​com
  • 10 years ago
  • 55 minutes ago
  • 10 years ago

Installs

  • Total 371
  • Win 240
  • Mac 70
  • Linux 61
May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

EchoEvaluator

Evaluates the python code and replaces it with the echoed result just like <?php echo "text"?>.

Installation :

  • Recommended - Using Sublime Package Control
    • ctrl+shft+p then select Package Control: Install Package
    • install EchoEvaluator
  • Alternatively, download the package from GitHub into your Packages folder

Usage :

Select a piece of python code and press ctrl+shift+e, the code will be replaced with echoed result. You can use multiple selections, than all code pieces will be evaluated esparatly. The plugin can evaluate native ST python: 2.x for ST2, 3.x for ST3. If an exception occured during evaluation, it will be printed into a ST console.

Examples :

Evaluating

for x in [1, 3, 5]:
    echo(x)

will replace it with “135”.

Evaluating

for x in [1, 3, 5]:
    echo("result[%d] = 2*%d\n" % (x, x + 1))

will replace it with:

result[1] = 2*2
result[3] = 2*4
result[5] = 2*6