I haven't tried this yet, is the same issue with the .py file outside of /media maybe in /home?
Are you creating the file before the system("python /media/realroot/Files/tweetcheck.py > /media/realroot/result.txt");?
a while ago I wrote a blog on efiicient communication between Linux processes and Arduino sketches: IoT - Efficient communication between Arduino* and Linux native processes | Intel® Developer Zone. Samples are on C++. Maybe still applicable for you
Thank you for your suggestions and your support. Unfortunately I'm still not able to pass the data successfully. I tried creating the results.txt before the system function, but that didn't help. I will have more time next week to deal with this problem. I will let you know in case I'll find a solution.