python problam subprocess fore rub script bash
<p>i have problem in subprocess
i have this script bash which good work and is name kamel.sh</p>

<pre><code>to=$1
subject=$1
/root/Desktop/telegram/tg/bin/./telegram-cli -k /root/Desktop/telegram/tg/tg-server.pub -WR -e "msg $to $subject"
</code></pre>

<p>but i want use python fore work.is 1.sh give 2 argv fore work and argv1 = user and argv2 = hello
but is have problem </p>

<pre><code>import subprocess
subprocess.call("1.sh", user, hello, shell=True )
</code></pre>

<p>and i see this eroore</p>

<pre><code>Traceback (most recent call last):
File "/root/Desktop/telegram-log/kamel.py", line 27, in &lt;module&gt;
subprocess.call("kamel.sh testt",kol,shell=True )
File "/usr/lib/python2.7/subprocess.py", line 523, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 660, in __init__
raise TypeError("bufsize must be an integer")
TypeError: bufsize must be an integer
</code></pre>

<pre><code>import subprocess
subprocess.call("1.sh user hello", shell=True)
</code></pre>

<p>or</p>

<pre><code>import subprocess
subprocess.call(["1.sh", "user", "hello"])
</code></pre>

python