Hi all again . didnt know whether to put this in linux forum or here ... anyway.. i am trying to execute a sequence of bash commands from python .. but it doesnt seem to work :
[CODE=python]
#!/usr/bin/python
import os
os.system("myfi le=/home/pythonprac/commonwords")
os.system("echo $myfile")
[/CODE]
this is giving a blank output whereas it is supposed to display /home/pythonprac/commonwords
any idea where i am going wrong ?
thanks
[CODE=python]
#!/usr/bin/python
import os
os.system("myfi le=/home/pythonprac/commonwords")
os.system("echo $myfile")
[/CODE]
this is giving a blank output whereas it is supposed to display /home/pythonprac/commonwords
any idea where i am going wrong ?
thanks
Comment