{"action":"created","comment":{"url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/pulls/comments/46090945","id":46090945,"diff_hunk":"@@ -0,0 +1,99 @@\n+import tkinter as tk\n+import viewmodel\n+\n+\n+class SimpleTableInput(tk.Frame):\n+    def __init__(self, parent, rows, value):\n+        tk.Frame.__init__(self, parent)\n+\n+        self._entry = {}\n+        self.rows = rows\n+\n+        check_input = (self.register(self._validate), \"%P\")\n+\n+        for row in range(self.rows):\n+            for column in range(self.rows):\n+                index = (row, column)\n+                e = tk.Entry(self, validate=\"key\", validatecommand=check_input)\n+                e.insert(tk.END, str(value[row][column]))\n+                e.grid(row=row, column=column, stick=\"nsew\")\n+                self._entry[index] = e\n+        for column in range(self.rows):\n+            self.grid_columnconfigure(column, weight=1)\n+        self.grid_rowconfigure(rows, weight=1)\n+\n+    def get(self):\n+        result = []\n+        for row in range(self.rows):\n+            current_row = []\n+            for column in range(self.rows):\n+                index = (row, column)\n+                current_row.append(self._entry[index].get())\n+            result.append(current_row)\n+        return result\n+\n+    def _validate(self, p):\n+        if p.strip() == \"\":\n+            return True\n+        try:\n+            float(p)\n+        except ValueError:\n+            return False\n+        return True\n+\n+\n+class GuiView(tk.Frame):\n+    def __init__(self, input_rows):\n+        tk.Frame.__init__(self)\n+\n+        self.view_model = viewmodel.ViewModel()\n+        self.master.title(\"Determinant calculator\")\n+        self.master.minsize(width=150, height=150)\n+\n+        self.grid(sticky=tk.W + tk.E + tk.N + tk.S)\n+        self.rows_label = tk.Label(self, text=\"   Enter rows and columns numbers   \", fg='black',\n+                                   font=\"Arial 12\", bg=\"light yellow\")\n+        self.rows_label.pack()\n+        self.rows = tk.Text(self, height=1, width=20)\n+        self.rows.insert(tk.END, \"3\")","path":"code/timonova-anastasia/src/guiview.py","position":58,"original_position":58,"commit_id":"4dd79ed59091221009df97242facadd28d044a6a","original_commit_id":"4dd79ed59091221009df97242facadd28d044a6a","user":{"login":"timonov","id":15253922,"avatar_url":"https://avatars.githubusercontent.com/u/15253922?v=3","gravatar_id":"","url":"https://api.github.com/users/timonov","html_url":"https://github.com/timonov","followers_url":"https://api.github.com/users/timonov/followers","following_url":"https://api.github.com/users/timonov/following{/other_user}","gists_url":"https://api.github.com/users/timonov/gists{/gist_id}","starred_url":"https://api.github.com/users/timonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timonov/subscriptions","organizations_url":"https://api.github.com/users/timonov/orgs","repos_url":"https://api.github.com/users/timonov/repos","events_url":"https://api.github.com/users/timonov/events{/privacy}","received_events_url":"https://api.github.com/users/timonov/received_events","type":"User","site_admin":false},"body":"испр\r\n","created_at":"2015-11-29T11:41:49Z","updated_at":"2015-11-29T11:41:49Z","html_url":"https://github.com/GodfatherThe/agile-course-practice-python/pull/15#discussion_r46090945","pull_request_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/pulls/comments/46090945"},"html":{"href":"https://github.com/GodfatherThe/agile-course-practice-python/pull/15#discussion_r46090945"},"pull_request":{"href":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/pulls/15","id":51661402,"html_url":"https://github.com/GodfatherThe/agile-course-practice-python/pull/15","diff_url":"https://github.com/GodfatherThe/agile-course-practice-python/pull/15.diff","patch_url":"https://github.com/GodfatherThe/agile-course-practice-python/pull/15.patch","issue_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/issues/15","number":15,"state":"open","locked":false,"title":"timonova-anastasia-lab2","user":{"login":"timonov","id":15253922,"avatar_url":"https://avatars.githubusercontent.com/u/15253922?v=3","gravatar_id":"","url":"https://api.github.com/users/timonov","html_url":"https://github.com/timonov","followers_url":"https://api.github.com/users/timonov/followers","following_url":"https://api.github.com/users/timonov/following{/other_user}","gists_url":"https://api.github.com/users/timonov/gists{/gist_id}","starred_url":"https://api.github.com/users/timonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timonov/subscriptions","organizations_url":"https://api.github.com/users/timonov/orgs","repos_url":"https://api.github.com/users/timonov/repos","events_url":"https://api.github.com/users/timonov/events{/privacy}","received_events_url":"https://api.github.com/users/timonov/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-24T13:49:34Z","updated_at":"2015-11-29T11:41:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5c308a21c541b3f16760a447c8c6be68c1b6b40","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/pulls/15/commits","review_comments_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/pulls/15/comments","review_comment_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/issues/15/comments","statuses_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/statuses/4dd79ed59091221009df97242facadd28d044a6a","head":{"label":"timonov:timonova-anastasia-lab2","ref":"timonova-anastasia-lab2","sha":"4dd79ed59091221009df97242facadd28d044a6a","user":{"login":"timonov","id":15253922,"avatar_url":"https://avatars.githubusercontent.com/u/15253922?v=3","gravatar_id":"","url":"https://api.github.com/users/timonov","html_url":"https://github.com/timonov","followers_url":"https://api.github.com/users/timonov/followers","following_url":"https://api.github.com/users/timonov/following{/other_user}","gists_url":"https://api.github.com/users/timonov/gists{/gist_id}","starred_url":"https://api.github.com/users/timonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timonov/subscriptions","organizations_url":"https://api.github.com/users/timonov/orgs","repos_url":"https://api.github.com/users/timonov/repos","events_url":"https://api.github.com/users/timonov/events{/privacy}","received_events_url":"https://api.github.com/users/timonov/received_events","type":"User","site_admin":false},"repo":{"id":44921520,"name":"agile-course-practice-python","full_name":"timonov/agile-course-practice-python","owner":{"login":"timonov","id":15253922,"avatar_url":"https://avatars.githubusercontent.com/u/15253922?v=3","gravatar_id":"","url":"https://api.github.com/users/timonov","html_url":"https://github.com/timonov","followers_url":"https://api.github.com/users/timonov/followers","following_url":"https://api.github.com/users/timonov/following{/other_user}","gists_url":"https://api.github.com/users/timonov/gists{/gist_id}","starred_url":"https://api.github.com/users/timonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timonov/subscriptions","organizations_url":"https://api.github.com/users/timonov/orgs","repos_url":"https://api.github.com/users/timonov/repos","events_url":"https://api.github.com/users/timonov/events{/privacy}","received_events_url":"https://api.github.com/users/timonov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timonov/agile-course-practice-python","description":"Проект-шаблон для выполнения лабораторных работ по курсу Agile Development на языке Python","fork":true,"url":"https://api.github.com/repos/timonov/agile-course-practice-python","forks_url":"https://api.github.com/repos/timonov/agile-course-practice-python/forks","keys_url":"https://api.github.com/repos/timonov/agile-course-practice-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timonov/agile-course-practice-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timonov/agile-course-practice-python/teams","hooks_url":"https://api.github.com/repos/timonov/agile-course-practice-python/hooks","issue_events_url":"https://api.github.com/repos/timonov/agile-course-practice-python/issues/events{/number}","events_url":"https://api.github.com/repos/timonov/agile-course-practice-python/events","assignees_url":"https://api.github.com/repos/timonov/agile-course-practice-python/assignees{/user}","branches_url":"https://api.github.com/repos/timonov/agile-course-practice-python/branches{/branch}","tags_url":"https://api.github.com/repos/timonov/agile-course-practice-python/tags","blobs_url":"https://api.github.com/repos/timonov/agile-course-practice-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timonov/agile-course-practice-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timonov/agile-course-practice-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/timonov/agile-course-practice-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timonov/agile-course-practice-python/statuses/{sha}","languages_url":"https://api.github.com/repos/timonov/agile-course-practice-python/languages","stargazers_url":"https://api.github.com/repos/timonov/agile-course-practice-python/stargazers","contributors_url":"https://api.github.com/repos/timonov/agile-course-practice-python/contributors","subscribers_url":"https://api.github.com/repos/timonov/agile-course-practice-python/subscribers","subscription_url":"https://api.github.com/repos/timonov/agile-course-practice-python/subscription","commits_url":"https://api.github.com/repos/timonov/agile-course-practice-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/timonov/agile-course-practice-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/timonov/agile-course-practice-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/timonov/agile-course-practice-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/timonov/agile-course-practice-python/contents/{+path}","compare_url":"https://api.github.com/repos/timonov/agile-course-practice-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timonov/agile-course-practice-python/merges","archive_url":"https://api.github.com/repos/timonov/agile-course-practice-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timonov/agile-course-practice-python/downloads","issues_url":"https://api.github.com/repos/timonov/agile-course-practice-python/issues{/number}","pulls_url":"https://api.github.com/repos/timonov/agile-course-practice-python/pulls{/number}","milestones_url":"https://api.github.com/repos/timonov/agile-course-practice-python/milestones{/number}","notifications_url":"https://api.github.com/repos/timonov/agile-course-practice-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timonov/agile-course-practice-python/labels{/name}","releases_url":"https://api.github.com/repos/timonov/agile-course-practice-python/releases{/id}","created_at":"2015-10-25T17:46:23Z","updated_at":"2015-10-25T19:14:26Z","pushed_at":"2015-11-24T15:48:07Z","git_url":"git://github.com/timonov/agile-course-practice-python.git","ssh_url":"git@github.com:timonov/agile-course-practice-python.git","clone_url":"https://github.com/timonov/agile-course-practice-python.git","svn_url":"https://github.com/timonov/agile-course-practice-python","homepage":null,"size":134,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"GodfatherThe:master","ref":"master","sha":"d070a155423fdbfa377ad4edbacfaf52402fc06d","user":{"login":"GodfatherThe","id":918446,"avatar_url":"https://avatars.githubusercontent.com/u/918446?v=3","gravatar_id":"","url":"https://api.github.com/users/GodfatherThe","html_url":"https://github.com/GodfatherThe","followers_url":"https://api.github.com/users/GodfatherThe/followers","following_url":"https://api.github.com/users/GodfatherThe/following{/other_user}","gists_url":"https://api.github.com/users/GodfatherThe/gists{/gist_id}","starred_url":"https://api.github.com/users/GodfatherThe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GodfatherThe/subscriptions","organizations_url":"https://api.github.com/users/GodfatherThe/orgs","repos_url":"https://api.github.com/users/GodfatherThe/repos","events_url":"https://api.github.com/users/GodfatherThe/events{/privacy}","received_events_url":"https://api.github.com/users/GodfatherThe/received_events","type":"User","site_admin":false},"repo":{"id":44858696,"name":"agile-course-practice-python","full_name":"GodfatherThe/agile-course-practice-python","owner":{"login":"GodfatherThe","id":918446,"avatar_url":"https://avatars.githubusercontent.com/u/918446?v=3","gravatar_id":"","url":"https://api.github.com/users/GodfatherThe","html_url":"https://github.com/GodfatherThe","followers_url":"https://api.github.com/users/GodfatherThe/followers","following_url":"https://api.github.com/users/GodfatherThe/following{/other_user}","gists_url":"https://api.github.com/users/GodfatherThe/gists{/gist_id}","starred_url":"https://api.github.com/users/GodfatherThe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GodfatherThe/subscriptions","organizations_url":"https://api.github.com/users/GodfatherThe/orgs","repos_url":"https://api.github.com/users/GodfatherThe/repos","events_url":"https://api.github.com/users/GodfatherThe/events{/privacy}","received_events_url":"https://api.github.com/users/GodfatherThe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GodfatherThe/agile-course-practice-python","description":"Проект-шаблон для выполнения лабораторных работ по курсу Agile Development на языке Python","fork":false,"url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python","forks_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/forks","keys_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/teams","hooks_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/hooks","issue_events_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/issues/events{/number}","events_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/events","assignees_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/assignees{/user}","branches_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/branches{/branch}","tags_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/tags","blobs_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/statuses/{sha}","languages_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/languages","stargazers_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/stargazers","contributors_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/contributors","subscribers_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/subscribers","subscription_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/subscription","commits_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/contents/{+path}","compare_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/merges","archive_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/downloads","issues_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/issues{/number}","pulls_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/pulls{/number}","milestones_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/milestones{/number}","notifications_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/labels{/name}","releases_url":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/releases{/id}","created_at":"2015-10-24T08:42:15Z","updated_at":"2015-10-24T09:22:51Z","pushed_at":"2015-11-27T15:14:54Z","git_url":"git://github.com/GodfatherThe/agile-course-practice-python.git","ssh_url":"git@github.com:GodfatherThe/agile-course-practice-python.git","clone_url":"https://github.com/GodfatherThe/agile-course-practice-python.git","svn_url":"https://github.com/GodfatherThe/agile-course-practice-python","homepage":null,"size":147,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/pulls/15"},"html":{"href":"https://github.com/GodfatherThe/agile-course-practice-python/pull/15"},"issue":{"href":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/issues/15"},"comments":{"href":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/GodfatherThe/agile-course-practice-python/statuses/4dd79ed59091221009df97242facadd28d044a6a"}}}}