0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.141.21.106


Current Path : /var/www/html/dud/tcpdf/node-v14.17.6 2/tools/
Upload File :
Current File : //var/www/html/dud/tcpdf/node-v14.17.6 2/tools/getnodeversion.py

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())))