немного доработок

This commit is contained in:
danamir
2018-03-19 11:34:04 +03:00
parent 7519c97115
commit fce5c47202
4 changed files with 16 additions and 3 deletions

View File

@@ -1,8 +1,16 @@
import wx
from docx import Document
class Ttheory(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent)
self.doc_text = wx.StaticText(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0)
def get_theor(self):
doc = Document('test1.docx')
text_doc = doc.paragrapghs()
self.doc_text.SetLabel(text_doc)
class Labs(wx.Panel):

View File

@@ -48,9 +48,6 @@ class MainPage(wx.Frame):
nxt_page.Show()
nxt_page.Destroy()
app = wx.App(False)
frame = MainPage(None)
frame.Show()

8
service/test1.py Normal file
View File

@@ -0,0 +1,8 @@
from docx import Document
doc = Document('test.docx')
full_text = []
for i in doc.paragraphs:
full_text.append(i.text)
print(full_text)

BIN
test.docx Normal file

Binary file not shown.