[Calc] Allow some more functions

master
Sfan5 2014-03-08 20:06:52 +01:00
parent 67865f1ff0
commit 204379dcb2
1 changed files with 3 additions and 4 deletions

View File

@ -5,10 +5,9 @@ calc.py - Phenny Calculator Module
Copyright 2014, sfan5
"""
import ast
import operator as op
import math
import random
import struct
class SomeObject(object):
pass
@ -20,11 +19,11 @@ env = {
"range": range, "round": round, "min": min, "map": map,
"zip": zip, "xrange": xrange, "unicode": unicode,
"unichr": unichr, "type": type, "slice": slice, "ord": ord,
"chr": chr, "str": str
"chr": chr, "str": str, "float": float
}
libs = [
'math', 'random'
'math', 'random', 'struct'
]
for lib in libs: