Re: Making command-line args available to deeply-nested functions

2021-09-10 Thread Loris Bennett
George Fischhof writes: > George Fischhof ezt írta (időpont: 2021. aug. 29., V, > 21:27): > >> >> >> Loris Bennett ezt írta (időpont: 2021. aug. >> 26., Cs, 16:02): >> >>> George Fischhof writes: >>> >>> [snip (79 lines)] >>> >>> >> > Hi, >>> >> > >>> >> > Also you can give a try to click and

Re: Making command-line args available to deeply-nested functions

2021-08-31 Thread George Fischhof
George Fischhof ezt írta (időpont: 2021. aug. 29., V, 21:27): > > > Loris Bennett ezt írta (időpont: 2021. aug. > 26., Cs, 16:02): > >> George Fischhof writes: >> >> [snip (79 lines)] >> >> >> > Hi, >> >> > >> >> > Also you can give a try to click and / or typer packages. >> >> > Putting args

Re: Making command-line args available to deeply-nested functions

2021-08-29 Thread George Fischhof
Loris Bennett ezt írta (időpont: 2021. aug. 26., Cs, 16:02): > George Fischhof writes: > > [snip (79 lines)] > > >> > Hi, > >> > > >> > Also you can give a try to click and / or typer packages. > >> > Putting args into environment variables can be a solution too > >> > All of these depends on s

Re: Making command-line args available to deeply-nested functions

2021-08-26 Thread Loris Bennett
George Fischhof writes: [snip (79 lines)] >> > Hi, >> > >> > Also you can give a try to click and / or typer packages. >> > Putting args into environment variables can be a solution too >> > All of these depends on several things: personal preferences, colleagues >> / >> > firm standards, the p

Re: Making command-line args available to deeply-nested functions

2021-08-23 Thread George Fischhof
Loris Bennett ezt írta (időpont: 2021. aug. 23., H 19:26): > George Fischhof writes: > > > Loris Bennett ezt írta (időpont: 2021. aug. > > 20., P 17:54): > > > >> Julio Di Egidio writes: > >> > >> > On Friday, 20 August 2021 at 11:54:00 UTC+2, Loris Bennett wrote: > >> >> Hi, > >> >> > >> >> T

Re: Making command-line args available to deeply-nested functions

2021-08-23 Thread Loris Bennett
George Fischhof writes: > Loris Bennett ezt írta (időpont: 2021. aug. > 20., P 17:54): > >> Julio Di Egidio writes: >> >> > On Friday, 20 August 2021 at 11:54:00 UTC+2, Loris Bennett wrote: >> >> Hi, >> >> >> >> TL;DR: >> >> >> >> If I have a command-line argument for a program, what is the bes

Re: Making command-line args available to deeply-nested functions

2021-08-21 Thread George Fischhof
Loris Bennett ezt írta (időpont: 2021. aug. 20., P 17:54): > Julio Di Egidio writes: > > > On Friday, 20 August 2021 at 11:54:00 UTC+2, Loris Bennett wrote: > >> Hi, > >> > >> TL;DR: > >> > >> If I have a command-line argument for a program, what is the best way > >> of making this available to

Making command-line args available to deeply-nested functions

2021-08-20 Thread Loris Bennett
Hi, TL;DR: If I have a command-line argument for a program, what is the best way of making this available to a deeply-nested[1] function call without passing the parameter through every intermediate function? Long version: If I have, say, a command-line program to send an email with a personali

Re: Making command-line args available to deeply-nested functions

2021-08-20 Thread Loris Bennett
Julio Di Egidio writes: > On Friday, 20 August 2021 at 11:54:00 UTC+2, Loris Bennett wrote: >> Hi, >> >> TL;DR: >> >> If I have a command-line argument for a program, what is the best way >> of making this available to a deeply-nested[1] function call without >> passing the parameter throug

Re: unified command line args, environment variables, .conf file settings.

2008-05-07 Thread andrej . panjkov
On May 3, 12:16 pm, smitty1e <[EMAIL PROTECTED]> wrote: > Just a fun exercise to unify some of the major input methods for a > script into a single dictionary. > Here is the output, given a gr.conf file in the same directory with > the contents stated below: > How about extending this to include

Re: unified command line args, environment variables, .conf file settings.

2008-05-03 Thread smitty1e
On May 2, 11:29 pm, Ben Finney <[EMAIL PROTECTED]> wrote: > smitty1e <[EMAIL PROTECTED]> writes: > > Just a fun exercise to unify some of the major input methods for a > > script into a single dictionary. > > Here is the output, given a gr.conf file in the same directory with > > the contents state

Re: unified command line args, environment variables, .conf file settings.

2008-05-02 Thread Ben Finney
smitty1e <[EMAIL PROTECTED]> writes: > Just a fun exercise to unify some of the major input methods for a > script into a single dictionary. > Here is the output, given a gr.conf file in the same directory with > the contents stated below: > > [EMAIL PROTECTED] ~/proj/mddl4/test $ ./inputs.py > {

unified command line args, environment variables, .conf file settings.

2008-05-02 Thread smitty1e
Just a fun exercise to unify some of the major input methods for a script into a single dictionary. Here is the output, given a gr.conf file in the same directory with the contents stated below: [EMAIL PROTECTED] ~/proj/mddl4/test $ ./inputs.py {'source_db': '/home/sweet/home.db'} [EMAIL PROTECTED

Re: Using command line args on Windows

2005-10-09 Thread Tim Roberts
Duncan Booth <[EMAIL PROTECTED]> wrote: >Fredrik Lundh wrote: > >> footnote: if you'd prefer to type "myscript myarg" instead, you might >> want to check out this tool: >> >> http://effbot.org/zone/exemaker.htm > >or even just do: > >SET PATHEXT=.py;%PATHEXT% > >and then "myscript myarg"

Re: Using command line args on Windows

2005-10-06 Thread Duncan Booth
Fredrik Lundh wrote: >> I'm stuck on a Windows machine today and would love to fully play >> with and test a simple python script. I want to be able to type >> "python myscript myarg" somewhere. Is there anything out there to >> help me? > > footnote: if you'd prefer to type "myscript myarg" i

Re: Using command line args on Windows

2005-10-06 Thread Fredrik Lundh
"k8" wrote: > I'm stuck on a Windows machine today and would love to fully play with > and test a simple python script. I want to be able to type "python > myscript myarg" somewhere. Is there anything out there to help me? footnote: if you'd prefer to type "myscript myarg" instead, you might wa

Re: Using command line args on Windows

2005-10-06 Thread Diez B. Roggisch
k8 wrote: > Thank you thank you thank you- The windows command line sol worked. It sure does. But it sucks.. bad tab-completion, few tools, short history, limited command-line-editing and so on. But if you want it the hard way, it's your choice :) Diez -- http://mail.python.org/mailman/listinf

Re: Using command line args on Windows

2005-10-05 Thread k8
Thank you thank you thank you- The windows command line sol worked. -k8 -- http://mail.python.org/mailman/listinfo/python-list

Re: Using command line args on Windows

2005-10-05 Thread Diez B. Roggisch
k8 wrote: > Hello- > > I'm stuck on a Windows machine today and would love to fully play with > and test a simple python script. I want to be able to type "python > myscript myarg" somewhere. Is there anything out there to help me? My > main concern is playing with the myarg in the sys.argv lis

Re: Using command line args on Windows

2005-10-05 Thread Larry Bates
1) Start a command prompt window (Start-Programs-Accessories-Command Prompt) 2) Change to directory where the python program is stored (cd \) 3) Type python myscript.py myarg -Larry Bates k8 wrote: > Hello- > > I'm stuck on a Windows machine today and would love to fully play with > and t

RE: Using command line args on Windows

2005-10-05 Thread Michael . Coll-Barth
om: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] n.org]On Behalf Of k8 Sent: Wednesday, October 05, 2005 4:39 PM To: python-list@python.org Subject: Using command line args on Windows Hello- I'm stuck on a Windows machine today and would love to fully play with and test a simple python script.

Using command line args on Windows

2005-10-05 Thread k8
Hello- I'm stuck on a Windows machine today and would love to fully play with and test a simple python script. I want to be able to type "python myscript myarg" somewhere. Is there anything out there to help me? My main concern is playing with the myarg in the sys.argv list. I've been mucking

Re: command line args

2005-03-14 Thread Steven Bethard
[EMAIL PROTECTED] wrote: Hello, I have the following commands: testb -s testb -s -o testb -s -o How do i split the commands so that all three are valid. And how do i check for missing arguments? Use optparse. It's an improvement over the old getopt that makes writing option parsers easy:

Re: command line args

2005-03-14 Thread Tim Daneliuk
[EMAIL PROTECTED] wrote: Hello, I have the following commands: testb -s testb -s -o testb -s -o How do i split the commands so that all three are valid. And how do i check for missing arguments? Thanks, -Joe Look into the getopt module. It vastly simplifies parsing command line arguments. F

command line args

2005-03-14 Thread [EMAIL PROTECTED]
Hello, I have the following commands: testb -s testb -s -o testb -s -o How do i split the commands so that all three are valid. And how do i check for missing arguments? Thanks, -Joe -- http://mail.python.org/mailman/listinfo/python-list