Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: third_party/node/node.py

Issue 2648693002: nodejs: Add light python wrappers for running node and friends (Closed)
Patch Set: . Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/node/node_modules.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2017 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 from os import path as os_path
7
8
9 def GetPlatformPath():
dpapad 2017/01/20 17:45:55 Does this need to be public? Only GetBinaryPath()
Dan Beam 2017/01/20 18:02:41 Done.
10 import platform
11 return os_path.join(*{
12 'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'),
13 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'),
14 'Windows': ('win', 'node.exe'),
15 }[platform.system()])
dpapad 2017/01/20 17:45:55 Don't you need to import this before using it?
Dan Beam 2017/01/20 18:02:41 L10
16
17
18 def GetBinaryPath():
19 return os_path.join(os_path.dirname(__file__), GetPlatformPath())
OLDNEW
« no previous file with comments | « no previous file | third_party/node/node_modules.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698