def start_jaer(jaer_path, jaer_exec="jAERViewer1.5_linux.sh"):
"""Start jAER from Python.
This script is written for Linux usage,
An error will be raised if it's Windows OS.
Instead, windows user needs to manually setup jAER.
Parameters
----------
jaer_path : string
absolute save path of jAER.
e.g. /Users/dgyHome/Documents/workspace/jaer/trunk
jaer_exec : string
The executable of jAER. Version 1.5 is assumed.
Returns
-------
An opened jAER viewer.
"""
# Check OS type
if os.name != "posix":
raise ValueError("The Operating System is not a POSIX platform")
commands = "cd "+jaer_path+"; bash "+jaer_exec
process = subprocess.Popen(commands, stdout=subprocess.PIPE, shell=True)
return process
评论列表
文章目录