[Tutor] sending both a filename and an argument from the command
bvinger at postmaster.co.uk
Sat Nov 22 19:10:01 EST 2003
It seems I can send either a file(s), or arguments to a python script, but not both:
I want to do:
python ip.py myfile -i myargument
cat myfile | python ip.py -i myargument
Neither works, although if I do
cat myfile | python ip.py - myargument
the program begins working and even prints out some correct output before aborting with:
IOError: [Errno 2] No such file or directory: 'myargument'
Is there a way to accomplish this?
Reduce your company's IT costs today with Officemaster. Sign up for a free trial!
More information about the Tutor