Changeset 937 for trunk/GSASIIpy3.py
- Timestamp:
- May 30, 2013 4:01:11 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpy3.py
r933 r937 23 23 be evaluated. 24 24 25 :param str string: Character string c 25 :param str string: Character string containing a Python expression 26 to be evaluated. 27 28 :returns: the value for the expression as a float or None if the expression does not 29 evaluate to a valid number. 30 26 31 ''' 27 32 try: … … 33 38 34 39 def FormatValue(val,maxdigits=10): 35 '''Format a float to fit in maxdigits spaces, showing as much 36 precision as possible, more or less 40 '''Format a float to fit in ``maxdigits`` spaces, showing as much 41 precision as possible, more or less. 42 43 :param float val: number to be formatted. 44 45 :param int maxdigits: the number of digits to be used for display of the 46 number (defaults to 10). 47 48 :returns: a string with <= maxdigits characters (I hope). 37 49 ''' 38 50 # does the standard str() conversion fit?
Note: See TracChangeset
for help on using the changeset viewer.