So, I have a code in C# that converts the Image to base64 and vice versa. Now, I want to send the generated base64 to python.
Here's my existing code.
var startProcess = new ProcessStartInfo
{
FileName = pythonInterpreter,
Arguments = string.Format($"\"{pythonPathAndCode}\" {b64stringCSharp}"),
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardInput = true,
RedirectStandardError = true,
CreateNoWindow = true,
};
using (Process process = Process.Start(startProcess))
{
error = process.StandardError.ReadToEnd();
testResult = process.StandardOutput.ReadToEnd();
lblTestOutput.Text = testResult;
lblError.Text = error;
}
This code is working just fine when I'm trying to send a small value of string to python. But when it comes in sending base64 value, an exception error appeared.
System.ComponentModel.Win32Exception: 'The filename or extension is too long'
Take note that the code is working perfectly fine when I'm sending only 32,000 string and less but base64 consist of exactly 98,260.
Is there a way to minimize this base64?
This is my python code:
import sys
inputFromC = sys.stdin
print("Python Recevied: ", inputFromC)