On 2018-08-16 14:33, Chris Angelico wrote:
> On Thu, Aug 16, 2018 at 8:32 PM, Thomas Jollans wrote:
>> On 2018-08-16 01:05, Chris Angelico wrote:
>>> On Thu, Aug 16, 2018 at 8:51 AM, Cameron Simpson wrote:
And as an additional alternative, when I want something weird (extra python
args
On Thu, Aug 16, 2018 at 8:32 PM, Thomas Jollans wrote:
> On 2018-08-16 01:05, Chris Angelico wrote:
>> On Thu, Aug 16, 2018 at 8:51 AM, Cameron Simpson wrote:
>>> And as an additional alternative, when I want something weird (extra python
>>> args or the like) I usually make my script.py into a
On 2018-08-16 01:05, Chris Angelico wrote:
> On Thu, Aug 16, 2018 at 8:51 AM, Cameron Simpson wrote:
>> And as an additional alternative, when I want something weird (extra python
>> args or the like) I usually make my script.py into a module and invoke it
>> via a shell script, eg:
>>
>>
David Raymond writes:
> So what are you saying is an option vs an argument? Because I see no
> distinction whatsoever.
The command-line conventions do recognise the distinction.
* A command-line argument specifies input to the program.
For example, the destination file for a ‘cp’ command is
Thanks to everyone who contributed to this thread. Great feedback and
suggestions! - Malcolm
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Aug 16, 2018 at 8:51 AM, Cameron Simpson wrote:
> And as an additional alternative, when I want something weird (extra python
> args or the like) I usually make my script.py into a module and invoke it
> via a shell script, eg:
>
> #!/bin/sh
> exec /particular/python python-opts... -m
On 15Aug2018 20:54, eryk sun wrote:
On Wed, Aug 15, 2018 at 9:22 AM, Thomas Jollans wrote:
If you really want to, you can pass a *single* argument in your #! line,
e.g.:
#!/usr/bin/python3 -Wd
This works for options that can be grouped into a single argument.
Multiple -X options aren't
On Wed, Aug 15, 2018 at 9:22 AM, Thomas Jollans wrote:
>
> If you really want to, you can pass a *single* argument in your #! line,
> e.g.:
>
> #!/usr/bin/python3 -Wd
This works for options that can be grouped into a single argument.
Multiple -X options aren't supported, nor is combining a -X
the more difficult
method of "muck about with the OS's convenience method to get it to do
something magical."
-Original Message-
From: Python-list
[mailto:python-list-bounces+david.raymond=tomtom@python.org] On Behalf Of
Malcolm Greene
Sent: Tuesday, August 14, 2018 7:47 PM
On 14/08/18 23:45, Malcolm Greene wrote:
> When you run a script via "python3 script.py" you can include command
> line options like -b, -B, -O, -OO, etc between the "python3" interpreter
> reference and the script.py file, eg. "python3 -b -B -O -OO script.py".
> When you create a script that is
> You might try:
> from getopt import getopt
> or the (apparently newer):
> from optparse import OptionParser
Thanks Mike. My question was trying to make a distinction between Python
options (flags that precede the script or module name) and arguments (the
script specific values passed on the
> If you run the script directly, by entering >script.py or clicking a script
> icon or name in File Explorer, it runs python without python options *other
> than those specified in environmental variables*.
Understood. I thought there might have been a way to pass Python option values
via a
On 2018-08-14 16:45, Malcolm Greene wrote:
> When you run a script via "python3 script.py" you can include command
> line options like -b, -B, -O, -OO, etc between the "python3" interpreter
> reference and the script.py file, eg. "python3 -b -B -O -OO script.py".
> When you create a script that is
On 8/14/2018 5:45 PM, Malcolm Greene wrote:
When you run a script via "python3 script.py" you can include command
line options like -b, -B, -O, -OO, etc between the "python3" interpreter
reference and the script.py file, eg. "python3 -b -B -O -OO script.py".
More generally,
python script.py
14 matches
Mail list logo