немного доработок
This commit is contained in:
@@ -1,8 +1,16 @@
|
|||||||
import wx
|
import wx
|
||||||
|
from docx import Document
|
||||||
|
|
||||||
class Ttheory(wx.Panel):
|
class Ttheory(wx.Panel):
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
wx.Panel.__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):
|
class Labs(wx.Panel):
|
||||||
|
|||||||
3
main.py
3
main.py
@@ -48,9 +48,6 @@ class MainPage(wx.Frame):
|
|||||||
nxt_page.Show()
|
nxt_page.Show()
|
||||||
nxt_page.Destroy()
|
nxt_page.Destroy()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
app = wx.App(False)
|
app = wx.App(False)
|
||||||
frame = MainPage(None)
|
frame = MainPage(None)
|
||||||
frame.Show()
|
frame.Show()
|
||||||
|
|||||||
8
service/test1.py
Normal file
8
service/test1.py
Normal 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)
|
||||||
Reference in New Issue
Block a user