Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions SpreadSheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import wx
from wx.lib import sheet

import pubsub

# to send event
from pubsub import pub as Publisher

Expand Down Expand Up @@ -76,14 +78,16 @@ def Populate(self, data):

size = len(data)

n = float(self.GetNumberRows())

## load cell
for i in range(size):
try:
d = data[i]
self.SetCellValue(i,0,str(d[0]))
self.SetCellValue(i,1,str(d[1]))
Publisher.sendMessage("progress", msg=str(i/float(self.GetNumberRows())))
wx.Yield()
Publisher.sendMessage("progress", msg=str(i/n))
self.Update()
except:
pass

Expand All @@ -95,7 +99,9 @@ def Populate(self, data):
pass

try:
### resize and refresh the frame
self.AutoSize()
self.Refresh()
except Exception as info:
pass

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ wxPython <= 4.1.1
# SimulationGUI.py: 35
# SpreadSheet.py: 34
# devsimpy.py: 104
PyPubSub <= 3.3.0
PyPubSub #<= 3.3.0

# Mixins\Savable.py: 39
PyYAML #>= 5.1.2
Expand Down