J. Does J. Does - 3 years ago 206
Bash Question

Scrapy Shell: How to execute multiple lines of code in shell?

You will see in the screenshot that pressing enter after pasting a multiline code doesnt run it but merely send each time a "...".

How can I run this multiline pasted code?

someone asked here, but did not get (the right) answer;

enter image description here

Did not work:

  • Backspace

  • Use the arrow key to move the cursor, then use the delete key

  • Escape

  • F2

Answer Source

Pressing enter twice when inside the Python interpreter executes a block of code, but you have an unmatched open parenthesis on the last line, so you haven't completed defining the block of code. Also, I'm not sure what dic is in the last line, because you haven't included its definition, so you may need to fix that as well.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download