GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: prepare tools/specialize_node_d.py for Python 3 · nodejs/node@e6afaa3

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • tools
    • specialize_node_d.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎tools/specialize_node_d.py‎

Copy file name to clipboardExpand all lines: tools/specialize_node_d.py
+9-9Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212

1313
if len(sys.argv) != 5:
1414
print("usage: specialize_node_d.py outfile src/node.d flavor arch")
15-
sys.exit(2);
15+
sys.exit(2)
1616

17-
outfile = file(sys.argv[1], 'w');
18-
infile = file(sys.argv[2], 'r');
19-
flavor = sys.argv[3];
20-
arch = sys.argv[4];
17+
outfile = open(sys.argv[1], 'w')
18+
infile = open(sys.argv[2], 'r')
19+
flavor = sys.argv[3]
20+
arch = sys.argv[4]
2121

2222
model = r'curpsinfo->pr_dmodel == PR_MODEL_ILP32'
2323

2424
for line in infile:
2525
if flavor == 'freebsd':
26-
line = re.sub('procfs.d', 'psinfo.d', line);
26+
line = re.sub('procfs.d', 'psinfo.d', line)
2727
if arch == 'x64':
28-
line = re.sub(model, '0', line);
28+
line = re.sub(model, '0', line)
2929
else:
30-
line = re.sub(model, '1', line);
31-
outfile.write(line);
30+
line = re.sub(model, '1', line)
31+
outfile.write(line)

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.