This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amodulename = 'modulename' | |
try: | |
import pyximport | |
pyximport.install() | |
except: | |
print('Cython import failed; {0} will use the legacy (pure Python) mode.'.format(amodulename)) | |
from modulenamevanilla import class1, class2, class3 | |
else: | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
parser = re.compile('(?:[0-9\.]+)') | |
lambda x: [float(item) for item in parser.findall(repr(x))] |
NewerOlder