Changeset 1509 for branch/logging/GSASII.py
- Timestamp:
- Sep 29, 2014 2:31:04 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branch/logging/GSASII.py
r1505 r1509 1632 1632 if nextvalue: 1633 1633 log.LogOn() 1634 set to= True1634 set2 = True 1635 1635 else: 1636 1636 log.LogOff() 1637 set to= False1637 set2 = False 1638 1638 for menuitem in self.MacroStatusList: 1639 menuitem.Check(set to)1639 menuitem.Check(set2) 1640 1640 1641 1641 def _init_Macro(self): … … 1656 1656 print 70*'=' 1657 1657 print 'List of logged actions' 1658 for line in log.G2logList:1659 if line: print line1658 for i,line in enumerate(log.G2logList): 1659 if line: print i,line 1660 1660 print 70*'=' 1661 1661 self.Bind(wx.EVT_MENU, OnShowLog, item) 1662 1662 1663 item = menu.Append( 1664 help='Clear logged commands', id=wx.ID_ANY, 1665 kind=wx.ITEM_NORMAL,text='Clear log') 1666 def OnClearLog(event): log.G2logList=[None] 1667 self.Bind(wx.EVT_MENU, OnClearLog, item) 1668 1663 1669 item = menu.Append( 1664 1670 help='Save logged commands to file', id=wx.ID_ANY, … … 1686 1692 if filename: 1687 1693 fp = open(filename,'wb') 1688 fp.write(str(len(log.G2logList) )+'\n')1694 fp.write(str(len(log.G2logList)-1)+'\n') 1689 1695 for item in log.G2logList: 1690 cPickle.dump(item,fp)1696 if item: cPickle.dump(item,fp) 1691 1697 fp.close() 1692 1698 self.Bind(wx.EVT_MENU, OnSaveLog, item) … … 1696 1702 kind=wx.ITEM_NORMAL,text='Load log') 1697 1703 def OnLoadLog(event): 1704 # this appends. Perhaps we should ask to clear? 1698 1705 import log 1699 1706 import cPickle … … 1974 1981 #self.PatternTree = wx.TreeCtrl(id=wxID_PATTERNTREE, 1975 1982 import log 1976 self.PatternTree = log.G2TreeCtrl(id=wxID_PATTERNTREE,1983 self.PatternTree = G2gd.G2TreeCtrl(id=wxID_PATTERNTREE, 1977 1984 parent=self.mainPanel, pos=wx.Point(0, 0),style=wx.TR_DEFAULT_STYLE ) 1978 1985 self.PatternTree.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnPatternTreeSelChanged)
Note: See TracChangeset
for help on using the changeset viewer.