Run co and decode for python3
(*args, **kwargs)
| 4 | from sys import exit, version_info |
| 5 | |
| 6 | def run(*args, **kwargs): |
| 7 | "Run co and decode for python3" |
| 8 | result = co(*args, **kwargs) |
| 9 | return result.decode() if version_info[ 0 ] >= 3 else result |
| 10 | |
| 11 | # Actually run bin/mn rather than importing via python path |
| 12 | version = 'Mininet ' + run( 'PYTHONPATH=. bin/mn --version 2>&1', shell=True ) |