Changeset 940aca7 in sasview for sansguiframe/src/sans/guiframe/gui_manager.py
- Timestamp:
- May 19, 2012 10:17:02 AM (12 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- baa915c
- Parents:
- d225e32
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_manager.py
r6306f2f r940aca7 452 452 return 453 453 _, ext = os.path.splitext(name) 454 fd = open(file_name, 'w') 454 try: 455 fd = open(file_name, 'w') 456 except: 457 # On Permission denied: IOError 458 temp_dir = get_user_directory() 459 temp_file_name = os.path.join(temp_dir, name) 460 fd = open(temp_file_name, 'w') 455 461 separator = "\t" 456 462 if ext.lower() == ".csv": … … 491 497 excel_app.Visible = 1 492 498 except: 493 msg = "Error occured when calling Excel \n"494 msg += "Check that Excel in installed in this machine or \n"495 msg += " Check that %s really exists.\n" % str(file_name)499 msg = "Error occured when calling Excel.\n" 500 msg += "Check that Excel installed in this machine or \n" 501 msg += "check that %s really exists.\n" % str(file_name) 496 502 wx.PostEvent(self, StatusEvent(status=msg, 497 503 info="error")) … … 1031 1037 return menu_list 1032 1038 1033 1039 def get_current_context_menu(self, plotpanel=None): 1040 """ 1041 Get the context menu items made available 1042 by the current plug-in. 1043 This function is used by the plotting module 1044 """ 1045 if plotpanel is None: 1046 return 1047 menu_list = [] 1048 item = self._current_perspective 1049 if item != None: 1050 menu_list.extend(item.get_context_menu(plotpanel=plotpanel)) 1051 return menu_list 1052 1034 1053 def on_panel_close(self, event): 1035 1054 """ … … 2598 2617 if has_errors: 2599 2618 if data.dx != [] and data.dx[i] != None: 2600 out.write("%g %g %g %g\n" % (data.x[i], 2601 data.y[i], 2602 data.dy[i], 2603 data.dx[i])) 2619 if data.dx[i] != None: 2620 out.write("%g %g %g %g\n" % (data.x[i], 2621 data.y[i], 2622 data.dy[i], 2623 data.dx[i])) 2624 else: 2625 out.write("%g %g %g\n" % (data.x[i], 2626 data.y[i], 2627 data.dy[i])) 2604 2628 else: 2605 2629 out.write("%g %g %g\n" % (data.x[i],
Note: See TracChangeset
for help on using the changeset viewer.