Commit 2d5eccbaa198080a407dcac626164fcacc92fc9e
1 parent
99e5e165
Adapt to Python 3.
Showing
1 changed file
with
4 additions
and
4 deletions
examples/make_ts_distributions.py
| ... | ... | @@ -100,7 +100,7 @@ if __name__ == '__main__': |
| 100 | 100 | # Get input arguments |
| 101 | 101 | usage = "make_ts_distributions [-n ntrials] [-e enumbins] [-m max_threads]" |
| 102 | 102 | if len(sys.argv) < 1: |
| 103 | - print usage | |
| 103 | + print(usage) | |
| 104 | 104 | sys.exit() |
| 105 | 105 | |
| 106 | 106 | # Set default parameters |
| ... | ... | @@ -127,10 +127,10 @@ if __name__ == '__main__': |
| 127 | 127 | try: |
| 128 | 128 | par['value'] = int(sys.argv[i]) |
| 129 | 129 | except: |
| 130 | - print usage | |
| 130 | + print(usage) | |
| 131 | 131 | sys.exit() |
| 132 | 132 | else: |
| 133 | - print usage | |
| 133 | + print(usage) | |
| 134 | 134 | sys.exit() |
| 135 | 135 | |
| 136 | 136 | # Next item |
| ... | ... | @@ -175,7 +175,7 @@ if __name__ == '__main__': |
| 175 | 175 | # Generate pull distribution |
| 176 | 176 | p = processing.Process(target=create_ts, args=args, kwargs=kwargs) |
| 177 | 177 | p.start() |
| 178 | - print "Process emin=%.4f emax=%.4f started." % (emin, emax) | |
| 178 | + print("Process emin=%.4f emax=%.4f started." % (emin, emax)) | |
| 179 | 179 | |
| 180 | 180 | # Wait a short time to allow process to start |
| 181 | 181 | time.sleep(1) | ... | ... |