PDA

View Full Version : Help with Python wrapper


popeye
07-20-08, 04:51 PM
I am trying to create a simple python wrapper using a bash shell to execute in cygwin.

#!/bin/bash
python script.py "$@"
#script.py takes one argument which is an input file name.

Trouble is that when I execute this shell script ./shellscript "inputfilename"
cygwin automatically attaches a carriage return to the end of the inputfilename and says cannot locate directory or file.... is there any way to remove this carriage return \r from the end of inputfilename??

Simply stripping the .py extension from the script.py works fine but my requirement is to use a shell wrapper... :(
Thanks!!