Hello,
Hope someone can help me on this. In the following code, I want to capture
print('Recording GPS Position...') on sd card, for now, this is printing
on terminal directly I want to capture this runtime process (p_1) from
terminal and store on sd card as it is being executed how do I do this.
On Thu, Nov 02 2017, Ajinkya Bobade wrote:
> Hello,
>
> Hope someone can help me on this. In the following code, I want to capture
> print('Recording GPS Position...') on sd card, for now, this is printing
> on terminal directly I want to capture this runtime process (p_1) from
> terminal and sto
I wrote a code which works for text files: This code redirects the
output to sd card it goes as follows:
import sys
oldstdout = sys.stdout # So you can restore later
sys.stdout = open("/Volumes/aj/hello world.txt", 'w') # Or whatever
your logfile is
for i in range(10):
print ("Hello", i)
On Thu, Nov 02 2017, Ajinkya Bobade wrote:
[...]
> However, I want to write this code for "*.bag" extension files that is
> sys.stdout = open("/Volumes/aj/hello world.bag", 'w') . This file is
> defined as Binary(application/octect-stream). The above code doesn't
> work in this scenario. How do