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,7 +100,7 @@ if __name__ == '__main__': | ||
| 100 | # Get input arguments | 100 | # Get input arguments |
| 101 | usage = "make_ts_distributions [-n ntrials] [-e enumbins] [-m max_threads]" | 101 | usage = "make_ts_distributions [-n ntrials] [-e enumbins] [-m max_threads]" |
| 102 | if len(sys.argv) < 1: | 102 | if len(sys.argv) < 1: |
| 103 | - print usage | 103 | + print(usage) |
| 104 | sys.exit() | 104 | sys.exit() |
| 105 | 105 | ||
| 106 | # Set default parameters | 106 | # Set default parameters |
| @@ -127,10 +127,10 @@ if __name__ == '__main__': | @@ -127,10 +127,10 @@ if __name__ == '__main__': | ||
| 127 | try: | 127 | try: |
| 128 | par['value'] = int(sys.argv[i]) | 128 | par['value'] = int(sys.argv[i]) |
| 129 | except: | 129 | except: |
| 130 | - print usage | 130 | + print(usage) |
| 131 | sys.exit() | 131 | sys.exit() |
| 132 | else: | 132 | else: |
| 133 | - print usage | 133 | + print(usage) |
| 134 | sys.exit() | 134 | sys.exit() |
| 135 | 135 | ||
| 136 | # Next item | 136 | # Next item |
| @@ -175,7 +175,7 @@ if __name__ == '__main__': | @@ -175,7 +175,7 @@ if __name__ == '__main__': | ||
| 175 | # Generate pull distribution | 175 | # Generate pull distribution |
| 176 | p = processing.Process(target=create_ts, args=args, kwargs=kwargs) | 176 | p = processing.Process(target=create_ts, args=args, kwargs=kwargs) |
| 177 | p.start() | 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 | # Wait a short time to allow process to start | 180 | # Wait a short time to allow process to start |
| 181 | time.sleep(1) | 181 | time.sleep(1) |