Author: bugman Date: Wed Jun 29 15:52:15 2011 New Revision: 13302 URL: http://svn.gna.org/viewcvs/relax?rev=13302&view=rev Log: Created the gui.misc.float_to_gui() function for converting floats to GUI strings. Modified: branches/gui_testing/gui/misc.py Modified: branches/gui_testing/gui/misc.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/misc.py?rev=13302&r1=13301&r2=13302&view=diff ============================================================================== --- branches/gui_testing/gui/misc.py (original) +++ branches/gui_testing/gui/misc.py Wed Jun 29 15:52:15 2011 @@ -129,6 +129,23 @@ return int(string) +def float_to_gui(num): + """Convert the float into the GUI string. + + @param num: The number in float or None form. + @type num: float or None + @return: The GUI string. + @rtype: str + """ + + # No input. + if num == None: + num = '' + + # Convert. + return unicode(num) + + def int_to_gui(num): """Convert the int into the GUI string.