GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — node/tools/getnodeversion.py at main · codediverdev/node Expand file tree/ Copy pathgetnodeversion.pyMore file actions 21 lines (17 loc) · 676 Bytes / Copy pathgetnodeversion.pyFile metadata and controls21 lines (17 loc) · 676 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 from __future__ import print_function import os def get_major_minor_patch(text): for line in text.splitlines(): if line.startswith('#define NODE_MAJOR_VERSION'): major = line.split()[2] elif line.startswith('#define NODE_MINOR_VERSION'): minor = line.split()[2] elif line.startswith('#define NODE_PATCH_VERSION'): patch = line.split()[2] return major, minor, patch node_version_h = os.path.join(os.path.dirname(__file__), '..', 'src', 'node_version.h') with open(node_version_h) as in_file: print('.'.join(get_major_minor_patch(in_file.read()))) |
| You are visitor 01402520 — 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. |