Created
October 6, 2018 19:48
-
-
Save metasyn/b4ce9b42abe1600fb800817541b5d874 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import osproc, logging, strutils, strformat | |
const defaultLog = "/tmp/nim-entrypoint.log" | |
when isMainModule: | |
addHandler(newFileLogger(defaultLog, fmtStr = verboseFmtStr)) | |
info("Inside a nim process!") | |
let | |
programPath = "/opt/python/bin/python" | |
filePath = "reflector.py" | |
cmd = join(@[programPath, filePath], sep=" ") | |
info(fmt"Setting up: {cmd}") | |
info("Starting External Process...") | |
let success = execCmd(command=cmd) | |
if success != 0: | |
info(fmt"Non-zero exit code: {success}") | |
info("Exiting from nim...") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment