I\'ve got a program that has a small file structure going on and is then ran using
python do_work.py foo bar
I want my Rails users to press
The answer from utapyngo is cover almost all you need to know. I'll answer this part:
incidentally, trying this in irb: %x(python) Brings up the python terminal INSIDE of irb. It will not take params for whatever reason however.
To pass parameters to your python script, simply pass it. Example:
[fotanus@thing ~]$ python a.py
args:
['a.py']
[fotanus@thing ~]$ irb
1.8.7 :001 > %x(python a.py foo bar)
=> "args:\n['a.py', 'foo', 'bar']\n"
This works on ruby 1.8, 1.9 and 2.0.