[issue45901] store app file type ignores command-line arguments

2021-11-26 Thread Steve Dower
Change by Steve Dower : -- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45901] store app file type ignores command-line arguments

2021-11-26 Thread Steve Dower
Steve Dower added the comment: New changeset 133fb267f437f9bd568738d0e0e59e574fc82b02 by Miss Islington (bot) in branch '3.9': bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799)

[issue45901] store app file type ignores command-line arguments

2021-11-26 Thread miss-islington
miss-islington added the comment: New changeset 3dcbe01dc5236fb77d8c0133fb7e6bdd0754768a by Miss Islington (bot) in branch '3.10': bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799)

[issue45901] store app file type ignores command-line arguments

2021-11-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +28040 pull_request: https://github.com/python/cpython/pull/29808 ___ Python tracker ___

[issue45901] store app file type ignores command-line arguments

2021-11-26 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +28039 pull_request: https://github.com/python/cpython/pull/29807 ___ Python tracker

[issue45901] store app file type ignores command-line arguments

2021-11-26 Thread Steve Dower
Steve Dower added the comment: New changeset 4841e694ee1686f8c933ddfcb8c854915867ce17 by Steve Dower in branch 'main': bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799)

[issue45901] store app file type ignores command-line arguments

2021-11-26 Thread Steve Dower
Steve Dower added the comment: For future reference, in case someone stumbles over this issue, here's how I tested this change: * set $env:IncludeUWP="true" * did a regular PCbuild/build.bat * generated a Store layout with "./python.bat PC/layout --preset-appx --copy ./out" * mock-installed

[issue45901] store app file type ignores command-line arguments

2021-11-26 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +28034 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29799 ___ Python tracker

[issue45901] store app file type ignores command-line arguments

2021-11-25 Thread Eryk Sun
New submission from Eryk Sun : The file association for the store app uses '"%1"' for the command-line parameters. This ignores the rest of the command-line arguments, i.e. '%*'. In PC/layout/support/appxmanifest.py, the add_application() calls that add the "Pytho

[issue23427] Add sys.orig_argv: original command line arguments passed to the Python executable

2020-06-29 Thread STINNER Victor
STINNER Victor added the comment: I added sys.orig_argv to the master branch (future Python 3.10). -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue23427] Add sys.orig_argv: original command line arguments passed to the Python executable

2020-06-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0 by Victor Stinner in branch 'master': bpo-23427: Add sys.orig_argv attribute (GH-20729) https://github.com/python/cpython/commit/dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0 --

[issue23427] Add sys.orig_argv: original command line arguments passed to the Python executable

2020-06-23 Thread STINNER Victor
STINNER Victor added the comment: The setproctitle project uses Py_GetArgcArgv() and would benefit of PyConfig.orig_argv, see: * https://bugs.python.org/issue15577#msg370965 * https://github.com/dvarrazzo/py-setproctitle/issues/8 -- ___ Python

[issue23427] Add sys.orig_argv: original command line arguments passed to the Python executable

2020-06-16 Thread STINNER Victor
Change by STINNER Victor : -- versions: +Python 3.10 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue23427] Add sys.orig_argv: original command line arguments passed to the Python executable

2020-06-08 Thread STINNER Victor
Change by STINNER Victor : -- title: Python should expose command when invoked with -c -> Add sys.orig_argv: original command line arguments passed to the Python executable ___ Python tracker <https://bugs.python.org/issu

[issue29857] Provide `sys.executable_argv` for host application's command line arguments

2020-06-08 Thread STINNER Victor
STINNER Victor added the comment: I mark this issue as a duplicate of bpo-23427 which has patch and is older. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Python should expose command when invoked with -c

[issue36825] Make TestCase aware of the command line arguments given to TestProgram

2020-05-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since test modules can already be run in parallel, #37873 does not seem relevant here. (And I agree with the intent of that.) I would be reluctant to add a mechanism with no current use, so I would not apply absent a decision to add one. -- nosy:

[issue36825] Make TestCase aware of the command line arguments given to TestProgram

2020-05-01 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Bumping this issue as issue 37873 that wants to add a new -j argument to unittest got some attention lately. This PR makes the Test Cases aware of the command line arguments given to unittest.main() and is needed to add the --pdb argument proposed in issue

[issue25631] Segmentation fault with invalid Unicode command-line arguments in embedded Python

2019-09-25 Thread STINNER Victor
STINNER Victor added the comment: This bug has been fixed in the implementation of the PEP 587. $ gcc x.c -l python3.8 $(pkg-config python-3.8 --cflags --libs) -o x $ ./x Fatal Python error: pyinit_main: can't finish initializing sys ValueError: character U+11 is not in range [U+;

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-17 Thread miss-islington
miss-islington added the comment: New changeset 81f7899f517f18a45ab111598f9dd6d7210956a8 by Miss Islington (bot) in branch '3.7': bpo-5680: IDLE: Customize running a module (GH-13763) https://github.com/python/cpython/commit/81f7899f517f18a45ab111598f9dd6d7210956a8 -- nosy:

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-17 Thread miss-islington
miss-islington added the comment: New changeset ae526ee320d3feabba0aa4dffa9d52e39f8941dc by Miss Islington (bot) in branch '3.8': bpo-5680: IDLE: Customize running a module (GH-13763) https://github.com/python/cpython/commit/ae526ee320d3feabba0aa4dffa9d52e39f8941dc --

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: A more than minimal patch has been merged. Further work will be on new issues. Remaining problems not previously discussed: 1. Tab focus traversal is wrong. This is generic to Query subclasses that add widgets. See #37325. 2. When the customize box is

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14021 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/14184 ___ Python tracker ___

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14022 pull_request: https://github.com/python/cpython/pull/14185 ___ Python tracker ___

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 201bc2d18b60adb05810d2a6ab396047bc527088 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-5680: IDLE: Customize running a module (GH-13763) https://github.com/python/cpython/commit/201bc2d18b60adb05810d2a6ab396047bc527088

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-03 Thread Cheryl Sabella
Cheryl Sabella added the comment: I've pushed a change for a more generic dialog for a 'Run Custom' option and I changed the keybinding to Shift-F5. Sorry for not doing that on the initial commit; I didn't fully understand the difference between what you were asking for and the minimal

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Two design issues: 1. As I said 2017-06-20, msg296499, I expect to add more alternatives to the standard run to this menu option and dialog. (Cheryl, I should have pointed you to this post as well as the later ones.) I want to add just one new option to

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks. Those seem reasonable for a first pass. -- ___ Python tracker ___ ___

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-02 Thread Cheryl Sabella
Cheryl Sabella added the comment: I've added a minimal change for running a module in the editor with command line arguments. Some notes: 1. The shortcut key (F7) can be entered while on the shell window. As of now, any of the Run menu shortcuts can be entered, so I didn't fix that bug

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-02 Thread Cheryl Sabella
Change by Cheryl Sabella : -- pull_requests: +13648 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/13763 ___ Python tracker ___

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Cheryl, go ahead after reading the notes above. Use an f-string for the runcommand argument and remember that it is run within the pristine user environment. Otherwise, let's start with minimal changes. -- ___

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: My suspicion about posix=False was wrong. >>> shlex.split(''' 1 "'a' 'b'" ''', posix=False) ['1', '"\'a\' \'b\'"'] # len(...[1]) = 9 >>> shlex.split(''' 1 '"a" "b"' ''') ['1', '"a" "b"'] # len = 7 f:\dev\3x>py -c "import sys; print(sys.argv)" 1 "'a' 'b'"

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: When running IDLE normally, with a subprocess, it would be possible to pass arguments to python itself when IDLE restarts the user process (with shell.restart_shell()). That would be another issue. We would have to look at whether any options would disable

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-01 Thread Cheryl Sabella
Cheryl Sabella added the comment: I'll can work on a PR for this, unless you want to do it based on your research. -- nosy: +cheryl.sabella ___ Python tracker ___

[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-01 Thread Terry J. Reedy
be added to runscript.py, and manual test running 'import sys; print(sys.argv)' from an editor done on the 3 major OSes. -- stage: patch review -> needs patch title: Command-line arguments when running in IDLE -> Simulate command-line arguments for program run in IDLE versions: +Pyth

[issue5680] Command-line arguments when running in IDLE

2019-06-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Can be bump this up in priority? The patch has been awaiting review for a good while. -- ___ Python tracker ___

[issue36825] Make TestCase aware of the command line arguments given to TestProgram

2019-05-07 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- keywords: +patch pull_requests: +13066 stage: -> patch review ___ Python tracker ___ ___

[issue36825] Make TestCase aware of the command line arguments given to TestProgram

2019-05-07 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : Hi, to make unittest more extensible and for issue 18765 (having a way to run pdb when tests fail), I would like to make TestCase aware of the command line arguments given to the TestProgram so they can adapt their behavior based on them. I suggested

[issue36036] Add method to get user defined command line arguments in unittest.main

2019-02-19 Thread Rémi Lapeyre
. As of today, it seems to me that the command line arguments given to the TestProgram are not accessible from the TestCase. Would adding a new parameter to TestCase be breaking backward compatibility? If so, what would be a better way to access command line arguments from TestCase? In addition

[issue36036] Add method to get user defined command line arguments in unittest.main

2019-02-19 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- components: +Library (Lib) versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5680] Command-line arguments when running in IDLE

2017-06-21 Thread veganaiZe
veganaiZe added the comment: I've created a simple work-around for those who don't want to wait for the next release(s) of IDLE. It's available on SO: https://stackoverflow.com/a/44687632/5039027 -- ___ Python tracker

[issue5680] Command-line arguments when running in IDLE

2017-06-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Running with arguments is only one requested or possible deviation from the standard F5 mode. See #19042, msg296498, for many more. I am thinking that there should be one menu entry (Custom Run, Alt-F5)? that brings up a box with alternatives, initially

[issue5680] Command-line arguments when running in IDLE

2017-06-20 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +louielu ___ Python tracker ___ ___ Python-bugs-list

[issue5680] Command-line arguments when running in IDLE

2017-06-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: I closed #28889, with a 4th patch, in favor of this one. Gabriel, you somehow never signed the PSF Contributor License Agreement. Until you do, I will assume that anything you did is covered by the other 3 patches. -- versions: +Python 3.7 -Python

[issue28889] IDLE needs the ability to pass in command-line arguments

2017-06-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: Another duplicate of #5680, which already has three patches. I retitled the PR and it is now listed on #5680. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Command-line arguments when run

[issue5680] Command-line arguments when running in IDLE

2017-06-20 Thread Louie Lu (old)
Changes by Louie Lu (old) : -- pull_requests: +2353 ___ Python tracker ___ ___ Python-bugs-list

[issue5680] Command-line arguments when running in IDLE

2017-06-19 Thread veganaiZe
Changes by veganaiZe : -- nosy: +veganaiZe ___ Python tracker ___ ___

[issue28889] IDLE needs the ability to pass in command-line arguments

2017-05-15 Thread Louie Lu
Louie Lu added the comment: This PR will add the short-key to F7, when using editor. It will prompt up a dialog and user can input the command-line arguments then run the code. -- nosy: +louielu ___ Python tracker <rep...@bugs.python.org>

[issue28889] IDLE needs the ability to pass in command-line arguments

2017-05-15 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1682 ___ Python tracker ___ ___ Python-bugs-list

Re: Python Command Line Arguments

2017-04-17 Thread breamoreboy
On Saturday, April 15, 2017 at 6:45:51 PM UTC+1, Grant Edwards wrote: > On 2017-04-14, Bernd Nawothnig wrote: > > > He should switch to argparse in any case because getopt is no longer > > supported and does only receive bugfixes. > > In my book, "receiving bug fixes" means it's still supported.

Re: Python Command Line Arguments

2017-04-17 Thread breamoreboy
ify it to what I need, it only half works. The problem is the > >> try/except. If you don't specify an input/output, they are blank at the end > >> but it shouldn't be. > >> > >> import getopt > >> import sys > > > > I am guessing you

Re: Python Command Line Arguments

2017-04-15 Thread Grant Edwards
On 2017-04-14, Bernd Nawothnig wrote: > He should switch to argparse in any case because getopt is no longer > supported and does only receive bugfixes. In my book, "receiving bug fixes" means it's still supported. -- Grant --

Re: Python Command Line Arguments

2017-04-14 Thread Bernd Nawothnig
u don't specify an input/output, they are blank at the end >> but it shouldn't be. >> >> import getopt >> import sys > > I am guessing you are wanting to parse command-line arguments rather than > particularly wanting to use the getopt module. > If I a

Re: Python Command Line Arguments

2017-04-12 Thread ian . stegner
On Thursday, April 13, 2017 at 12:38:48 PM UTC+10, MRAB wrote: > On 2017-04-13 02:59, ian.steg...@gmail.com wrote: > > I have this code which I got from > > https://www.tutorialspoint.com/python/python_command_line_arguments.htm The > > example works fine but when I modify it to what I need, it

Re: Python Command Line Arguments

2017-04-12 Thread MRAB
On 2017-04-13 02:59, ian.steg...@gmail.com wrote: I have this code which I got from https://www.tutorialspoint.com/python/python_command_line_arguments.htm The example works fine but when I modify it to what I need, it only half works. The problem is the try/except. If you don't specify an

Re: Python Command Line Arguments

2017-04-12 Thread Jason Friedman
lank at the end > but it shouldn't be. > > import getopt > import sys > Hello Ian, I am guessing you are wanting to parse command-line arguments rather than particularly wanting to use the getopt module. If I am correct you might want to spend your time instead learning the argparse mod

Python Command Line Arguments

2017-04-12 Thread ian . stegner
I have this code which I got from https://www.tutorialspoint.com/python/python_command_line_arguments.htm The example works fine but when I modify it to what I need, it only half works. The problem is the try/except. If you don't specify an input/output, they are blank at the end but it

[issue26919] on Android python fails to decode/encode command line arguments

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +937 ___ Python tracker ___ ___

[issue29857] Provide `sys.executable_argv` for host application's command line arguments

2017-03-22 Thread Nick Coghlan
umentation can make it clear that they may be entirely absent if the host application doesn't set them. -- title: Provide `sys._raw_argv` for host application's command line arguments -> Provide `sys.executable_argv` for host application's command l

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-21 Thread STINNER Victor
STINNER Victor added the comment: > If the embedding application doesn't call PySys_SetArgv or PySys_SetArgvEx, > then there is no `argv` attribute defined in the sys module (I wasn't > actually sure what happened in that case, so I went and checked the code). Ok, so just don't define

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-21 Thread Nick Coghlan
Nick Coghlan added the comment: If the embedding application doesn't call PySys_SetArgv or PySys_SetArgvEx, then there is no `argv` attribute defined in the sys module (I wasn't actually sure what happened in that case, so I went and checked the code). For the reference CLI, the relevant call

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-21 Thread STINNER Victor
STINNER Victor added the comment: > For example, if Py_Main() is never called (for CPython), it would still be > None, What is the content of sys.argv in that case? Can't we use the same value for sys._raw_argv? -- ___ Python tracker

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-21 Thread Nick Coghlan
Nick Coghlan added the comment: @Steven This is an implementation detail in the same sense that sys._getframe() is: it's not something that's actually going to make sense in all contexts. For example, if Py_Main() is never called (for CPython), it would still be None, and other

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-21 Thread STINNER Victor
STINNER Victor added the comment: There is already an existing public C API get retrieve original program arguments *as text*: /* Make the *original* argc/argv available to other modules. This is rare, but it is needed by the secureware extension. */ void Py_GetArgcArgv(int *argc, wchar_t

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-21 Thread STINNER Victor
STINNER Victor added the comment: > Well, "raw args" implies minimal or no processing, Ok, so call it "original", sys.orig_arv, in that case ;-) -- ___ Python tracker

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-21 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Mar 21, 2017, at 11:47 AM, STINNER Victor wrote: >No, text please. Text is just more convenient in Python, and it's trivial to >retrieve original bytes: > >raw_args_bytes = [os.fsencode(arg) for arg in sys._raw_args] Well, "raw args" implies minimal or no

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-21 Thread STINNER Victor
STINNER Victor added the comment: > As bytes? No, text please. Text is just more convenient in Python, and it's trivial to retrieve original bytes: raw_args_bytes = [os.fsencode(arg) for arg in sys._raw_args] -- nosy: +haypo ___ Python tracker

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: Why is the name flagged as a private implementation detail? I.e. a single leading underscore. I'd be reluctant to rely on this in production code, given how strong the _private convention is. Suggest just `sys.raw_args` instead. -- nosy:

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-20 Thread Nick Coghlan
Nick Coghlan added the comment: For CPython, I was thinking of having it be "whatever gets passed to Py_Main", and that accepts wchar_t in Py3 [1], so on *Nix systems, the command line has already been decoded with [2] by the time it runs. [1]

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: As bytes? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-20 Thread Jakub Wilk
Changes by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-20 Thread Nick Coghlan
`sys._raw_argv` for host application's command line arguments type: enhancement ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29857> ___ ___

[issue26919] on Android python fails to decode/encode command line arguments

2016-12-15 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue26919] on Android python fails to decode/encode command line arguments

2016-12-15 Thread Xavier de Gaye
Xavier de Gaye added the comment: Forgot the issue number in the commit message for the default branch, the corresponding changeset is 80a041d39c20. -- ___ Python tracker

[issue26919] on Android python fails to decode/encode command line arguments

2016-12-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset e5360d413ce4 by Xavier de Gaye in branch '3.6': Issue #26919: On Android, operating system data is now always encoded/decoded https://hg.python.org/cpython/rev/e5360d413ce4 -- nosy: +python-dev ___

[issue26919] on Android python fails to decode/encode command line arguments

2016-12-15 Thread Xavier de Gaye
Xavier de Gaye added the comment: The patch fixes also the following errors in test_warnings: == FAIL: test_nonascii (test.test_warnings.CEnvironmentVariableTests)

[issue28889] IDLE needs the ability to pass in command-line arguments

2016-12-06 Thread Raymond Hettinger
New submission from Raymond Hettinger: [--- Feature request posted on behalf of Balakrishnan Sakthidharan ---] IDLE lets you run scripts with F5. What is needs is an F6 that opens a dialog box and asks for command-line arguments. This will help develop and test command line scripts

[issue26919] on Android python fails to decode/encode command line arguments

2016-10-31 Thread Xavier de Gaye
Changes by Xavier de Gaye <xdeg...@gmail.com>: -- title: android: test_cmd_line fails -> on Android python fails to decode/encode command line arguments ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue23665] Provide IDLE menu option to set command-line arguments

2016-09-09 Thread Matej Cepl
Changes by Matej Cepl : -- nosy: +mcepl ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5680] Command-line arguments when running in IDLE

2016-09-09 Thread Matej Cepl
Changes by Matej Cepl : -- nosy: +mcepl ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5680] Command-line arguments when running in IDLE

2015-11-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Today on SO: https://stackoverflow.com/questions/33866724/read-data-from-file-idle. Person writing script to open a file given on command line asks 'How to test from IDLE?' He found PyCharm, but I would like to add a better answer than the workaround I gave

[issue5680] Command-line arguments when running in IDLE

2015-11-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: When file is run with command line args, it might be nice to add an additional separator line with the line entered. That way, if someone ran a series of experiments with different command lines, they would have the command line and output together as

[issue25631] Segmentation fault with invalid Unicode command-line arguments in embedded Python

2015-11-16 Thread Eryk Sun
Eryk Sun added the comment: The interpreter isn't initialized, so calling PyErr_Format in a release build segfaults when it tries to dereference a NULL PyThreadState. OTOH, a debug build should call PyThreadState_Get, which in this case calls Py_FatalError and aborts the process.

[issue25631] Segmentation fault with invalid Unicode command-line arguments in embedded Python

2015-11-15 Thread Itai Bar-Natan
cally, a call to PyExceptionClass_Check() within PyErr_Object() reads a NULL pointer. I haven't tested this but I expect that this problem would not appear when calling Python directly since Python sanitizes the command line arguments from main(). Nonetheless even here the possibilit

[issue25219] Update doc for Idle command line arguments.

2015-09-23 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- assignee: -> terry.reedy ___ Python tracker ___ ___

[issue25219] Update doc for Idle command line arguments.

2015-09-23 Thread Terry J. Reedy
Changes by Terry J. Reedy <tjre...@udel.edu>: -- title: Update doc for Idle command line argument. -> Update doc for Idle command line arguments. ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue5680] Command-line arguments when running in IDLE

2015-04-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Pending application of a patch, the following will work to only add args to sys.argv when running from an Idle editor. import sys # ... if __name__ == '__main__': if 'idlelib.PyShell' in sys.modules: sys.argv.extend(('a', '-2')) # add your

[issue5680] Command-line arguments when running in IDLE

2015-04-16 Thread Wolfgang Maier
Changes by Wolfgang Maier wolfgang.ma...@biologie.uni-freiburg.de: -- nosy: +wolma ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5680 ___ ___

[issue5680] Command-line arguments when running in IDLE

2015-03-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: I closed #23665 in favor of this one. Raymond's take: msg238108 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5680 ___

[issue23665] Provide IDLE menu option to set command-line arguments

2015-03-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: #5680 has 3 different patches. I have not reviewed them yet. I will link to Raymond's message there. -- nosy: +terry.reedy resolution: - duplicate stage: needs patch - resolved status: open - closed superseder: - Command-line arguments when running

[issue5680] Command-line arguments when running in IDLE

2015-03-20 Thread Raymond Hettinger
if IDLE let the user set command line arguments to be passed into sys.argv when running a script by pressing F5. Here are some existing implementations for reference: * Wing-IDE: https://wingware.com/doc/intro/tutorial-debugging-launch * Visual Studio: https://www.youtube.com/watch?v=IgbQCRHKV-Y

[issue23665] Provide IDLE menu option to set command-line arguments

2015-03-16 Thread Saimadhav Heblikar
Saimadhav Heblikar added the comment: http://bugs.python.org/issue5680 Also had submitted a patch for it. Could you post your review there? (I was learning the CPython style then, so excuse obvious mistakes :) ) -- nosy: +sahutd ___ Python tracker

[issue23665] Provide IDLE menu option to set command-line arguments

2015-03-14 Thread Raymond Hettinger
New submission from Raymond Hettinger: A number of IDEs support menu options to set the execution environment for programs under development and testing. In particular, it would be nice if IDLE let the user set command line arguments to be passed into sys.argv when running a script

[issue5680] Command-line arguments when running in IDLE

2014-10-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: I have a recent idea that there should be a separate and persistent execution process for each file run. This would make it easy to persist the cmd lines args for a particular module. -- versions: +Python 3.4, Python 3.5 -Python 3.1, Python 3.2

[issue5680] Command-line arguments when running in IDLE

2014-03-22 Thread Saimadhav Heblikar
Saimadhav Heblikar added the comment: Submitting a patch for 3.4. 1. Allows the user to set command line arguments via a dialog box 2. Parsing - Maps the string which user entered into a list i.e. the same results are produced as when run via terminal/command prompt. The parsing methods

[issue5680] Command-line arguments when running in IDLE

2014-02-04 Thread Tal Einat
Changes by Tal Einat talei...@gmail.com: -- nosy: -taleinat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5680 ___ ___ Python-bugs-list mailing

[issue5680] Command-line arguments when running in IDLE

2014-02-03 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: -BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5680 ___ ___

Re: Determine actually given command line arguments

2013-05-16 Thread Jussi Piitulainen
Henry Leyh writes: But now I would also like to be able to _write_ such a config file FILE that can be read in a later run. And FILE should contain only those arguments that were given on the command line. Say, I tell argparse to look for arguments -s|--sopt STRING, -i|--iopt INT,

Re: Determine actually given command line arguments

2013-05-16 Thread Henry Leyh
On 16.05.2013 08:08, Jussi Piitulainen wrote: Henry Leyh writes: But now I would also like to be able to _write_ such a config file FILE that can be read in a later run. And FILE should contain only those arguments that were given on the command line. Say, I tell argparse to look for

Determine actually given command line arguments

2013-05-15 Thread Henry Leyh
Hello, I am writing a program that gets its parameters from a combination of config file (using configparser) and command line arguments (using argparse). Now I would also like the program to be able to _write_ a configparser config file that contains only the parameters actually given

  1   2   3   4   >