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
  • 2 hours ago
  • 10 years ago

Installs

  • Total 376
  • Win 243
  • Mac 71
  • Linux 62
Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13
Windows 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0
Mac 0 0 1 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 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