我有一个Gradle构建异常消息,如下面的文本文件
"Error code is 1\nCommand line is: output/googlesamples/android-> ActionBarCompat-Basic/head/gradlew --stacktrace -p output/googlesamples/android-ActionBarCompat-Basic/head assembleDebug\n\n\nFAILURE: Build failed with an exception.\n\n\n\n* Where:\n\nBuild file '/...../output/googlesamples/android-ActionBarCompat-Basic/head/Application/build.gradle' line: 12\n\n\n\n* What went wrong:\n\nA problem occurred evaluating project ':Application'.\n\n> Failed to apply plugin [id 'com.android.application']\n\n > Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper
我是否可以使用python中的任何库来解析此异常消息并获取它的各个部分?
例如:错误代码,命令行,FAILURE等?