system("echo \"Hello World!\"") ;
// Result: "Hello World!"
So, if you need to use your maya data to run through an executable for any reason, you can use the system command the same as you would with any Maya procedure.
string $numVerts = "2023" ; // Number of vertices on a mesh
string $mesh = "myMesh" ; // Mesh Name
system("C:/myAppDirectory/mySpecialVertApp "+$numVerts+" "+$mesh) ;
This allows you to gather data in a Maya scene and send it directly to your executable without needing to save it out first. It's a bit slower than running it normally, but barely noticeable.