slaclab / femto-timing

1 stars 1 forks source link

Changes to range() and print() Functions & Removal Of raw_input() Function in Python 3 #14

Closed rlodico06 closed 1 month ago

rlodico06 commented 2 months ago

The range() function returns an iterable object in Python 3, as opposed to a list in Python 2. In most cases in femto.py, this difference in behavior will not cause any changes in behavior; however, in the ring buffer class, the creation of an array is reliant on the list that is currently produced by the range function.

The print statement does not exist in Python 3 and has been replaced by the print() function, which requires the use of parentheses.

The raw_input() function, which is used once in femto.py, does not exist in Python 3. However, in the case in which it is used in script, the input() function, which does exist in Python 3, will produce the same result.