使用给定的文字,其中\ n已经存在。我希望np ++自动使用这些字符并以虚线显示文本,而不是显示\ n字符。 这可能吗?
文字示例:
'Failed to import test module: TestsDashboard\nTraceback (most recent call last):\n File "/usr/local/lib/python3.7/unittest/loader.py", line 434, in _find_test_path\n module = self._get_module_from_name(name)\n File "/usr/local/lib/python3.7/unittest/loader.py", line 375, in _get_module_from_name\n __import__(name)\n File "/var/jenkins_home/workspace/omation_failed-run-investigation@2/Tests/TestsDashboard.py", line 2, in <module>\n from Tests.BaseTestClass import BaseTestClass\n File "/var/jenkins_home/workspace/omation_failed-run-investigation@2/Tests/BaseTestClass.py", line 4, in <module>\n import psutil\nModuleNotFoundError: No module named \'psutil\'\n', 'Failed to import test module: TestsRelatedItems\nTraceback (most recent call last):\n File "/usr/local/lib/python3.7/unittest/loader.py", line 434, in _find_test_path\n module = self._get_module_from_name(name)\n File "/usr/local/lib/python3.7/unittest/loader.py", line 375, in _get_module_from_name\n __import__(name)\n File "/var/jenkins_home/workspace/omation_failed-run-investigation@2/Tests/TestsRelatedItems.py", line 2, in <module>\n from Tests.BaseTestClass import BaseTestClass\n File "/var/jenkins_home/workspace/omation_failed-run-investigation@2/Tests/BaseTestClass.py", line 4, in <module>\n import psutil\nModuleNotFoundError: No module named \'psutil\'\n', 'Failed to import test module: TestsReports\nTraceback (most recent call last):\n File "/usr/local/lib/python3.7/unittest/loader.py", line 434, in _find_test_path\n module = self._get_module_from_name(name)\n File "/usr/local/lib/python3.7/unittest/loader.py", line 375, in _get_module_from_name\n __import__(name)\n File "/var/jenkins_home/workspace/omation_failed-run-investigation@2/Tests/TestsReports.py", line 2, in <module>\n from Tests.BaseTestClass import BaseTestClass\n File "/var/jenkins_home/workspace/omation_failed-run-investigation@2/Tests/BaseTestClass.py", line 4, in <module>\n import psutil\nModuleNotFoundError: No module named \'psutil\'\n'