Is it possible to use cassandra cqlsh copy command inside the python programme?
<p>Is it possible to execute Cassandra CQLSH copy command through a Python program. If yes, how?</p>

<p>Thanks in Advance.</p>

<p>Yes, it is possible. I'm providing you a sample code about how we use cqlsh inside python. I guess, you'll can get some help from it but not interested to write the entire copy script for you.</p>

<pre><code> import subprocess

 host =  "xxx.xxx.xxx.xxx"
 user = "cassandra"
 password = "cassandra"
 process = subprocess.Popen("cqlsh " + host + " -u " + user + " -p " + password, shell=True)
 exitCode = process.wait()
 if exitCode == 0:
     print "Job Done!"
 else:
     print "Still working!"
</code></pre>

python cassandra