Universal eval to string function

Category: Python - Miscellaneous

This is a function that evaluate all expressions and statements and return the result as a string. It also return Exceptions as strings. It is used in trypython.jcubic.pl Date: 11 February, 2012


Evaluation - Exec - Python - Python Scripts

Homepage: http://code.activestate.com/recipes/577585-universal-eval-to-string-function/?in=lang-python

Developer: Jakub Jankiewicz

License: Freeware

Operating System: Windows

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

Cyberfolio is an e-portfolio tool written in php using mysql database.

developer Developer: SourceForge.net
license License: Freeware
operating systems Operating System: All


This script is useful to convert an infix expression to postfix and vice-versa.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


Often, you might want to let (untrusted) users input simple Python expressions and evaluate them, but the eval-function in Python is unsafe.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


This script represents a lightweight and powerful way to evaluate expressions embedded in strings during interpolation.

developer Developer: code.activestate.com
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


The Evaluation And Report Language is an RDF based framework for recording, transferring and processing data about automatic and manual evaluations of resources.

developer Developer: w3.org
license License: Freeware
operating systems Operating System: Windows


It displays the result on the profile page of the user.

developer Developer: ftp.drupal.org
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


Python does not have lazy evaluation syntax features built-in, but fortunately decorators can be used with new-style classes to emulate such a feature.

developer Developer: Sridhar Ratnakumar
license License: Freeware
operating systems Operating System: Windows


This is an example of how functional ideas of infinite lists can be used in python to optimize memory usage of certain problems.

developer Developer: Thomas Ahle
license License: Freeware
operating systems Operating System: Windows


This context manager provides a convenient, Pythonic way to temporarily replace the file descriptors of stdout and stderr, redirecting to either os.

developer Developer: Greg Haskins
license License: Freeware
operating systems Operating System: Windows