Changeset 0ed400d in sasview
- Timestamp:
- Sep 6, 2012 1:17:00 PM (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:
- 7034fc0
- Parents:
- 82cd844
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/src/sans/perspectives/calculator/model_editor.py
r82cd844 r0ed400d 750 750 func_str) 751 751 tr_msg = _compileFile(self.fname) 752 msg = tr_msg.__str__()752 msg = str(tr_msg.__str__()) 753 753 # Compile error 754 754 if msg: 755 msg.replace(" ", "\n") 755 756 msg += "\nCompiling Failed" 756 else:757 proc = subprocess.Popen(['python','%s'% self.fname],758 bufsize=1,759 stdout=subprocess.PIPE,760 stderr=subprocess.STDOUT,761 universal_newlines=True,762 shell=False)763 while proc.poll() is None:764 line = proc.stdout.readline()765 if line:766 #the real code does filtering here767 if line.count("Error"):768 msg = line.rstrip()769 757 else: 770 758 msg = "Error: The func(x) must 'return' a value at least.\n" … … 775 763 msg = "Name exists already." 776 764 # Prepare for the messagebox 777 if not msg: 778 if self.base != None: 779 self.base.update_custom_combo() 780 msg = "Successful!!!" 781 msg += " " + self._notes 782 msg += " Please look for it in the 'Customized Models' box." 783 info = 'Info' 784 color = 'blue' 785 else: 765 if self.base != None and not msg: 766 self.base.update_custom_combo() 767 Model = None 768 exec "from %s import Model"% name 769 try: 770 Model().run(0.01) 771 except: 772 msg = "Error " 773 _, value, _ = sys.exc_info() 774 msg += "in %s:\n%s\n" % (name, value) 775 if msg: 786 776 info = 'Error' 787 777 color = 'red' … … 792 782 except: 793 783 pass 794 self._msg_box.SetLabel(msg) 784 else: 785 msg = "Successful!!!" 786 msg += " " + self._notes 787 msg += " Please look for it in the 'Customized Models' box." 788 info = 'Info' 789 color = 'blue' 790 # Not to display long error msg 791 if info == 'Error': 792 mss = info 793 else: 794 mss = msg 795 self._msg_box.SetLabel(mss) 795 796 self._msg_box.SetForegroundColour(color) 796 797 # Send msg to the top window -
sansview/license.txt
rc329f4d r0ed400d 4 4 and is currently being developed as an open source project hosted at SourceForge 5 5 and managed by a consortium of scattering facilities. Participating facilities 6 include: The European Spallation Source, ISIS, The Institut Laue Langevin,6 include: The University of Maryland, The European Spallation Source, ISIS, The Institut Laue Langevin, 7 7 The National Institute of Standards and Technology Center for Neutron Research 8 8 and the Oak Ridge National Laboratory Neutron Sciences Directorate. 9 9 10 If you use DANSE applicationsto do scientific research that leads to publication,10 If you use this application to do scientific research that leads to publication, 11 11 we ask that you acknowledge the use of the software with the following sentence: 12 12 13 13 "This work benefited from the use of the SasView application, originally developed under NSF award DMR-0520547." 14 14 15 See the DANSE project web site for license information: 16 http://wiki.cacr.caltech.edu/danse/index.php/Main_Page 17 18 copyright 2009-2011, University of Tennessee 15 copyright 2009-2011, UTK, UMD, NIST, ORNL, ISIS, ESS, and ILL
Note: See TracChangeset
for help on using the changeset viewer.