Skip to content

Allow "Run Python File in Terminal" to accept script arguments #19810

Closed as not planned

Description

@diogo-rossi

We already have the setting "python.terminal.launchArgs", which pass arguments to the python interpreter.

This simple request is to allow arguments to be passed to the python file (script) that is running.

Examples (existing):

  1. If we configure: "python.terminal.launchArgs": ["-i"] and use the command "Run Python File in Terminal"
    it will launch: python -i script.py

  2. If we configure: "python.terminal.launchArgs": ["-m", "IPython", "-i" ] and use the command "Run Python File in Terminal"
    it will launch: python -m IPython -i script.py

Example (requested):

To have a different setting, like, for instance, "python.terminal.scriptArgs" which would pass the arguments to the script when using the command "Run Python File in Terminal", not to the interpreter, i.e.:

"python.terminal.scriptArgs": ["arg1", "arg2"] would make the command launch python script.py arg1 arg2

Related:

The following topics make related requests, but not as simple as this one.

#11812 => Requests more complex configuration
#19784 => Requests the arguments to be passed at run time in the debug launch.

Also see this comment

Activity

  1. changed the title [-][Feature request] Allow "Run Python File in Terminal" to accept arguments[/-] [+][Feature request] Allow "Run Python File in Terminal" to accept script arguments[/+] on Sep 11, 2022
  2. karrtikr commented on Sep 12, 2022

    @karrtikr

    Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

    Seems to me that is part of the general issue #11812 and should be solved along with that. You can leave this idea there, and we'll consider it while solving #11812 regardless of whether this issue gets closed.

  3. changed the title [-][Feature request] Allow "Run Python File in Terminal" to accept script arguments[/-] [+]Allow "Run Python File in Terminal" to accept script arguments[/+] on Sep 12, 2022
  4. brettcannon commented on Nov 17, 2022

    @brettcannon
    Member

    Thank you for submitting your feature request and everyone who considered it! Unfortunately, this issue did not receive enough votes over the allotted time, and so we are closing the issue.

  5. locked as resolved and limited conversation to collaborators on Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions