question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run With Arguments

See original GitHub issue

Issue Report Checklist

  • [x ] Searched the issues page for similar reports
  • [ x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • [ x] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • x[ ] Could not reproduce inside jupyter qtconsole (if console-related)
  • [x ] Tried basic troubleshooting (if a bug/error)
    • [x ] Restarted Spyder
    • [x ] Reset preferences with spyder --reset
    • [ x] Reinstalled the latest version of Anaconda
    • [x ] Tried the other applicable steps from the Troubleshooting Guide
  • x[ ] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

You used to be able to run a script in Spyder and specify command line arguments. Now, the only way this can be done is if the script is run in an external console. This console then closes as soon as the script finishes, so you can’t see the output of your program.

I think it would be really good if we could run scripts in the Spyder IDE IPython console and see the output of a script.

What steps reproduce the problem?

  1. Open Run -> Configuration Per File
  2. The default option of “Execute in Current Console” is selected.
  3. The option to add “Command Line Options” is greyed out.
  4. If you select “Execute in and external system console” then the option to add “Command Line Options” is available.
  5. When run, the script runs in a system console and that console closes immediately the script is finished - even if the “Interact with the Python console after execution” checkbox is ticked.

What is the expected output? What do you see instead?

I’d like to be able to run in the integrated Spyder IPython console and be able to specify command line arguments at the same time.

Paste Traceback/Error Below (if applicable)

N/A

Versions

  • Spyder version: 3.2.8
  • Python version: 3.6.3
  • Qt version: 5.6.2
  • PyQt version: 5.6
  • Operating System name/version: Windows 10

Dependencies

IPython >=4.0    :  6.1.0 (OK)
cython >=0.21    :  0.25.2 (OK)
jedi >=0.9.0     :  0.10.2 (OK)
nbconvert >=4.0  :  4.2.0 (OK)
numpy >=1.7      :  1.11.3 (OK)
pandas >=0.13.1  :  0.19.2 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pyflakes >=0.6.0 :  1.5.0 (OK)
pygments >=2.0   :  2.1.3 (OK)
pylint >=0.25    :  1.6.4 (OK)
qtconsole >=4.2.0:  4.2.1 (OK)
rope >=0.9.4     :  0.9.4-1 (OK)
sphinx >=0.6.6   :  1.5.1 (OK)
sympy >=0.7.3    :  1.0 (OK)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ccordoba12commented, Jun 15, 2018

@Davo36, look under the section called General settings. There you will find Command line options and it’s not greyed out.

seleccion_001

0reactions
CAM-Gerlachcommented, Jun 15, 2018

Happened to me my first time using it too 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python - Command Line Arguments - Tutorialspoint
Python Command Line Arguments provides a convenient way to accept some information at the command line while running the program. The arguments that...
Read more >
Command Line Arguments for Your Python Script
Running a Python script in command line is powerful because you can pass in additional parameters to the script. Then, you will see...
Read more >
Command Line Arguments in Python - GeeksforGeeks
The arguments that are given after the name of the program in the command line shell of the operating system are known as...
Read more >
How can I run an application with arguments from Windows ...
Hold shift then right-click on the .bat file. Choose "Copy as path." Press WinKey + R to open the run dialog. Paste into...
Read more >
Command-Line Arguments - Go by Example
Command-line arguments are a common way to parameterize execution of programs. For example, go run hello.go uses run and hello.go arguments to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found