{"action":"created","comment":{"url":"https://api.github.com/repos/avocado-framework/avocado/pulls/comments/23551808","id":23551808,"diff_hunk":"@@ -114,3 +114,46 @@ def strip_console_codes(output, custom_codes=None):\n         old_word = tmp_word\n         return_str += tmp_word[len(special_code):]\n     return return_str\n+\n+\n+def matrix_to_string(matrix, header=None):\n+    \"\"\"\n+    Return a pretty, aligned string representation of a nxm matrix.\n+\n+    This representation can be used to print any tabular data, such as\n+    database results. It works by scanning the lengths of each element\n+    in each column, and determining the format string dynamically.\n+\n+    :param matrix: Matrix representation (list with n rows of m elements).\n+    :param header: Optional tuple or list with header elements to be displayed.","path":"avocado/utils/astring.py","position":15,"original_position":15,"commit_id":"01b5f4b39596191c540171257db8af27f9054159","original_commit_id":"01b5f4b39596191c540171257db8af27f9054159","user":{"login":"ruda","id":171907,"avatar_url":"https://avatars.githubusercontent.com/u/171907?v=3","gravatar_id":"","url":"https://api.github.com/users/ruda","html_url":"https://github.com/ruda","followers_url":"https://api.github.com/users/ruda/followers","following_url":"https://api.github.com/users/ruda/following{/other_user}","gists_url":"https://api.github.com/users/ruda/gists{/gist_id}","starred_url":"https://api.github.com/users/ruda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruda/subscriptions","organizations_url":"https://api.github.com/users/ruda/orgs","repos_url":"https://api.github.com/users/ruda/repos","events_url":"https://api.github.com/users/ruda/events{/privacy}","received_events_url":"https://api.github.com/users/ruda/received_events","type":"User","site_admin":false},"body":"Optional sequence with header elements to be displayed.","created_at":"2015-01-26T18:25:23Z","updated_at":"2015-01-26T18:25:23Z","html_url":"https://github.com/avocado-framework/avocado/pull/362#discussion_r23551808","pull_request_url":"https://api.github.com/repos/avocado-framework/avocado/pulls/362","_links":{"self":{"href":"https://api.github.com/repos/avocado-framework/avocado/pulls/comments/23551808"},"html":{"href":"https://github.com/avocado-framework/avocado/pull/362#discussion_r23551808"},"pull_request":{"href":"https://api.github.com/repos/avocado-framework/avocado/pulls/362"}}},"pull_request":{"url":"https://api.github.com/repos/avocado-framework/avocado/pulls/362","id":28047850,"html_url":"https://github.com/avocado-framework/avocado/pull/362","diff_url":"https://github.com/avocado-framework/avocado/pull/362.diff","patch_url":"https://github.com/avocado-framework/avocado/pull/362.patch","issue_url":"https://api.github.com/repos/avocado-framework/avocado/issues/362","number":362,"state":"open","locked":false,"title":"Pre-requesites to test discovery V7","user":{"login":"lmr","id":296807,"avatar_url":"https://avatars.githubusercontent.com/u/296807?v=3","gravatar_id":"","url":"https://api.github.com/users/lmr","html_url":"https://github.com/lmr","followers_url":"https://api.github.com/users/lmr/followers","following_url":"https://api.github.com/users/lmr/following{/other_user}","gists_url":"https://api.github.com/users/lmr/gists{/gist_id}","starred_url":"https://api.github.com/users/lmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmr/subscriptions","organizations_url":"https://api.github.com/users/lmr/orgs","repos_url":"https://api.github.com/users/lmr/repos","events_url":"https://api.github.com/users/lmr/events{/privacy}","received_events_url":"https://api.github.com/users/lmr/received_events","type":"User","site_admin":false},"body":"Preliminary commits to the latest version of the test discovery PR, that will succeed #358.\r\n\r\nJust one fix and one utility function.","created_at":"2015-01-26T18:18:12Z","updated_at":"2015-01-26T18:25:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fce0aa9cf26768d3c713d5d10d8643d125c173a0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/avocado-framework/avocado/pulls/362/commits","review_comments_url":"https://api.github.com/repos/avocado-framework/avocado/pulls/362/comments","review_comment_url":"https://api.github.com/repos/avocado-framework/avocado/pulls/comments/{number}","comments_url":"https://api.github.com/repos/avocado-framework/avocado/issues/362/comments","statuses_url":"https://api.github.com/repos/avocado-framework/avocado/statuses/01b5f4b39596191c540171257db8af27f9054159","head":{"label":"lmr:preliminary_test_discovery","ref":"preliminary_test_discovery","sha":"01b5f4b39596191c540171257db8af27f9054159","user":{"login":"lmr","id":296807,"avatar_url":"https://avatars.githubusercontent.com/u/296807?v=3","gravatar_id":"","url":"https://api.github.com/users/lmr","html_url":"https://github.com/lmr","followers_url":"https://api.github.com/users/lmr/followers","following_url":"https://api.github.com/users/lmr/following{/other_user}","gists_url":"https://api.github.com/users/lmr/gists{/gist_id}","starred_url":"https://api.github.com/users/lmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmr/subscriptions","organizations_url":"https://api.github.com/users/lmr/orgs","repos_url":"https://api.github.com/users/lmr/repos","events_url":"https://api.github.com/users/lmr/events{/privacy}","received_events_url":"https://api.github.com/users/lmr/received_events","type":"User","site_admin":false},"repo":{"id":24439240,"name":"avocado","full_name":"lmr/avocado","owner":{"login":"lmr","id":296807,"avatar_url":"https://avatars.githubusercontent.com/u/296807?v=3","gravatar_id":"","url":"https://api.github.com/users/lmr","html_url":"https://github.com/lmr","followers_url":"https://api.github.com/users/lmr/followers","following_url":"https://api.github.com/users/lmr/following{/other_user}","gists_url":"https://api.github.com/users/lmr/gists{/gist_id}","starred_url":"https://api.github.com/users/lmr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmr/subscriptions","organizations_url":"https://api.github.com/users/lmr/orgs","repos_url":"https://api.github.com/users/lmr/repos","events_url":"https://api.github.com/users/lmr/events{/privacy}","received_events_url":"https://api.github.com/users/lmr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lmr/avocado","description":"Avocado Test Framework","fork":true,"url":"https://api.github.com/repos/lmr/avocado","forks_url":"https://api.github.com/repos/lmr/avocado/forks","keys_url":"https://api.github.com/repos/lmr/avocado/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lmr/avocado/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lmr/avocado/teams","hooks_url":"https://api.github.com/repos/lmr/avocado/hooks","issue_events_url":"https://api.github.com/repos/lmr/avocado/issues/events{/number}","events_url":"https://api.github.com/repos/lmr/avocado/events","assignees_url":"https://api.github.com/repos/lmr/avocado/assignees{/user}","branches_url":"https://api.github.com/repos/lmr/avocado/branches{/branch}","tags_url":"https://api.github.com/repos/lmr/avocado/tags","blobs_url":"https://api.github.com/repos/lmr/avocado/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lmr/avocado/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lmr/avocado/git/refs{/sha}","trees_url":"https://api.github.com/repos/lmr/avocado/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lmr/avocado/statuses/{sha}","languages_url":"https://api.github.com/repos/lmr/avocado/languages","stargazers_url":"https://api.github.com/repos/lmr/avocado/stargazers","contributors_url":"https://api.github.com/repos/lmr/avocado/contributors","subscribers_url":"https://api.github.com/repos/lmr/avocado/subscribers","subscription_url":"https://api.github.com/repos/lmr/avocado/subscription","commits_url":"https://api.github.com/repos/lmr/avocado/commits{/sha}","git_commits_url":"https://api.github.com/repos/lmr/avocado/git/commits{/sha}","comments_url":"https://api.github.com/repos/lmr/avocado/comments{/number}","issue_comment_url":"https://api.github.com/repos/lmr/avocado/issues/comments/{number}","contents_url":"https://api.github.com/repos/lmr/avocado/contents/{+path}","compare_url":"https://api.github.com/repos/lmr/avocado/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lmr/avocado/merges","archive_url":"https://api.github.com/repos/lmr/avocado/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lmr/avocado/downloads","issues_url":"https://api.github.com/repos/lmr/avocado/issues{/number}","pulls_url":"https://api.github.com/repos/lmr/avocado/pulls{/number}","milestones_url":"https://api.github.com/repos/lmr/avocado/milestones{/number}","notifications_url":"https://api.github.com/repos/lmr/avocado/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lmr/avocado/labels{/name}","releases_url":"https://api.github.com/repos/lmr/avocado/releases{/id}","created_at":"2014-09-25T01:39:41Z","updated_at":"2015-01-26T18:15:48Z","pushed_at":"2015-01-26T18:19:29Z","git_url":"git://github.com/lmr/avocado.git","ssh_url":"git@github.com:lmr/avocado.git","clone_url":"https://github.com/lmr/avocado.git","svn_url":"https://github.com/lmr/avocado","homepage":"http://avocado-framework.readthedocs.org/en/latest/","size":3700,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"avocado-framework:master","ref":"master","sha":"f4252a639d61c4820b8fb3d08102a5ca20aefd75","user":{"login":"avocado-framework","id":7245719,"avatar_url":"https://avatars.githubusercontent.com/u/7245719?v=3","gravatar_id":"","url":"https://api.github.com/users/avocado-framework","html_url":"https://github.com/avocado-framework","followers_url":"https://api.github.com/users/avocado-framework/followers","following_url":"https://api.github.com/users/avocado-framework/following{/other_user}","gists_url":"https://api.github.com/users/avocado-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/avocado-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avocado-framework/subscriptions","organizations_url":"https://api.github.com/users/avocado-framework/orgs","repos_url":"https://api.github.com/users/avocado-framework/repos","events_url":"https://api.github.com/users/avocado-framework/events{/privacy}","received_events_url":"https://api.github.com/users/avocado-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":17449498,"name":"avocado","full_name":"avocado-framework/avocado","owner":{"login":"avocado-framework","id":7245719,"avatar_url":"https://avatars.githubusercontent.com/u/7245719?v=3","gravatar_id":"","url":"https://api.github.com/users/avocado-framework","html_url":"https://github.com/avocado-framework","followers_url":"https://api.github.com/users/avocado-framework/followers","following_url":"https://api.github.com/users/avocado-framework/following{/other_user}","gists_url":"https://api.github.com/users/avocado-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/avocado-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avocado-framework/subscriptions","organizations_url":"https://api.github.com/users/avocado-framework/orgs","repos_url":"https://api.github.com/users/avocado-framework/repos","events_url":"https://api.github.com/users/avocado-framework/events{/privacy}","received_events_url":"https://api.github.com/users/avocado-framework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/avocado-framework/avocado","description":"Avocado Test Framework","fork":false,"url":"https://api.github.com/repos/avocado-framework/avocado","forks_url":"https://api.github.com/repos/avocado-framework/avocado/forks","keys_url":"https://api.github.com/repos/avocado-framework/avocado/keys{/key_id}","collaborators_url":"https://api.github.com/repos/avocado-framework/avocado/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/avocado-framework/avocado/teams","hooks_url":"https://api.github.com/repos/avocado-framework/avocado/hooks","issue_events_url":"https://api.github.com/repos/avocado-framework/avocado/issues/events{/number}","events_url":"https://api.github.com/repos/avocado-framework/avocado/events","assignees_url":"https://api.github.com/repos/avocado-framework/avocado/assignees{/user}","branches_url":"https://api.github.com/repos/avocado-framework/avocado/branches{/branch}","tags_url":"https://api.github.com/repos/avocado-framework/avocado/tags","blobs_url":"https://api.github.com/repos/avocado-framework/avocado/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/avocado-framework/avocado/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/avocado-framework/avocado/git/refs{/sha}","trees_url":"https://api.github.com/repos/avocado-framework/avocado/git/trees{/sha}","statuses_url":"https://api.github.com/repos/avocado-framework/avocado/statuses/{sha}","languages_url":"https://api.github.com/repos/avocado-framework/avocado/languages","stargazers_url":"https://api.github.com/repos/avocado-framework/avocado/stargazers","contributors_url":"https://api.github.com/repos/avocado-framework/avocado/contributors","subscribers_url":"https://api.github.com/repos/avocado-framework/avocado/subscribers","subscription_url":"https://api.github.com/repos/avocado-framework/avocado/subscription","commits_url":"https://api.github.com/repos/avocado-framework/avocado/commits{/sha}","git_commits_url":"https://api.github.com/repos/avocado-framework/avocado/git/commits{/sha}","comments_url":"https://api.github.com/repos/avocado-framework/avocado/comments{/number}","issue_comment_url":"https://api.github.com/repos/avocado-framework/avocado/issues/comments/{number}","contents_url":"https://api.github.com/repos/avocado-framework/avocado/contents/{+path}","compare_url":"https://api.github.com/repos/avocado-framework/avocado/compare/{base}...{head}","merges_url":"https://api.github.com/repos/avocado-framework/avocado/merges","archive_url":"https://api.github.com/repos/avocado-framework/avocado/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/avocado-framework/avocado/downloads","issues_url":"https://api.github.com/repos/avocado-framework/avocado/issues{/number}","pulls_url":"https://api.github.com/repos/avocado-framework/avocado/pulls{/number}","milestones_url":"https://api.github.com/repos/avocado-framework/avocado/milestones{/number}","notifications_url":"https://api.github.com/repos/avocado-framework/avocado/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/avocado-framework/avocado/labels{/name}","releases_url":"https://api.github.com/repos/avocado-framework/avocado/releases{/id}","created_at":"2014-03-05T17:52:27Z","updated_at":"2015-01-23T20:55:44Z","pushed_at":"2015-01-23T20:55:44Z","git_url":"git://github.com/avocado-framework/avocado.git","ssh_url":"git@github.com:avocado-framework/avocado.git","clone_url":"https://github.com/avocado-framework/avocado.git","svn_url":"https://github.com/avocado-framework/avocado","homepage":"http://avocado-framework.github.io/","size":6690,"stargazers_count":17,"watchers_count":17,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":10,"forks":12,"open_issues":10,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/avocado-framework/avocado/pulls/362"},"html":{"href":"https://github.com/avocado-framework/avocado/pull/362"},"issue":{"href":"https://api.github.com/repos/avocado-framework/avocado/issues/362"},"comments":{"href":"https://api.github.com/repos/avocado-framework/avocado/issues/362/comments"},"review_comments":{"href":"https://api.github.com/repos/avocado-framework/avocado/pulls/362/comments"},"review_comment":{"href":"https://api.github.com/repos/avocado-framework/avocado/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/avocado-framework/avocado/pulls/362/commits"},"statuses":{"href":"https://api.github.com/repos/avocado-framework/avocado/statuses/01b5f4b39596191c540171257db8af27f9054159"}}}}