1

I am calling a python script:

/bin/sh
python ~/Documents/Projects/Programming/Python/svg/svg2dxf.py $1 0

After running the script, I get a python command prompt ($) and it's only when I type "exit" at the command prompt that the script runs.

What am I doing wrong?

1
  • $ is not the python command prompt, >>> is. Commented Apr 12, 2016 at 7:06

2 Answers 2

4

Change the following line:

/bin/sh

with (shebang interpreter directive):

#!/bin/sh

Otherwise, the new shell instance is invoked; until the new shell is exit, next line is not executed.

Sign up to request clarification or add additional context in comments.

2 Comments

Oh, God, how did I must that? Thank you!
Both answers were acceptable. WHile attempting to click the accept button, I seem to have clicked the downvote button: sorry! Perhaps it would make sense to put the accept button above the up/down vote buttons?
1

You should remove the leading:

/bin/sh

Your current script does two things: 1) execute a new instance of /bin/sh ==> which gives your the shell $ sign

2) execute the python script

Your script should be:

python ~/Documents/Projects/Programming/Python/svg/svg2dxf.py $1 0

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.