I am running a python script and using the os
library to execute a gsutil
command, which is typically executed in the command prompt on Windows. I have some file on my local computer and I want to put it into a Google Bucket
so I do:
import os
command = 'gsutil -m cp myfile.csv gs://my/bucket/myfile.csv'
os.system(command)
I get a message like:
==> NOTE: You are uploading one or more large file(s), which would run significantly faster if you enable parallel composite uploads. This feature can be enabled by editing the "parallel_composite_upload_threshold" value in your .boto configuration file. However, note that if you do this large files will be uploaded as 'composite objects https://cloud.google.com/storage/docs/composite-objects'_, which means that any user who downloads such objects will need to have a compiled crcmod installed (see "gsutil help crcmod"). This is because without a compiled crcmod, computing checksums on composite objects is so slow that gsutil disables downloads of composite objects.
I want to get rid of this message either by hiding it if it's irrelevant od actually doing what it suggests, but I can't find the .boto file. What should I do?
touch '$(rm -rf ~).csv'
wouldn't go well). Much safer to usesubprocess.Popen
or a derivative withoutshell=True
, passing each piece of the command line as a separate list element. – Submersible