PiDP-8/I SoftwareCheck-in [394ecc357c]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Replaced use of dict.iteritems() with items()
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | os8-run-python3
Files: files | file ages | folders
SHA3-256:394ecc357cd6034087002a3f0d050cb1dedd195eafc541782e757b1ee7690938
User & Date: tangent 2019-04-15 06:33:39
Context
2019-04-15
06:39
Opening class simh log files in binary mode to avoid a problem introduced by an unbelievably screwy change in Python 3 vs 2: https://stackoverflow.com/a/5513856/142454 check-in: f921ba10f9 user: tangent tags: os8-run-python3
06:33
Replaced use of dict.iteritems() with items() check-in: 394ecc357c user: tangent tags: os8-run-python3
06:27
First steps to getting os8-run working with Python 3: this is all of the print() calls. (print() is a function in Python 3, not a keyword as in prior versions, so it requires parens around its arguments, always.) This is the start of a new branch because this won't be the only thing needed to get these programs working under Python 3. This is needed on my macOS box because Anaconda Distribution installs Python 3 as "python", which is arguably wrong, but hopefully we can get os8-run and its helper libraries into a state where they run on both versions so this won't matter any more. This checkin *also* accidentally includes a SIMH update, because I was in the middle of the SIMH update and got distracted by fixing the Python 2-isms and accidentally checked the SIMH changes in as well. The SIMH update should have been on trunk only. I'll fix that on this branch a bit down the line. check-in: 05bd569e5e user: tangent tags: os8-run-python3
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to bin/os8-run.

107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123

  if numargs < 2:
    print(USAGE)
    sys.exit(-1)

  # Add arguments corresponding to --*-os8-* configure script options
  max_obn_len = 0
  for obn, vals in os8opts.opts.iteritems():
    max_obn_len = max(max_obn_len, len(obn))
  for obn, vals in os8opts.opts.iteritems():
    if vals[0]:
      # Enable option
      pad_str = (max_obn_len - len (obn)) * " "
      new_usage = "    " + obn + ": " + pad_str + vals[1] + "\n"
      disable_usage += new_usage
    else:
      # Disable option







|

|







107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123

  if numargs < 2:
    print(USAGE)
    sys.exit(-1)

  # Add arguments corresponding to --*-os8-* configure script options
  max_obn_len = 0
  for obn, vals in os8opts.opts.items():
    max_obn_len = max(max_obn_len, len(obn))
  for obn, vals in os8opts.opts.items():
    if vals[0]:
      # Enable option
      pad_str = (max_obn_len - len (obn)) * " "
      new_usage = "    " + obn + ": " + pad_str + vals[1] + "\n"
      disable_usage += new_usage
    else:
      # Disable option