Changeset 1020
- Timestamp:
- Aug 7, 2013 5:38:21 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r1006 r1020 216 216 #pathlist = sys.path[:] 217 217 #if path2GSAS2 not in pathlist: pathlist.append(path2GSAS2) 218 path2GSAS2 = os.path.join(219 os.path.dirname(os.path.realpath(__file__)), # location of this file220 'imports')218 #path2GSAS2 = os.path.join( 219 # os.path.dirname(os.path.realpath(__file__)), # location of this file 220 # 'imports') 221 221 pathlist = sys.path[:] 222 if path2GSAS2 not in pathlist: pathlist.append(path2GSAS2)222 #if path2GSAS2 not in pathlist: pathlist.append(path2GSAS2) 223 223 224 224 filelist = [] … … 1040 1040 except: 1041 1041 pass 1042 path2GSAS2 = os.path.join(1043 os.path.dirname(os.path.realpath(__file__)), # location of this file1044 'exports')1045 if path2GSAS2 not in sys.path: sys.path.append(path2GSAS2)1042 #path2GSAS2 = os.path.join( 1043 # os.path.dirname(os.path.realpath(__file__)), # location of this file 1044 # 'exports') 1045 #if path2GSAS2 not in sys.path: sys.path.append(path2GSAS2) 1046 1046 #reload(G2IO) 1047 1047 import G2cif -
trunk/GSASIIIO.py
r1010 r1020 1552 1552 G2frame, 1553 1553 formatName, 1554 extension, 1554 1555 longFormatName=None, 1555 1556 ): 1556 1557 self.G2frame = G2frame 1557 1558 self.formatName = formatName # short string naming file type 1559 self.extension = extension 1558 1560 if longFormatName: # longer string naming file type 1559 1561 self.longFormatName = longFormatName … … 1677 1679 for key2 in self.Histograms[key1]: 1678 1680 print ' ',key2,Show(self.Histograms[key1][key2]) 1681 1682 def defSaveFile(self): 1683 return os.path.abspath( 1684 os.path.splitext(self.G2frame.GSASprojectfile 1685 )[0]+self.extension) 1686 1687 def askSaveFile(self): 1688 '''Ask the user to supply a file name 1689 1690 :returns: a file name (str) 1691 ''' 1692 defnam = os.path.splitext( 1693 os.path.split(self.G2frame.GSASprojectfile)[1] 1694 )[0]+self.extension 1695 dlg = wx.FileDialog( 1696 self.G2frame, 'Input name for file to write', '.', defnam, 1697 self.longFormatName+' (*'+self.extension+')|*'+self.extension, 1698 wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT|wx.CHANGE_DIR) 1699 try: 1700 if dlg.ShowModal() == wx.ID_OK: 1701 filename = dlg.GetPath() 1702 # make sure extension is correct 1703 filename = os.path.splitext(filename)[0]+self.extension 1704 else: 1705 filename = None 1706 finally: 1707 dlg.Destroy() 1708 return filename 1709 1679 1710 1680 1711 ###################################################################### -
trunk/GSASIIpath.py
r989 r1020 37 37 else: 38 38 bindir = 'binlinux%d.%d' % sys.version_info[0:2] 39 for loc in sys.path[0],os.path. split(__file__)[0]:39 for loc in sys.path[0],os.path.abspath(os.path.split(__file__)[0]): 40 40 if bindir: 41 41 if os.path.exists(os.path.join(loc,bindir)) and os.path.join(loc,bindir) not in sys.path: … … 50 50 if bindir == None: 51 51 raise Exception,"**** ERROR GSAS-II binary libraries not found, GSAS-II fails ****" 52 52 # add the data import and export directory to the search path 53 path2GSAS2 = os.path.join( 54 os.path.dirname(os.path.realpath(__file__)), # location of this file 55 'imports') 56 pathlist = sys.path[:] 57 if path2GSAS2 not in sys.path: sys.path.append(path2GSAS2) 58 path2GSAS2 = os.path.join( 59 os.path.dirname(os.path.realpath(__file__)), # location of this file 60 'exports') 61 if path2GSAS2 not in sys.path: sys.path.append(path2GSAS2) 53 62 # routines for looking a version numbers in files 54 63 version = -1 -
trunk/GSASIIphsGUI.py
r1016 r1020 87 87 88 88 ''' 89 89 90 90 #patch 91 91 if 'RBModels' not in data: … … 1564 1564 if dlg.ShowModal() == wx.ID_OK: 1565 1565 DisAglCtls = dlg.GetData() 1566 else: 1567 dlg.Destroy() 1568 return 1566 1569 dlg.Destroy() 1567 1570 generalData['DisAglCtls'] = DisAglCtls … … 1586 1589 except KeyError: # inside DistAngle for missing atom types in DisAglCtls 1587 1590 print '**** ERROR - try again but do "Reset" to fill in missing atom types ****' 1588 1591 else: 1592 print "select one or more rows of atoms" 1593 G2frame.ErrorDialog('Select atom',"select one or more rows of atoms then redo") 1594 1589 1595 def OnReImport(event): 1590 1596 print 'reimport atoms from file to be developed'
Note: See TracChangeset
for help on using the changeset viewer.