Calling nitroproc from Python/R

Only for PC and MacOS

General Overview

Its actually quite simple to call nitroproc from any programming language. Essentially, you need to execute nitroproc through batch mode.


Let's assume we want to do an inner join (merge) two very big files and want to import the result into R. We use the system instruction to execute an OS instruction. In this case we execute nitroproc, with an argument specifying the path to the script to process.

On MacOS, using any R version, you would do the following

system("/Library/Frameworks/Mono.framework/Versions/Current/bin/mono --runtime=v4.0 /Users/admin/Documents/nitroproc_mac.exe /Users/admin/Documents/script_.nitroproc")

Obviously, it is assumed that the nitroproc executable file is located in /Users/admin/Documents/ and the script we want to process is also there. In case either one of them is located elsewhere, you need to change these paths in this system call.

On Windows, you will typically have something like this

system("C:/nitroproc/nitroproc_win.exe C:/myscripts/script_.nitroproc")


On MacOS, using any Python version, you would do the following

import os
os.system("/Library/Frameworks/Mono.framework/Versions/Current/bin/mono --runtime=v4.0 /Users/admin/Documents/nitroproc_mac.exe /Users/admin/Documents/script_.nitroproc")

On Windows, you would typically get something like this

import os
os.system("C:/nitroproc/nitroproc_win.exe C:/nitroproc/script_.nitroproc")

Once this finishes, your output will be ready. Obviously, the output file generated by the script will depend on which instructions you wrote on the nitroproc script, and where you are saving the output to. After this, you can load the outputs by loading the output csv as you would do in R or Python (using read.csv or pandas.read_csv)

We new friends!