Changeset 4987
- Timestamp:
- Jul 2, 2021 2:20:10 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r4979 r4987 2797 2797 self.addRows = addRows 2798 2798 self.size = size 2799 self.hlp = StripIndents(hlp,True)2799 self.hlp = hlp 2800 2800 self.lbl = lbl 2801 2801 self.CenterOnParent() … … 5601 5601 When singleLine is True, all newline are removed, but inserting "%%" 5602 5602 into the string will cause a blank line to be inserted at that point 5603 and %t% will generate a new line and tab (to indent a line) 5603 5604 5604 5605 :param str msg: a string containing one or more lines of text. 5605 5606 spaces or tabs following a newline are removed. 5607 :param bool singleLine: removes all newlines from the msg so that 5608 the text may be wrapped. 5606 5609 :returns: the string but reformatted 5607 5610 ''' … … 5622 5625 msg1 = msg1.replace(' ',' ') 5623 5626 msg = msg.replace('%%','\n\n') 5627 msg = msg.replace('%t%','\n\t') 5624 5628 return msg 5625 5629 -
trunk/GSASIIdataGUI.py
r4979 r4987 2357 2357 command. If a proxy server is needed, the address/host and port 2358 2358 can be added supplied here. This will generate command-line options 2359 2360 --config-option servers:global:http-proxy-host=*host* 2361 --config-option servers:global:http-proxy-port=*port* 2362 2359 %t% --config-option servers:global:http-proxy-host=*host* 2360 %t% --config-option servers:global:http-proxy-port=*port* 2361 %% 2363 2362 Additional subversion command line options can be supplied here 2364 2363 by pressing the '+' button. As examples of options that might be of 2365 2364 value, use two extra lines to add: 2366 2367 --config-dir 2368 DIR 2369 2365 %t% --config-dir 2366 %t% DIR 2367 %% 2370 2368 to specify an alternate configuration location. 2371 2369 %% 2372 2370 Or, use four extra lines to add 2373 2374 --config-option 2375 servers:global:http-proxy-username=*account* 2376 --config-option 2377 servers:global:http-proxy-password=*password* 2378 2371 %t% --config-option 2372 %t% servers:global:http-proxy-username=*account* 2373 %t% --config-option 2374 %t% servers:global:http-proxy-password=*password* 2375 %% 2379 2376 to specify a proxy user name and password. 2380 2377 %% 2381 2378 Note that strings marked *value* are items that will be configured 2382 2379 by the user. See http://svnbook.red-bean.com for more information on … … 5899 5896 self.SeqExportLookup[item.GetId()] = (obj,lbl) # lookup table for submenu item 5900 5897 # Bind is in UpdateSeqResults 5901 5898 G2G.Define_wxId('wxID_XPORTSEQCSV') 5899 self.SequentialEx.Append(G2G.wxID_XPORTSEQCSV,'Save table as CSV', 5900 'Save all sequential refinement results as a CSV spreadsheet file') 5902 5901 self.PostfillDataMenu() 5903 5902 -
trunk/GSASIIpath.py
r4976 r4987 178 178 179 179 def getsvnProxy(): 180 '''Loads a proxy for subversion from the file created by bootstrap.py 180 '''Loads a proxy for subversion from the proxyinfo.txt file created 181 by bootstrap.py or File => Edit Proxy...; If not found, then the 182 standard http_proxy and https_proxy environment variables are scanned 183 (see https://docs.python.org/3/library/urllib.request.html#urllib.request.getproxies) 184 with case ignored and that is used. 181 185 ''' 182 186 global proxycmds … … 185 189 if not os.path.exists(proxyinfo): 186 190 proxyinfo = os.path.join(path2GSAS2,"proxyinfo.txt") 187 if not os.path.exists(proxyinfo): 188 return '','','' 189 fp = open(proxyinfo,'r') 190 host = fp.readline().strip() 191 # allow file to begin with comments 192 while host.startswith('#'): 191 if os.path.exists(proxyinfo): 192 fp = open(proxyinfo,'r') 193 193 host = fp.readline().strip() 194 port = fp.readline().strip()195 etc = []196 line = fp.readline()197 while line:198 etc .append(line.strip())194 # allow file to begin with comments 195 while host.startswith('#'): 196 host = fp.readline().strip() 197 port = fp.readline().strip() 198 etc = [] 199 199 line = fp.readline() 200 fp.close() 201 setsvnProxy(host,port,etc) 202 return host,port,etc 200 while line: 201 etc.append(line.strip()) 202 line = fp.readline() 203 fp.close() 204 setsvnProxy(host,port,etc) 205 return host,port,etc 206 import urllib.request 207 proxdict = urllib.request.getproxies() 208 varlist = ("https","http") 209 for var in proxdict: 210 if var.lower() in varlist: 211 proxy = proxdict[var] 212 pl = proxy.split(':') 213 if len(pl) < 2: continue 214 host = ':'.join(pl[0:2]) 215 port = '' 216 if len(pl) == 3: 217 port = pl[2].strip('/').strip() 218 return host,port,'' 219 return '','','' 203 220 204 221 def setsvnProxy(host,port,etc=[]): -
trunk/GSASIIseqGUI.py
r4872 r4987 1180 1180 for id in G2frame.dataWindow.SeqExportLookup: 1181 1181 G2frame.Bind(wx.EVT_MENU, DoSequentialExport, id=id) 1182 G2frame.Bind(wx.EVT_MENU, OnSaveSeqCSV, id=G2G.wxID_XPORTSEQCSV) 1182 1183 1183 1184 EnablePseudoVarMenus()
Note: See TracChangeset
for help on using the changeset viewer.